-
-
Notifications
You must be signed in to change notification settings - Fork 1
Claude Code Integration
Complete guide for connecting MCP Local Memory Service to Claude Code — Anthropic's CLI AI agent.
- Node.js 20+ installed
-
Claude Code installed (
npm install -g @anthropic-ai/claude-code) - Internet access for first-time setup (embedding model downloads once)
Suitable for a first try. Each time Claude Code starts, npx will run the package from npm:
claude mcp add --transport stdio --scope project local-memory -- npx -y @vheins/local-memory-mcpInstall the package permanently — faster startup, no re-download:
npm install -g @vheins/local-memory-mcp
claude mcp add --transport stdio --scope project local-memory -- local-memory-mcpIf your project already has a package.json:
npm install --save-dev @vheins/local-memory-mcp
claude mcp add --transport stdio --scope project local-memory -- npx @vheins/local-memory-mcpUse --scope as needed:
| Scope | File | Shared? | Best for |
|---|---|---|---|
project |
.mcp.json in project root |
Yes (via git) | All team members share the same memory |
local |
~/.claude.json |
No | Just for you |
user |
~/.claude.json (global) |
No | You across all projects |
Example:
# Just for you, in this project
claude mcp add --transport stdio --scope local local-memory -- npx -y @vheins/local-memory-mcp
# All team members
claude mcp add --transport stdio --scope project local-memory -- npx -y @vheins/local-memory-mcpclaude mcp listOutput:
local-memory (project) — running
Tools: memory-read, memory-write, task-read, ...
Inside Claude Code, /mcp shows the local-memory server with its available tools. Test the connection by asking:
"Check local memory for this project"
If Claude responds with "No memory found" (not an error), the connection is successful.
If you prefer to edit the .mcp.json file directly (e.g. for version control), create the file in the project root:
{
"mcpServers": {
"local-memory": {
"command": "npx",
"args": ["-y", "@vheins/local-memory-mcp"],
"type": "stdio"
}
}
}Or for global install:
{
"mcpServers": {
"local-memory": {
"command": "local-memory-mcp",
"type": "stdio"
}
}
}The server detects the active repository automatically from the current working directory and any MCP workspace roots (it also reads the git remote to infer the owner). You can override storage or ports during registration:
claude mcp add --transport stdio --scope project \
--env STORAGE_PATH=/custom/path \
local-memory -- npx -y @vheins/local-memory-mcpOr in .mcp.json:
{
"mcpServers": {
"local-memory": {
"command": "local-memory-mcp",
"args": [],
"env": {
"PORT": "3456"
}
}
}
}| You say | Claude does |
|---|---|
| "Claude, check pending tasks for this project." | calls task-read and displays the tasks to work on |
| "Note that we decided to use Prisma ORM because it's more mature." | calls memory-write with type decision
|
| "What do we know about authentication in this project?" | calls memory-read (and synthesize if it needs an LLM-grounded answer) |
| "Task LOGIN-001 is done, commit is at abc123." | calls task-write with status completed
|
Claude Code can also run the web dashboard:
# From CLI (separate from Claude Code)
npx @vheins/local-memory-mcp dashboard
# Open http://localhost:3456Or ask Claude to run it — keep in mind Claude Code must remain running in a separate terminal.
-
"local-memory" not found in
/mcp: check withclaude mcp list, then re-register:claude mcp remove local-memoryandclaude mcp add --transport stdio --scope project local-memory -- npx -y @vheins/local-memory-mcp. -
Server crashes / disconnected: check the error log with
claude mcp get local-memory, or run directly to see errors:npx -y @vheins/local-memory-mcp. -
Tools not showing even though server is running: Claude Code supports
list_changednotifications, so new tools should appear automatically; if not, refresh with/mcpor restart Claude Code. -
Slow startup: if using
npx, each startup can be slow due to download/cache check — use the global install (Option 2).
claude mcp remove local-memoryTo temporarily disable, use the /mcp panel inside Claude Code.
MCP Local Memory Service — local-first long-term memory (SQLite + semantic search), a web dashboard, and a codebase index for AI agents. Back to Home
Provided "AS IS", without warranty of any kind.
Home
English
- Getting Started
- Tools Reference
- MCP Concepts
- Features
- Hybrid Search
- Dashboard Guide
- Troubleshooting
- Auto-Start Dashboard
- Claude Code Integration
- Codex Integration
- Kiro Integration
Bahasa Indonesia
- Memulai
- Referensi Alat
- Referensi Protokol MCP
- Fitur Inti
- Pencarian Hibrida
- Panduan Dasbor
- Pemecahan Masalah
- Auto-Start Dasbor
- Integrasi Claude Code
- Integrasi Codex
- Integrasi Kiro
Features