ContextPocket MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ContextPocket MCP ServerSearch for known issues with Windows packaging"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ContextPocket
Persistent local project memory for AI coding agents.
Your coding agent forgets. ContextPocket remembers.
ContextPocket gives Codex, Claude Code, Cursor, and other MCP-compatible coding agents a small, durable memory beside each repository. It keeps architecture decisions, preferences, known issues, failed approaches, and unfinished tasks available across sessions without turning your project into a cloud knowledge base.
Local by default. No account. No telemetry. No LLM API key. No vector database.
Why ContextPocket?
A new coding-agent session often starts with the same expensive conversation:
Which framework did we choose?
Which approach already failed?
What constraints must not be violated?
What bug is still open?
What should I continue next?
ContextPocket stores only the durable answers.
Session 1
You: "Use SQLite. Keep this project local-first. Do not add LangChain."
Agent -> ContextPocket: saves three durable memories
...three days later...
Session 2
Agent -> ContextPocket: reads project context
Agent: "I know this project uses SQLite, stays local-first, and avoids LangChain."Related MCP server: io.github.silversurfer562/memdocs
What it stores
Five deliberately small memory types:
Type | Example |
| Use SQLite instead of PostgreSQL |
| Avoid LangChain in this repository |
| Windows packaging fails on non-ASCII paths |
| Add drag-and-drop PDF import |
| Authentication code lives under |
Memories also have importance, tags, lifecycle state, source, timestamps, and an optional supersedes link for replacing an old decision without erasing history.
Quick start
1. Clone and install
Core CLI only:
python -m pip install -e .CLI + MCP support:
python -m pip install -e ".[mcp]"For isolated global CLI installation, pipx or uv tool also work with a Git checkout or a future PyPI release.
2. Initialize a repository
cd your-project
contextpocket initThis creates local storage under:
.contextpocket/
config.toml
context.dbIf the directory is a Git repository, ContextPocket adds /.contextpocket/ to .git/info/exclude so local memory is not normally committed.
3. Save durable context
contextpocket remember \
"Use SQLite because the project must stay local-first." \
--title "Database choice" \
--type decision \
--importance 5 \
--tag architecture \
--tag database4. Search it later
contextpocket search "database"5. Rehydrate a new agent session
contextpocket summaryExample output:
# Project Context
## Important Decisions
- **Database choice** — Use SQLite because the project must stay local-first.
## Preferences & Constraints
- **Dependency policy** — Do not add LangChain.
## Open Issues
- **Windows packaging** — Non-ASCII install paths still fail.CLI
contextpocket init [path]
contextpocket status
contextpocket remember <content> [options]
contextpocket search <query>
contextpocket list
contextpocket show <id>
contextpocket update <id> [options]
contextpocket resolve <id>
contextpocket archive <id>
contextpocket summary [--output FILE]
contextpocket export FILE.json
contextpocket doctorRun contextpocket <command> --help for command-specific options.
MCP
Install the optional MCP extra, initialize the target project, and configure the host to launch:
contextpocket-mcpfrom that repository's working directory. If a host cannot set cwd, set:
CONTEXTPOCKET_PROJECT=/absolute/path/to/projectAvailable MCP tools:
memory_addmemory_searchmemory_listmemory_getmemory_resolveproject_context
Available resources:
contextpocket://project/summarycontextpocket://project/decisionscontextpocket://project/issues
See docs/mcp-setup.md for the configuration shape and agent guidance.
Memory quality matters more than memory quantity
ContextPocket is not a transcript archive and does not automatically ingest your repository.
Save things that will still matter in another session:
architecture decisions
implementation constraints
durable user/team preferences
failed approaches worth avoiding
known bugs and risks
unfinished tasks
Do not save:
raw terminal logs
whole source files
every command executed
casual conversation
duplicate facts
secrets
Search without embeddings
v0.1.0 uses SQLite FTS5 plus importance/lifecycle filtering. The deterministic core needs no model download, vector service, embedding API, or internet connection.
This is intentional. Semantic search may become an optional future capability, but simple installation and predictable behavior come first.
Memory lifecycle
Project truth changes. ContextPocket keeps history without feeding stale decisions back to the agent:
active -> resolved
active -> superseded
active -> archivedWhen replacing a decision, save the new memory with --supersedes <old-id>. The old record becomes superseded; the new one becomes the active context.
Privacy
ContextPocket core makes no network requests and includes no telemetry or account system. Common credential patterns are rejected before persistence.
Secret detection is defense in depth, not encryption. v0.1.0 does not encrypt context.db at rest. Anyone with filesystem access to the database may be able to read it.
See docs/privacy.md and SECURITY.md.
Architecture
flowchart TD
A[Codex / Claude Code / Cursor] -->|MCP stdio| B[MCP adapter]
C[CLI] --> D[Memory service]
B --> D
D --> E[Memory rules]
D --> F[Repository]
F --> G[(SQLite + FTS5)]The MCP layer is intentionally an adapter. Storage and business rules work independently of the MCP SDK.
See docs/architecture.md.
Development
python -m pip install -e ".[dev]"
pytest
python scripts/smoke_test.pyTo exercise the real MCP adapter too:
python -m pip install -e ".[dev,mcp]"
pytestCI covers Python 3.10–3.13 on Ubuntu, Windows, and macOS.
Project status
v0.1.0 is an alpha release focused on one job: reliable local project memory.
Not in v0.1.0:
cloud sync
accounts or teams
web dashboard
desktop GUI
repository-wide code indexing
automatic embeddings
vector databases
LLM-generated summaries
The narrow scope is intentional.
Contributing
Bug reports, docs fixes, tests, and focused improvements are welcome. Read CONTRIBUTING.md before opening a PR.
License
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Persistent memory layer that saves and recalls your project context and preferences.
Cross-tool persistent memory and context for AI assistants over MCP.
Persistent memory for AI agents — log and recall conversation context over MCP.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides durable project context for coding agents, including project maps, session history, and explicit memories, all stored locally.43 npm7MIT
- AlicenseNot gradedqualityCmaintenanceProvides persistent, project-specific memory to AI assistants via the Model Context Protocol, enabling context-aware collaboration across sessions without cloud dependencies.1Apache 2.0
- AlicenseNot gradedqualityBmaintenanceProvides long-term local memory for AI coding agents via MCP, enabling persistent recall of preferences and project facts across chat sessions.1MIT
- AlicenseBqualityCmaintenanceProvides persistent local memory for AI coding sessions, enabling agents to save and retrieve project context across different tools and sessions.16MIT