{
  "markdown": "<!-- mcp-name: io.github.contextstream/mcp-server -->\n\n<p align=\"center\">\n  <img src=\"assets/contextstream-logo.png\" alt=\"ContextStream\" width=\"112\" />\n</p>\n\n<h1 align=\"center\">ContextStream MCP Server</h1>\n\n<p align=\"center\">\n  <em>Intelligence without context is unreliable. Autonomy without context is chaos.<br/>\n  And context without trust becomes surveillance.</em>\n</p>\n\n<p align=\"center\">\n  <strong>Give every coding agent persistent memory, semantic code search, and the right project context on every turn.</strong>\n</p>\n\n<p align=\"center\">\n  Works with Claude Code, Cursor, VS Code + Copilot, Windsurf, Cline, Roo Code, Kilo Code, Codex, OpenCode, Aider, Antigravity, and other MCP clients.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@contextstream/mcp-server\"><img src=\"https://img.shields.io/npm/v/@contextstream/mcp-server.svg\" alt=\"npm version\" /></a>\n  <a href=\"https://github.com/contextstream/mcp-server/releases/latest\"><img src=\"https://img.shields.io/github/v/release/contextstream/mcp-server\" alt=\"latest release\" /></a>\n  <a href=\"https://github.com/contextstream/mcp-server/actions/workflows/ci.yml\"><img src=\"https://github.com/contextstream/mcp-server/actions/workflows/ci.yml/badge.svg\" alt=\"CI status\" /></a>\n  <a href=\"LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"MIT license\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"#install-in-30-seconds\"><strong>Install in 30 seconds</strong></a> ·\n  <a href=\"https://contextstream.io/benchmarks\">Benchmarks</a> ·\n  <a href=\"https://contextstream.io/docs/mcp\">Documentation</a> ·\n  <a href=\"https://contextstream.io/signup\">Start free</a>\n</p>\n\n---\n\nYour AI should not have to rediscover the repository, re-learn the architecture,\nor repeat last week's mistake every time a chat starts. ContextStream gives MCP\nclients a shared context layer that remembers decisions and lessons, searches\ncode by meaning, maps dependencies, and restores the thread after compaction.\n\nThe server in this repository is the canonical, MIT-licensed Rust\nimplementation. The recommended editor transport is the hosted MCP at\n`https://mcp.contextstream.io/mcp`; a small local helper keeps explicitly linked\ncheckouts in sync.\n\n## Benchmarks: strong memory, strong retrieval, published methodology\n\nWe publish the full method, confidence intervals, comparison caveats, and known\nlosses—not just the winning number. The product-level figures below are from\nthe published July 2026 report; the LongMemEval-S result was published June 14,\n2026.\n\n| Benchmark | ContextStream result | What was measured |\n|---|---:|---|\n| **LongMemEval-S** | **90.0%** | 450/500 correct on the full suite; ~115k-token multi-session histories; official pinned GPT-4o judge; `gpt-5.5` reader with self-consistency `k=3` (89.6% single-shot); Wilson 95% CI [87.1%, 92.3%] |\n| **Pinned-repo code search** | **99.38% Recall@10** | 93.83% Primary@10 and 95 ms successful-response p50 over 177 judged-valid queries, averaged across two cold and two warm runs; 0/708 failed requests; no local checkout |\n| **Agentic project memory** | **96% task success** | Up from 58% without the memory layer; one repository, one agent model, three trials per cell, so this result is directional |\n\nOn the standard memory benchmark, 90.0% is statistically above supermemory's\npublished 85.4% and statistically tied with Zep's published 90.2%. Those\ncomparisons use each vendor's published result; they are not presented as a\nprivate same-run head-to-head.\n\n**[Read the full benchmark report, methodology, per-category results, and losses →](https://contextstream.io/benchmarks)**\n\nThe repository also includes Criterion suites for JSON-RPC parsing, tool\ndispatch, response serialization, and stdio/HTTP transport primitives. Run\nthem locally with `cargo bench --locked -p mcp-server`.\n\n## Install in 30 seconds\n\nPick the command for your platform. Each installer downloads the current native\nrelease and launches the guided setup wizard.\n\n### macOS and Linux\n\n```bash\ncurl -fsSL https://contextstream.io/scripts/setup.sh | bash\n```\n\nNative releases are published for macOS Apple Silicon and Intel, plus Linux\nARM64 and x64.\n\n### Windows PowerShell\n\n```powershell\nirm https://contextstream.io/scripts/setup.ps1 | iex\n```\n\nThe Windows installer uses the native x64 binary and installs it in your user\nprofile, so it does not need an administrator shell.\n\n### npm alternative (Node.js 20+)\n\n```bash\nnpx -y @contextstream/mcp-server@latest setup\n```\n\nThe dependency-free npm launcher selects the matching release artifact,\nverifies its SHA-256 checksum, caches it by exact package version, and starts\nthe Rust binary. It supports macOS ARM64/x64, Linux ARM64/x64, and Windows x64.\n\n### What the wizard does\n\nThe wizard signs you in, detects supported editors, writes their hosted MCP\nconfiguration and managed rules, installs lifecycle hooks where supported,\nlinks the exact project folder you choose, starts indexing, and checks the\nresult. You review the choices before it makes changes.\n\nAfter setup, restart the editor and try:\n\n> Use ContextStream to summarize this repository, cite the files you relied on,\n> and tell me one active decision or risk that should affect my next change.\n\nWant to inspect the changes first? Every setup write can be previewed:\n\n```bash\ncontextstream-mcp setup --dry-run\n```\n\nAlready configured and troubleshooting? Run:\n\n```bash\ncontextstream-mcp doctor --scope=all --only-configured\n```\n\n## No-install hosted connection\n\nIf your MCP client supports Streamable HTTP and OAuth, connect directly—there\nis no local MCP process to keep running:\n\n```json\n{\n  \"mcpServers\": {\n    \"contextstream\": {\n      \"type\": \"http\",\n      \"url\": \"https://mcp.contextstream.io/mcp\"\n    }\n  }\n}\n```\n\nSome clients use a different root key or config format, which is why the setup\nwizard is the easiest path. The hosted gateway is the default; the installed\nhelper only syncs the local checkouts you explicitly link.\n\nClients that require stdio can use the verified npm launcher:\n\n```json\n{\n  \"mcpServers\": {\n    \"contextstream\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@contextstream/mcp-server@latest\"],\n      \"env\": {\n        \"CONTEXTSTREAM_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\nFor production automation, pin an exact 1.x package version instead of\n`latest`.\n\n## What your agent gets\n\n| Capability | What changes in practice |\n|---|---|\n| **Grounded context** | Each turn starts with the relevant workspace rules, prior decisions, lessons, and current project state. |\n| **Semantic code search** | Find implementations by intent, with hybrid, keyword, pattern, exhaustive, and refactor-aware modes when precision matters. |\n| **Durable memory** | Decisions, plans, tasks, runbooks, preferences, and session transcripts remain queryable across chats and tools. |\n| **Compaction survival** | Important state is checkpointed before long conversations compact and restored afterward. |\n| **Dependency intelligence** | Trace blast radius, dependencies, circular imports, complexity, and unused code without manually rebuilding the graph. |\n| **Agent handoffs** | Package verified state and next steps into durable handoffs and portable ContextCapsules. |\n| **Team context** | Bring shared workspace knowledge and supported GitHub, Slack, and Notion context into the same MCP surface. |\n\nThe default tool surface is grouped into focused domains—`context`, `search`,\n`memory`, `session`, `graph`, `entity`, `capsule`, `project`, `workspace`,\n`skill`, `media`, `vcs`, and more—so agents get broad capability without an\nenormous tool-registration prompt.\n\n## Supported editors and agents\n\nThe wizard currently detects and configures:\n\n- Claude Code\n- Cursor\n- Windsurf\n- VS Code + GitHub Copilot\n- Cline\n- Kilo Code\n- Roo Code\n- OpenAI Codex\n- Aider\n- Antigravity\n- OpenCode\n\nAnything else that speaks the Model Context Protocol can connect to the hosted\nURL or use the stdio launcher.\n\n## What is open source?\n\nThis repository contains the canonical Rust MCP server, protocol types, client\nand session layers, editor setup, hooks, public transport code, release\nautomation, and the MongoDB-free acceleration foundation. It builds as seven\nworkspace crates:\n\n- `mcp-server`\n- `mcp-tools`\n- `mcp-client`\n- `mcp-session`\n- `mcp-types`\n- `mcp-model-registry`\n- `mcp-acceleration-products`\n\nThe hosted backend, credentials, production deployment configuration, and\npremium provider implementations are not included. Public-build compatibility\ntraits remain no-op so the core protocol surface stays stable. See\n[`docs/architecture.md`](docs/architecture.md) for the boundary.\n\n## Privacy and data controls\n\nSetup shows a disclosure before changing editor configuration or indexing a\nproject. You choose the folder and workspace relationship; only matching source\nfiles from a validated project can be indexed. Transcript capture, local Git\nmetadata capture, ignore rules, kill switches, retention behavior, and deletion\npaths are documented in [`docs/data-handling.md`](docs/data-handling.md).\n\nReview that document before using `setup --yes` in automation. The CLI also\nprovides `--dry-run` for setup, repair, migration, and uninstall workflows.\n\n## Build and test from source\n\nThe workspace uses the Rust toolchain pinned in `rust-toolchain.toml`.\n\n```bash\ncargo build --locked -p mcp-server --bin contextstream-mcp\ncargo test --locked --workspace\ncargo bench --locked -p mcp-server\n```\n\nTo build the hosted HTTP gateway foundation:\n\n```bash\ncargo build --locked --release -p mcp-server --bin contextstream-mcp \\\n  --features remote-acceleration\n```\n\n## Release integrity\n\nEvery release publishes native binaries, `checksums.txt`, `version.json`, and\nan SPDX SBOM. The npm launcher downloads only from the immutable path for its\nexact package version, verifies manifests and binary SHA-256, uses an atomic\nversioned cache, and supports verified offline reuse with\n`CONTEXTSTREAM_MCP_OFFLINE=1`.\n\nSee [`docs/release.md`](docs/release.md) for the release contract and\n[the latest GitHub release](https://github.com/contextstream/mcp-server/releases/latest)\nfor artifacts.\n\nAll 1.x npm releases preserve these executable aliases:\n\n- `mcp-server`\n- `contextstream-mcp`\n- `contextstream-hook` (forwards to the Rust `hook` subcommand)\n\n## Contributing and security\n\nIssues and pull requests are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md),\n[SECURITY.md](SECURITY.md), and [GOVERNANCE.md](GOVERNANCE.md). Contributions\nmust include the Developer Certificate of Origin sign-off (`git commit -s`).\n\nThe code is MIT licensed. ContextStream trademarks and the hosted-service\nboundary are described in [NOTICE](NOTICE).\n\n---\n\n<p align=\"center\">\n  <strong>Stop teaching your coding agent the same project twice.</strong><br />\n  <a href=\"#install-in-30-seconds\">Install ContextStream</a> ·\n  <a href=\"https://contextstream.io/signup\">Start free</a> ·\n  <a href=\"https://contextstream.io/docs/mcp\">Read the docs</a>\n</p>\n",
  "bytes": 10986,
  "sha": "5addb0b8344038221269a51b5ef222c941fa640e9aeb955edb30ea1aface4091",
  "repo_slug": "contextstream/mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_contextstreamio_mcp_server_4aa1c6fa/readme"
}