loading…
Search for a command to run...
loading…
Stop wasting tokens! CtxNest is a local-first context manager that bridges your files and AI agents (Claude, Cursor, Gemini). * 41 MCP Tools: The most advanced
Stop wasting tokens! CtxNest is a local-first context manager that bridges your files and AI agents (Claude, Cursor, Gemini). * 41 MCP Tools: The most advanced toolset for AI history & search. * Token Efficient: Agents fetch only what they need, saving you cost. * Time Travel: Revert any file to a previous version instantly. * Web Clipping: Save any webpage as clean Markdown.

The Local Brain & Hands for Your AI Coding Agents
CtxNest is a local-first Model Context Protocol (MCP) server that gives your AI coding agents — Claude Code, Cursor, Gemini, Antigravity — a persistent memory and a controlled command surface.
Instead of agents losing context between sessions or inventing their own shell commands, CtxNest provides:
ctxnest.json.Most AI tools trap context inside their own chat window. CtxNest moves that context to your own SSD, providing six core advantages:
ctxnest.json once; every agent uses the same validated tools and approval gates.est_tokens so agents can smartly budget what they pull into memory.CONTEXT.md or AI_NOTES.md files that clutter your PRs and get stale.CtxNest builds a closed feedback loop that makes every turn smarter than the last.
A markdown knowledge vault optimized for context-window economy.
est_tokens and size_bytes so agents can budget their context.A project-defined command surface that replaces "unrestricted shell access" with a sandboxed contract.
ctxnest.json. There is no unrestricted shell access.Closes the loop by capturing Hands' output and journaling learnings back into the Brain.
whats_new and diff_against_disk let agents see what actually changed.journal_append creates a timestamped record of decisions and results.Imagine you are switching from Claude Code to Cursor mid-way through a feature.
journal_append to log its decisions and the "why" behind the code.CtxNest doesn't try to replace your favorite agent; it gives it a better body.
| Capability | Standard AI Agents | CtxNest + Hands |
|---|---|---|
| Context Persistence | Volatile / Session-bound | Local SSD (SQLite FTS5) |
| Command Surface | Hardcoded by tool vendor | User-defined JSON contract |
| Execution Security | Implicit / Opaque | Explicit Sandbox (No-shell, strict env) |
| Agent Handoff | Manual copy-paste | Automated cross-agent state |
| Storage & Sync | Cloud-managed | Local-first / Git-synchronized |
The fastest way to try CtxNest is via npx. Add this to your MCP client configuration (e.g., mcpServers.json):
{
"mcpServers": {
"ctxnest": {
"command": "npx",
"args": ["-y", "ctxnest-mcp"],
"env": {
"CTXNEST_DATA_DIR": "/absolute/path/to/your/knowledge-vault"
}
}
}
}
For the full "Obsidian-meets-Terminal" UI, download the compose file, edit your volume mounts and environment variables (e.g., project paths), and run:
curl -fsSL https://raw.githubusercontent.com/safiyu/ctxnest/main/docker-compose.hub.yml -o docker-compose.yml
# Important: Open docker-compose.yml and edit the volumes section
# to mount your projects directory so the agent can see them.
docker compose up -d
The UI lands at http://localhost:3000.
In this demo:
No-install demo: Try the MCP endpoints interactively right from your browser on the Glama CtxNest page.
Why the high version number on a fresh repository? If you look at the commit history, you might wonder how a repository with so few commits reached its current major version.
CtxNest wasn't built over a weekend. It began over a year ago as a private, monolithic toolchain used to manage complex, multi-agent coding workflows. The versioning reflects its true architectural maturity.
Recently, I undertook a major effort to industrialize and modularize this engine, restructuring it into the three core pillars you see today: Brain, Hands, and Eyes. This process involved decoupling the core from private infrastructure and moving to a clean, open-source monorepo. The condensed git history is the result of this clean extraction—leaving behind internal legacy commits to publish only the battle-tested, production-ready framework available today.
get_history, get_diff, restore_file.ctxnest.json tools map.PATH, and hard timeouts.re2./docs page with a searchable catalogue of all 4core tools.ctxnest.json editor with live validation.[!TIP] Deleting a project file in CtxNest only un-indexes it from the AI's memory. Your physical source code is never touched.
CtxNest is a project for developers, by developers. If you'd like to contribute new tools, improve the core engine, or refine the dashboard, please see our CONTRIBUTING.md for architecture guidelines and local setup instructions.
Built with care for the future of agentic coding. License: Apache-2.0
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"ctxnest": {
"command": "npx",
"args": []
}
}
}