MCP setup
The Model Context Protocol (MCP) is how Engrym integrates with AI coding agents. Once the MCP server is wired, your agent — Claude Code, Cursor, or any MCP-compatible client — automatically surfaces project context, queries the Brain, logs decisions, and broadcasts intents on your behalf.
What is MCP?
MCP is a JSON-RPC protocol developed by Anthropic that lets an AI agent talk to external tools. The agent sees a list of available tools (with descriptions), picks the right one for the user's request, and invokes it. Engrym ships an MCP server with tool descriptions written as agent-facing prompts — the model reads them directly and decides when to use each tool.
Install the MCP server
The MCP server ships separately from the CLI. Install via npx for one-off use, or globally for persistent agent wiring:
npm install -g @engrym/mcp-server
Wire into Claude Code
Add the Engrym MCP server to your Claude Code mcp_servers.json config:
{
"mcpServers": {
"engrym": {
"command": "engrym-mcp",
"args": ["serve"],
"env": {
"ENGRYM_PROJECT_ROOT": "${workspaceFolder}"
}
}
}
}
Restart Claude Code. The agent now has access to Engrym tools: brain_query, doc_read, doc_write, decision_log, intent_broadcast, conflict_resolve, and more.
Wire into Cursor
Cursor's MCP integration is similar; add the same JSON shape to Cursor's MCP settings panel. The ENGRYM_PROJECT_ROOT env var should point to your workspace root.
Wire into any MCP client
The Engrym MCP server speaks standard MCP. Any client that implements the protocol can connect. The engrym-mcp init command writes the canonical config snippet for popular clients:
engrym-mcp init claude-code
engrym-mcp init cursor
engrym-mcp init custom
Verifying the wire
After restarting your agent, ask it a question about your project:
"What's our provider strategy?"
If the wire is healthy, the agent invokes brain_query against the Engrym MCP server, surfaces the relevant atoms, and answers from project truth — not from training-set memory.
What tools does the MCP server expose?
The MCP server exposes the same surface as the REST API, written as agent-facing tool descriptions. The full inventory lives in API reference; the high-level categories are:
- Brain — query, search, list atoms; create atoms from extracted text.
- Documents — list, read, write, delete, move project docs.
- Decisions — log, list, query decisions by tag or date.
- Intents — broadcast intent on a doc/module; list active intents.
- Conflicts — list conflicts; resolve a conflict; trigger conflict detection.
- Watcher — list watcher insights; mark insight resolved.
Troubleshooting
- Agent doesn't see Engrym tools: restart the agent after editing the MCP config. Some agents cache the tool list aggressively.
engrym-mcpnot found: ensure the global install completed (which engrym-mcpshould print a path).- Wrong project context: set
ENGRYM_PROJECT_ROOTto the absolute path of your project, not a relative path.
Next steps
- API reference — the full tool inventory, REST shapes.
- CLI reference — CLI commands that mirror the MCP tool surface.