Memory for Cursor, VS Code and Codex agents through MCP

Give Cursor, VS Code (GitHub Copilot) and OpenAI Codex agents a memory per repository, checked against your code. One click or one command. Shares team notes with Claude Code through git.

Updated 2026-12-02

threadctx memory is a standard MCP server, so any agent that speaks MCP can use it. The agent gets three tools: memory_query to recall what is relevant before a task, memory_write to save a fix or decision, and memory_review to see what went stale. Every note is checked against the repository before the agent reads it.

Install in one click

Use the Add to Cursor or Install in VS Code button at the end of this page. Your editor asks you to confirm, then starts the server with npx (Node 20 or later).

Or add it by hand

Cursor: .cursor/mcp.json in the project, or ~/.cursor/mcp.json for every project.

{
  "mcpServers": {
    "threadctx": {
      "command": "npx",
      "args": ["-y", "threadctx", "mcp", "${workspaceFolder}"]
    }
  }
}

VS Code: .vscode/mcp.json in the project.

{
  "servers": {
    "threadctx": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "threadctx", "mcp", "${workspaceFolder}"]
    }
  }
}

${workspaceFolder} tells threadctx which project it is working on, because editors may start MCP servers outside the project folder. Clients that start servers in the project, such as Claude Code and Gemini CLI, can leave it out.

OpenAI Codex

Codex adds it with one command; the Codex CLI and IDE extension share the same configuration:

codex mcp add threadctx -- npx -y threadctx mcp

Or add it to ~/.codex/config.toml, or to .codex/config.toml in a trusted project:

[mcp_servers.threadctx]
command = "npx"
args = ["-y", "threadctx", "mcp"]

threadctx works on the folder its server starts in. If your notes end up in the wrong repository, add cwd = "/path/to/your/repo" to the [mcp_servers.threadctx] table.

Ask the agent to use it

The tool descriptions tell the agent to query before non-trivial work and to save after a non-obvious fix. To make it routine, add one line to AGENTS.md:

Before non-trivial work, call memory_query; after a non-obvious fix or decision, call memory_write.

One memory for every agent on the team

Team notes live in .threadctx/memory.json in the repository. A note Claude Code saved yesterday is the same note a Cursor or Copilot agent gets today, checked against today's code. Review changes in pull requests, and fail CI when notes drift:

npx threadctx memory check --team

Everything runs on your machine. No account, nothing uploaded, Apache-2.0.

Questions

Does it work with GitHub Copilot?

Yes, in VS Code agent mode, which supports MCP servers. Install it with the VS Code button or .vscode/mcp.json.

Does it work with OpenAI Codex?

Yes. Codex supports local MCP servers: run codex mcp add threadctx -- npx -y threadctx mcp, or add the [mcp_servers.threadctx] table shown above to config.toml. The Codex CLI and IDE extension share that configuration.

Do I need Claude Code?

No. The MCP server works on its own. Claude Code users can run npx threadctx setup instead, which adds a status line at the start of every session.

Where are my notes stored?

Personal notes in ~/.threadctx/local.json on your machine, team notes in .threadctx/memory.json in your repository. Nothing is uploaded.

Set it up now.

Free, local, nothing uploaded.

npx -y threadctx mcp

Or install in one click: