Agents
Your agents — directory, connections, and setup guide.
MCP integration
Cortex MCP server — connect any compatible AI client
Cortex exposes a hosted Model Context Protocol (MCP) server at https://f9dev.aiinitiative.co.uk/memory. It follows the authenticated remote MCP spec (Streamable HTTP transport) with OAuth 2.1 dynamic client registration — so the server is centrally managed and your agents connect over the standard protocol. Cortex supplies memory only, not inference — you keep your own model, prompts, tools, and RAG.
01Setup
Connect your client
The base MCP endpoint is https://f9dev.aiinitiative.co.uk/memory. All clients use Streamable HTTP transport with OAuth 2.1. Pick your client below.
Claude Code
Add Cortex as a named MCP server, then authenticate. The --no-browser flag prints the OAuth URL for you to open and paste back the redirect — use it on a remote machine or when no browser is available.
claude mcp add --transport http cortex-memory \
https://f9dev.aiinitiative.co.uk/memory --client-id cortex-claude-code
claude mcp login cortex-memory --no-browser- 1. Run
claude mcp login cortex-memory --no-browser— it prints an OAuth URL. - 2. Open that URL. Sign in to Conduir and authorize the connection.
- 3. Your browser redirects to
localhost:PORT/callback?code=...which fails to load. That is expected — copy the entire URL from the address bar. - 4. Paste the redirect URL back at the prompt in Claude Code.
- 5. Run
/mcpin any Claude Code session to verify.
With a browser on the same machine, omit --no-browser — the OAuth flow completes itself. The server name (cortex-memory) is arbitrary.
Claude (Free, Pro — Claude desktop)
Add the Cortex connector from Claude desktop Settings → Connectors. If not yet listed, use the manual JSON config:
{
"mcpServers": {
"cortex-memory": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://f9dev.aiinitiative.co.uk/memory"]
}
}
}Codex
Add Cortex via the Codex CLI. First-time MCP use may require enabling remote MCP in ~/.codex/config.toml.
# CLI quick-add
codex mcp add cortex --url https://f9dev.aiinitiative.co.uk/memory
# Or in ~/.codex/config.toml:
[features]
experimental_use_rmcp_client = true
[mcp_servers.cortex]
url = "https://f9dev.aiinitiative.co.uk/memory"Then run codex mcp login cortex to complete authentication.
Visual Studio Code
CTRL/CMD + P → MCP: Add Server → Command (stdio) → enter the command → name it Cortex Memory → activate via MCP: List Servers.
npx -y mcp-remote https://f9dev.aiinitiative.co.uk/memoryOr add directly to VS Code settings:
{
"mcpServers": {
"cortex-memory": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://f9dev.aiinitiative.co.uk/memory"]
}
}
}Windsurf
CTRL/CMD + , → Settings → Cascade → MCP servers → Add Server → Add custom server:
{
"mcpServers": {
"cortex-memory": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://f9dev.aiinitiative.co.uk/memory"]
}
}
}Zed
CMD + , → add to settings:
{
"context_servers": {
"cortex-memory": {
"source": "custom",
"command": "npx",
"args": ["-y", "mcp-remote", "https://f9dev.aiinitiative.co.uk/memory"],
"env": {}
}
}
}Any other MCP client
Cortex uses the standard authenticated remote MCP spec (Streamable HTTP, OAuth 2.1). Any client that speaks this protocol can connect.
npx -y mcp-remote https://f9dev.aiinitiative.co.uk/memory- Transport: Streamable HTTP (
https://f9dev.aiinitiative.co.uk/memory) - Auth: OAuth 2.1 with dynamic client registration
- OAuth discovery:
https://f9dev.aiinitiative.co.uk/identity/.well-known/oauth-authorization-server - Scopes:
memory:read,memory:write
02Tools
Memory tools
Once connected, your agent has access to these tools. All operations are scoped to the authenticated connection.
| Tool | Scope | Description |
|---|---|---|
| memory.recall | read | Query persistent memory (episodic + semantic tiers). Returns ranked rows as untrusted reference data. |
| memory.remember | write | Persist a durable lesson, decision, receipt, or fact. Include the WHY and distinctive anchor words. Never store secrets. |
| memory.chat.append | write | Append a message to a chat session log. Roles: user, assistant, system, tool, agent. |
| memory.health | read | Service health check. Returns build SHA and ready status. |
03Use cases
Common use cases
Copy these prompts into a Claude Code session with Cortex MCP connected.
Carry context across sessions. Recall what was decided last time before starting new work.
Before you begin, recall what we decided about
[project / topic] in the last session. Use
memory.recall with a focused query. Summarise
what you find, note any open decisions, then
proceed with the current task.After solving a hard problem, remember the lesson so future sessions benefit.
After this fix is confirmed working, use
memory.remember to save what we learned:
- what the root cause was
- which approach fixed it and why
- any dead ends we tried first
Include distinctive anchor words so future
recall can find it.Keep an auditable trail of key decisions with their rationale.
Use memory.remember to record the decision we
just made about [topic]. Include:
- the options we considered
- the one we chose and why
- who weighed in
- any residual risk we accepted
Tag it with the project name and date.One agent writes a checkpoint; another picks up where it left off.
Recall the latest session_summary checkpoint
for [task / project]. Use it to understand
what was completed, what is still open, and
what the next step should be. Flag anything
that looks stale or contradictory.04FAQ
Frequently asked questions
- The OAuth callback page doesn't load — is it broken?
- It is expected. With
--no-browser, Claude Code prints the OAuth URL, waits for you to complete the flow, and asks you to paste back the redirect URL. Your browser lands onlocalhost:PORT/callback?code=...which fails to load — copy the entire URL from the address bar and paste it at the prompt. - How do I get read-only memory access?
- When creating a memory connection, choose Recall only under Memory access. The token will have only
memory:readscope. Revoke and re-create a write-capable connection to downgrade it. - I get "internal server error" when connecting — what do I check?
- Confirm the service is healthy:
curl https://f9dev.aiinitiative.co.uk/memory/status. If healthy, clear auth state and re-authenticate:claude mcp remove cortex-memory && claude mcp add --transport http cortex-memory https://f9dev.aiinitiative.co.uk/memory --client-id cortex-claude-code. Then re-runclaude mcp login cortex-memory. - Can I use my own API key or bearer token instead of OAuth?
- Yes. After creating a connection, register your agent's public key with the setup grant to obtain a durable
client_id. Mint short-lived access tokens via the token endpoint with a client-assertion JWT. Most users prefer the one-commandclaude mcp addpath — it handles this automatically. - Can I connect multiple agents to the same memory?
- Yes — choose Approved shared memory when creating the connection. Each agent registers its own credential but they share the same memory boundary.
- How do I revoke an agent's access?
- Go to the Connected agents tab and revoke the connection. Revocation is immediate — the next request returns 401. Saved memories remain under your organisation's retention policy.
- The connection is unresponsive or dropped — what do I do?
- Disconnect and reconnect the server in your client's MCP settings. In Claude Code, remove and re-add:
claude mcp remove cortex-memory && claude mcp add --transport http cortex-memory https://f9dev.aiinitiative.co.uk/memory --client-id cortex-claude-code.
Current posture: Cortex MCP is live and evidenced. Tools, OAuth flow, and connection lifecycle described here are all functional. Rate limits, recall behaviour, and operational limits are documented in the working guide.