Korely

Coding agents

Claude Code

Give Claude Code a hosted memory it reaches from every machine. One command connects the Korely MCP server: no package to install, just your API key in a header.

Claude Code already carries knowledge across sessions with CLAUDE.md files and auto memory, notes it saves on your machine. Auto memory is machine-local: it stays on the computer where Claude Code wrote it. Korely adds a hosted memory that Claude Code reaches with the same key from every machine where you add the server. Before answering, Claude Code can pull the current facts and relevant memories it has stored, and write new ones as it learns. Facts are bi-temporal: when a model decides a new one replaces an earlier one, the old fact is closed with its end date, not overwritten, and as_of and known_as_of read what was true, or what the store knew, on any past date. Korely extracts the facts and settles contradictions on its own servers. Claude Code just calls the tools.

Prerequisites

  • A Korely API key (kor_live_...) without the admin permission. Make it on the dashboard's API keys page, which ticks memories:read and memories:write and leaves admin off. A key from agent signup has admin until you connect it to a dashboard login, and with it a tool can manage the account's projects and close the account; connecting takes admin away, and the key keeps working. The hobby plan is free; Pricing lists its limits.
  • Claude Code installed (claude --version).

Add the Korely MCP server

Korely's agent memory is a remote MCP server at https://api.korely.ai/agent/mcp, authenticated with your key in a header, no browser login. Add it with one command:

Terminal window
claude mcp add --transport http korely https://api.korely.ai/agent/mcp \
--header "Authorization: Bearer kor_live_..."

claude mcp add uses local scope by default: the server loads only in this project, on this machine. Add --scope user to make it available in all your projects on this machine. On another machine, run the same command with the same key and Claude Code reads the same memory.

Or add it to your project's .mcp.json directly:

{
"mcpServers": {
"korely": {
"type": "http",
"url": "https://api.korely.ai/agent/mcp",
"headers": {
"Authorization": "Bearer ${KORELY_API_KEY}"
}
}
}
}

Export KORELY_API_KEY=kor_live_... in the shell that launches Claude Code, and approve the server when Claude Code asks about project-scoped servers.

Run /mcp inside Claude Code to confirm korely is connected.

Save every session without asking. In the repository, run korely init --tool claude-code (korely-memory 0.1.26 or later): hooks hand Claude Code the repository's memory when a session starts and save the session to it as a memory of kind session. Each prompt and each final answer is saved, at most 3,000 characters per message. Before anything leaves your machine, the hook masks private key blocks, credentials in URLs and long random-looking strings. It masks by shape, so a hexadecimal token or a short password typed in a sentence stays as plain text: keep secrets out of what you type. It also replaces any MCP server named korely at local scope (user scope with --global), the one added above included, with a local server that runs on your machine; --no-mcp removes that entry and adds none. To keep the remote server, run korely init --tool claude-code --no-mcp first and add the server above afterwards. The local server has four of the six tools below (no korely_correct_fact or korely_forget_memory). See Connect a coding assistant.

Korely MCP also supports OAuth, so Claude Code can sign you in instead of using a key. The Claude Code documentation describes OAuth for remote MCP servers. Korely has not tested OAuth with Claude Code. See Connect with OAuth.

What Claude Code can do

The Korely server offers six memory tools:

ToolWhat it does
korely_get_contextThe recall call: returns the current facts plus the most relevant memories as one block of text, ready to put in a prompt (the context block). It does not call a language model.
korely_addStore a memory. Korely writes facts from it on its servers, each as (subject, predicate, object), and closes an earlier fact, with its end date, when a model decides a new one replaces it.
korely_searchSearch by meaning over the stored memories, best match first.
korely_get_factsThe facts known about an end user, with point-in-time queries: as_of (what was true then) and known_as_of (what the store knew then).
korely_correct_factFix or end one fact by its id. Give a new subject, predicate or object and the old fact is closed and a corrected one is written, both kept in history. With close=true the fact is only closed, which is how you forget a fact. Needs a key with the memories:write permission.
korely_forget_memoryForget one memory by its id. It drops out of every read and the facts only it stated are closed; with erase=true it is removed for good. Needs memories:write.

Use it

Korely MCP sends its client short instructions: call korely_get_context before answering, and korely_add once a decision or preference is settled. If Claude Code follows them, a session looks like this (an example, not a recording):

You › Remember that this repo deploys to Hetzner, not Render.
→ korely_add("This repo deploys to Hetzner, not Render")
# next session, days later
You › How do we deploy this?
→ korely_get_context("deploy") → "This repo deploys to Hetzner..."
Claude › This repo deploys to Hetzner (you told me earlier), not Render. ...

Scoping

The four tools korely_get_context, korely_add, korely_search and korely_get_facts accept an optional user_id so one key can serve many end users: a read that names "user-b" never returns a memory written for "user-a". Omit it on a write and the memory belongs to no end user (a key confined to one end user writes to that one). Omit it on a read and the read covers every end user the key can see. korely_add and the three read tools also accept an optional agent_id. korely_correct_fact and korely_forget_memory take the id of a fact or a memory instead, and treat an id from another project (or, for a confined key, from another end user) as not found. The Korely MCP page lists every argument.

Why this is more than a notepad. Korely keeps each memory's text as written and also extracts typed facts with bi-temporal validity from it. When something changes ("this repo now deploys to Hetzner, not Render"), Korely closes the old fact with its end date instead of overwriting it, so korely_get_context returns what's true now, and as_of can still replay what was true before. The Cloud runs on servers in Helsinki; Data and governance says where text is processed.

Related