# ctxstore.ai — connect ctxstore is persistent shared memory for AI agents over MCP. Facts outlive the session and follow the person across models. Full manual (key grammar, wake ritual, recall, policies, coordination, collaboration): https://ctxstore.ai/llms-full.txt Any "llms.txt section N" you meet elsewhere means a numbered section of llms-full.txt. ## Connect URL: https://mcp.ctxstore.ai/mcp (Streamable HTTP). Auth: header `Authorization: Bearer emk_...` (the `Bearer ` prefix is mandatory), or OAuth 2.1. Claude Code claude mcp add --scope user --transport http ctxstore https://mcp.ctxstore.ai/mcp --header "Authorization: Bearer " Codex CLI codex mcp add ctxstore --url https://mcp.ctxstore.ai/mcp && codex mcp login ctxstore Gemini CLI gemini mcp add -s user -t http -H "Authorization: Bearer " ctxstore https://mcp.ctxstore.ai/mcp Grok CLI grok mcp add --transport http ctxstore https://mcp.ctxstore.ai/mcp --header "Authorization: Bearer " Copilot CLI copilot mcp add --transport http --header "Authorization: Bearer " ctxstore https://mcp.ctxstore.ai/mcp Cursor ~/.cursor/mcp.json: {"mcpServers":{"ctxstore":{"url":"https://mcp.ctxstore.ai/mcp","headers":{"Authorization":"Bearer "}}}} Codex signs in with your email in the browser. To use a key instead: echo 'export CTXSTORE_API_KEY=""' >> ~/.zshrc (or ~/.bashrc), open a new shell, then codex mcp add ctxstore --url https://mcp.ctxstore.ai/mcp --bearer-token-env-var CTXSTORE_API_KEY (if the variable is missing in the shell Codex runs in, the server is dropped silently). Gemini only enables the server in a folder you have trusted. Copilot shows header values as ****** in tool output; call setup_account(mode='reveal_key') for the key. Other clients: https://ctxstore.ai/for-agents#clients No key yet? Add the server without the header (Copilot: copilot mcp add --transport http ctxstore https://mcp.ctxstore.ai/mcp), then call setup_account(mode='link_or_create', email=...); a 6-digit code arrives by email; setup_account(mode='verify', code=..., email=...). The reply gives the exact command that writes the key into your MCP config. If you are a CLI or IDE agent with a shell, add the server yourself. Never paste a key into a chat message, and never store an emk_ key as a fact. Calling /mcp or /api/v1 directly? Send a real User-Agent header; default python-urllib is blocked at the edge. OAuth discovery: https://mcp.ctxstore.ai/.well-known/oauth-protected-resource https://ctxstore.ai/.well-known/oauth-authorization-server ## Core tools get_stats, wake_status what this session holds and what loaded store_fact(text, category) one fact; re-using key= supersedes and keeps history get_fact(key=...) the exact read that never misses search_facts(query) semantic recall store_session_summary the closing narrative for the next session ## Smoke test: does it persist? 1. store_fact(text="smoke test", category="technical", key="smoke:first-fact") returns a fact id. 2. Quit the client and open a fresh session. 3. get_fact(key="smoke:first-fact") returns "smoke test". An auth or setup prompt here, or no ctxstore tools in the tool list at all, means the key never reached your MCP config.