Threadctx MCP logo

Threadctx MCP

by threadctx-dev

Shared repository memory for coding agents, with local JSON storage, optional cloud search, and tools for saving and retrieving team knowledge.

Install Threadctx MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "threadctx-dev-threadctx-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "threadctx-mcp"
      ],
      "env": {
        "THREADCTX_API_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env THREADCTX_API_KEY=YOUR_VALUE_HERE --transport stdio threadctx-dev-threadctx-mcp -- npx -y threadctx-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

npx -y threadctx-mcp

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

threadctx-dev/threadctx-mcp MCP server gives coding agents shared, repository-scoped memory through `memory_write` and `memory_query`. It runs locally by default with a JSON file and keyword matching, or in cloud mode with shared storage and semantic search. Use it when agents or teammates need to preserve decisions, fixes, and recurring gotchas across work sessions. The package also adds memory-use instructions to supported project rule files and can extract reusable knowledge from git history.

Use cases

  • Record architectural decisions for future agents
  • Retrieve fixes before changing incident-prone services
  • Share repository-specific gotchas across teammates
  • Capture reusable knowledge from merged commits

Key features

  • Repository-scoped memory
  • Local JSON storage
  • Optional cloud semantic search
  • MCP tools for writing and querying memory
  • Automatic agent rule instructions
  • Optional git-history capture

Tools2

What Threadctx MCP lets your agent do. Expand a tool for its parameters.

Verified live~276 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/14 checks healthy over the last 117d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 14d ago via OSV.dev · threadctx-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads258Package downloads in the last 30 days.
Last commit4mo agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.
Tools exposed2Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Threadctx MCP works

What threadctx-dev/threadctx-mcp MCP server does

threadctx-dev/threadctx-mcp MCP server provides two MCP tools for retaining engineering knowledge per repository. memory_write stores a decision, fix, learning, or gotcha, while memory_query searches previous entries for a task description. The intended workflow is to query before risky or repeated work and write after discovering information that could help another agent or teammate.

The server identifies the current repository from its Git remote unless configured otherwise. In local mode, entries are stored as plain JSON at ~/.threadctx/local.json. In cloud mode, memory is shared across people working on the repository and uses semantic search through threadctx.dev or a self-hosted deployment.

How it works

The default local mode needs no signup and has no native dependencies. It uses keyword matching and makes no network calls beyond the LLM provider used by an agent. Cloud mode requires a threadctx API key and provides shared team storage with semantic search.

On its first start in a project, threadctx-dev/threadctx-mcp MCP server adds a small instruction encouraging agents to query memory before work and write useful findings afterward. It can update AGENTS.md, CLAUDE.md, and Cursor rules, and conditionally creates instructions for Copilot, Windsurf, Cline, or Gemini CLI when their project footprints are present. The server also sends the instruction in the MCP initialization response. Rule updates are idempotent, and automatic changes can be disabled.

The optional capture command reads commits since its previous run, asks the configured Anthropic or OpenAI provider to identify reusable knowledge, removes duplicates, and stores the remaining entries. Capture is disabled by default and sends data directly to the selected provider rather than through threadctx services.

Setup and configuration

Run npx threadctx-mcp with Node.js 18 or newer for local mode. npx threadctx-mcp init creates committable .threadctx.json, .mcp.json, and .cursor/mcp.json files. npx threadctx-mcp join helps a teammate configure another MCP client. Cloud mode can be initialized with --mode=cloud --api-key=...; the key is read at runtime from THREADCTX_API_KEY and is not written to committed files.

Useful settings include:

  • THREADCTX_MODE: selects local or cloud.
  • THREADCTX_API_KEY: supplies the cloud credential.
  • THREADCTX_API_URL: changes the cloud endpoint, including for self-hosting.
  • THREADCTX_REPO: overrides Git-based repository detection.
  • THREADCTX_DB_PATH: changes the local JSON path.
  • THREADCTX_NO_AUTO_RULES=1: disables automatic rule injection.
  • THREADCTX_CAPTURE_ENABLED=1: enables LLM-backed capture.

Tools and capabilities

threadctx-dev/threadctx-mcp MCP server exposes:

  • memory_write(content, tags?) for saving repository-specific knowledge.
  • memory_query(task_description, max_results?) for retrieving relevant entries.
  • init, join, and list commands for setup and local inspection.
  • capture commands for optional commit-history extraction, previews, date or tag ranges, and GitHub Actions workflow scaffolding.

Limitations and notes

Local storage is machine-local, so it is not automatically shared with teammates. Shared cross-user memory requires cloud mode or a self-hosted deployment. Semantic search is a cloud-mode feature; local matching is keyword-based. Automatic capture can incur charges from the configured LLM provider and remains off unless explicitly enabled or forced. The server writes or updates project rule files unless that behavior is disabled with THREADCTX_NO_AUTO_RULES=1 or --no-rules during initialization.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Threadctx MCP

threadctx-dev/threadctx-mcp is an MCP server that connects coding agents to repository-scoped team memory. Its main tools are `memory_write`, which stores decisions, fixes, and gotchas, and `memory_query`, which retrieves relevant prior knowledge. It supports local JSON storage or optional cloud-backed shared memory.

Run `npx threadctx-mcp` with Node.js 18 or newer. For project setup, run `npx threadctx-mcp init`; it creates configuration files for Claude Code and Cursor. Teammates using other MCP clients can run `npx threadctx-mcp join`.

Yes, threadctx-dev/threadctx-mcp works with Cursor using the same MCP package and configuration shape as Claude Code. `init` creates `.cursor/mcp.json` and `.cursor/rules/threadctx.mdc`; you can also add the server through Cursor settings.

Set `THREADCTX_MODE=cloud` and provide `THREADCTX_API_KEY` at runtime, or run `npx threadctx-mcp init --mode=cloud --api-key=...`. Cloud mode shares memory across the repository team and supports semantic search.

Set `THREADCTX_NO_AUTO_RULES=1` to disable automatic rule injection when the server starts. For an initialization command, use `npx threadctx-mcp init --no-rules`.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewThreadctx MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/threadctx-dev-threadctx-mcp?style=directory)](https://allmcps.com/mcp/threadctx-dev-threadctx-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/threadctx-dev-threadctx-mcp"><img src="https://allmcps.com/api/badge/threadctx-dev-threadctx-mcp?style=directory" alt="Threadctx MCP on AllMCPs" /></a>