The server runs as devmemory mcp [--project <dir>] [--init] over stdio. It chooses its project in this order:
- the
--projectflag; - the
DEVMEMORY_PROJECTenvironment variable; - the nearest registered ancestor of the directory it was started in.
- Install:
npm i -g @vasikmansuri/devmemory(ornpm linkfrom a source checkout). - Initialize your project:
cd your-project && devmemory init - Register the server. For your own use:
To share it with your team via
claude mcp add --transport stdio devmemory -- devmemory mcp
.mcp.json:If you passclaude mcp add --scope project --transport stdio devmemory -- devmemory mcp
--env KEY=value, put another option such as--transport stdiobetween--envand the server name. Otherwise the CLI reads the name as another environment variable. - Verify: run
claude mcp listor/mcp. Project-scoped servers show⏸ Pending approvaluntil you startclaudeand approve them. - Save a memory: ask "Save to DevMemory: we use X because Y".
- Start a fresh session: exit Claude Code and run
claudeagain. - Retrieve it: ask a question about the topic. Claude calls
memory_contextormemory_search, and the answer cites the memory id and its provenance. - Check isolation: start a session in another initialized project and ask the same question. The search returns 0 results.
Tested by:
- running
claude -psessions with--mcp-config .mcp.json --strict-mcp-config; - a save in session 1, then a new session that retrieved it;
- a session in a second project that returned 0 results.
Claude Code starts stdio servers in the directory where claude was launched (it also sets CLAUDE_PROJECT_DIR). DevMemory walks up from there to the registered root, so the shared config above works from any subdirectory.
Put this in .cursor/mcp.json (project) or ~/.cursor/mcp.json (global), following Cursor's documented format:
{
"mcpServers": {
"devmemory": {
"type": "stdio",
"command": "devmemory",
"args": ["mcp", "--project", "${workspaceFolder}"]
}
}
}To verify, find the server under Customize in Cursor's sidebar. Then open the Output panel (Cmd/Ctrl+Shift+U) and select MCP Logs to see the connection. No Cursor CLI was available, so this setup has not been exercised end to end.
All tools validate their inputs with Zod and declare output schemas. Errors come back as isError: true with a body of {"error": {"code", "message", "hint?"}}.
| Tool | Notes |
|---|---|
memory_save |
supersedes replaces an existing memory. The result includes possibleConflicts. |
memory_search |
Default status filter is active. Maximum 50 results. |
memory_get |
includeHistory adds the audit trail. |
memory_update |
Previous values are kept in the audit trail. |
memory_forget |
Archives by default. mode: "delete" also needs confirm: true. |
memory_list |
Paginated with limit and offset. |
memory_context |
maxTokens from 100 to 16,000, default 2,000. |
memory_link |
Creates a typed link between two memories. |
memory_stats |
Counts and retrieval info for the project. |