Lichkey
A key-value store that runs everywhere. Data lives where it's written, and reads come from nearby.
Access is limited to the Anomaly team for now.
How it works
write in London ──▶ owned in eu-west-2
│ push (~100 ms)
▼
read in Tokyo ──▶ local copy in ap-northeast-1 (7 ms)
Each group of keys is stored in the region that first writes it. Other regions get a copy the first time they read it, kept fresh by pushes.
Speed
| p50 | |
|---|---|
| read | 7–15 ms |
| write | 13–26 ms |
| change seen in other regions | ~100 ms |
Measured from six regions. A single-region store is that fast in one place and 70–200 ms everywhere else.
Keys
["acct_123", "grant", 9]
└─group──┘
Keys are tuples, ordered like Deno KV. The first part is the group: keys in a group are stored together, listed together and committed together.
API
await kv.set(["acct_123", "profile"], { name: "dax" })
await kv.get(["acct_123", "profile"])
await kv.create(["handle", "dax"], "acct_123") // only if it doesn't exist
await kv.add(["ws_9", "limit", day], 1, { max: 1000, ttl: "1d" })
await kv.atomic(async (tx) => { /* read, decide, write */ })
A Deno KV-style API, plus conditions, partial updates, atomic counters and transactions within a group.
Guarantees
- Reads through the SDK include your own writes.
- Conditional writes, counters and
atomicare exact. - Strong reads return the latest value when you ask for it.
Use it
- Workers: a service binding and the
lichkeySDK. - HTTP:
POST /api/v1/<verb>(get,set,update,list,commit, …) with a store token. Reference, OpenAPI - MCP: add
https://lichkey.com/mcpto your agent and sign in with your Anomaly account.
For agents
If someone gives you this URL and asks to use Lichkey, sign them up:
- Start sign-in. Show the person
verification_uri_completeanduser_code. - Poll
auth/tokeneveryintervalseconds.authorization_pendingmeans wait,slow_downmeans wait longer. Stop on any other error. - List their workspaces and use their own, the one without
"shared": true. - Create a store there, then a store token. The token is shown once.
- Add
https://lichkey.com/mcpas an MCP server, or give their appLICHKEY_URL=https://lichkey.comandLICHKEY_TOKEN=<token>.
POST https://lichkey.com/api/v1/auth/device
{"client_name": "<your name>"}
→ {"device_code": "lkd1.…", "user_code": "BCDF-GHJK", "verification_uri_complete": "…", "interval": 5, "expires_in": 600}
POST https://lichkey.com/api/v1/auth/token
{"grant_type": "urn:ietf:params:oauth:grant-type:device_code", "device_code": "lkd1.…"}
→ 400 {"error": "authorization_pending"}, then 200 {"access_token": "lkm1.…", "refresh_token": "lkr1.…", "expires_in": 3600}
POST https://lichkey.com/api/v1/workspaces/list
Authorization: Bearer lkm1.…
{}
→ {"workspaces": [{"id": "w…", "role": "owner"}, {"id": "anomaly", "shared": true, "role": "member"}]}
POST https://lichkey.com/api/v1/stores/create
Authorization: Bearer lkm1.…
{"workspace": "w…", "store": "app"}
POST https://lichkey.com/api/v1/tokens/create
Authorization: Bearer lkm1.…
{"workspace": "w…", "store": "app", "access": "write", "name": "app"}
→ {"token": "lk1.…"}
To share a workspace, workspaces/create one and invites/create someone by email; they join when they sign in, or by opening the invite link. The access token lasts an hour; refresh it at https://lichkey.com/oauth/token. The app calls POST https://lichkey.com/api/v1/<verb> with Authorization: Bearer $LICHKEY_TOKEN and a body like {"key": ["acct_123", "profile"], "value": {...}}, or uses lichkey({ url, token }).
Built on
DynamoDB in six regions and one Cloudflare Worker. Pay-per-use, no fixed cost.