Connect your coding agent
Memory, Context, and Hub each run an MCP server. Connect the three servers to your coding agent, and each new session can start from the project's recorded decisions.
What your agent gets
| Service | Server command | What the agent can do |
|---|---|---|
| Memory | ksmem serve |
Read the project's working context. Search, create, and update stones, the records that hold decisions, tasks, and evidence. |
| Context | ksctx ctx mcp serve |
Search the repository and build measured context packs. |
| Hub | kshub serve |
Ask one or more models, run review panels, and inspect routes, executions, and costs. |
Claude Code
-
Go to the root of the repository.
-
Preview the context setup:
ksctx onboard --harness claude --dry-run -
Write the context scaffold, and add the
ksctxandksmemservers to.mcp.json:ksctx onboard --harness claude -
Create Hub's settings for this repository in
.keystone/hub.yaml:kshub init -
Register Hub in Claude Code's local MCP settings:
kshub onboard claude-code -
Start
claudein the repository. When Claude Code asks, approve the project's MCP servers. -
Run
/mcp. Make sure that all three servers are connected.
Codex
-
Add these entries to
~/.codex/config.toml:[mcp_servers.ksmem] command = "ksmem" args = ["serve"] [mcp_servers.ksctx] command = "ksctx" args = ["ctx", "mcp", "serve", "--tool-name-profile", "openai-direct"] [mcp_servers.kshub] command = "kshub" args = ["serve"] -
If Codex cannot find a command, use its full path. Keystone installs its commands in
~/.keystone/toolchain/active/bin.
To write the Memory and Hub entries for you, run ksmem onboard --harness codex and kshub onboard codex.
Other agents
ksmem onboard also supports Cursor, Windsurf, Gemini, VS Code, and a generic MCP client. Use one of --harness claude|cursor|windsurf|codex|gemini|vscode|generic.
Any MCP client that can start a local command can run the three servers.
Tell the agent how to use Keystone
Add this section to the project's AGENTS.md or CLAUDE.md:
## Keystone
- At the start of a session, run `ksmem show context` to see active work and recent decisions.
- Record decisions and open work as stones with `ksmem` commands. Direct edits to files under `.keystone/` bypass validation.
Check the connection
-
Ask your agent what Keystone's memory says about the project. The agent should call Memory's context tool and answer from the result.
-
To see the same result yourself, run:
ksmem show context
Example output, trimmed:
MEMORY scope=shared shared=git:.keystone/stones local=gitignored:.keystone/local
COUNTS open=12 in_progress=1 closed=40 archived=3
ACTIVE k3v9qa p=p1 "Add rate limiting to the export API"
RECALL inspect: ksmem search stones <query> | ksmem show stone <id>
Each line tells the agent what exists, what is active, or which command to run next.