Provides shared local memory for coding agents using SQLite, semantic search, and linked entities to maintain project context across sessions.
Also known as sonic182/graphmem, @sonic182/graphmem
- Stars
- 9
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 0.15.2
- Last commit
- Nov 8, 2026
- License
- MIT
What is Graphmem MCP?
Graphmem provides shared local memory for coding agents using SQLite, semantic search, and linked entities to maintain project context across sessions.
Summary generated from the project's README
About Graphmem MCP server
Graphmem provides a shared local memory system designed for coding agents to maintain project context across different sessions and tools. It uses SQLite storage and local semantic search to store linked entities, allowing multiple MCP clients like Claude Code, Codex, OpenCode, and pi to access the same data store. This setup ensures that decisions made during a coding session remain durable and accessible later.
Users can install the server via npm or by downloading platform-specific binaries. The system defaults to the current Git repository for memory scoping, though it also supports a global scope. Developers can manage memories through a command line interface or via MCP tools. The server stores all data in the ~/.graphmem directory unless the GRAPHMEM_HOME environment variable is modified.
Beyond memory management, the server includes optional code navigation tools. These tools allow agents to find symbol definitions, list file imports, generate code outlines, and compare symbols across different Git revisions. These specific code features work on Git checkouts without requiring an embedding model.
What you can do with it
- 1Persist project decisionsInstruct an agent to save a specific coding convention so it is remembered in future sessions.
- 2Search through past contextAsk the AI to find specific information or previous instructions stored in the local memory.
Written from the project's README. Every use case is checked against a quote from it.
How to install Graphmem MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Graphmem MCP in Claude Code
$ claude mcp add graphmem -- npx -y @sonic182/graphmemInstall Graphmem MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"graphmem": {
"command": "npx",
"args": [
"-y",
"@sonic182/graphmem"
]
}
}
}Install Graphmem MCP in VS Code
.vscode/mcp.json
{
"servers": {
"graphmem": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@sonic182/graphmem"
]
}
}
}Install Graphmem MCP in VS Code CLI
$ code --add-mcp '{"name":"graphmem","type":"stdio","command":"npx","args":["-y","@sonic182/graphmem"]}'Install Graphmem MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"graphmem": {
"command": "npx",
"args": [
"-y",
"@sonic182/graphmem"
]
}
}
}Install Graphmem MCP in Codex
$ codex mcp add graphmem -- npx -y @sonic182/graphmemInstall Graphmem MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.graphmem] command = "npx" args = ["-y", "@sonic182/graphmem"]
Install Graphmem MCP in Gemini CLI
$ gemini mcp add -s user graphmem npx -- -y @sonic182/graphmemInstall Graphmem MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"graphmem": {
"command": "npx",
"args": [
"-y",
"@sonic182/graphmem"
]
}
}
}Automated checks
Ran Nov 13, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablesonic182/graphmem is public and reachablegithub.com/sonic182/graphmem ↗Pass
- Package names this repository as its source@sonic182/graphmem names sonic182/graphmem as sourcenpmjs.com/package/@sonic182/graphmem ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-09github.com/sonic182/graphmem ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @sonic182/graphmemPass
- No critical advisory in the package or its dependencies1 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubGraphmem

Shared, local memory for coding agents. Keep project decisions across sessions and tools with SQLite storage, local semantic search, and linked entities. Claude Code, Codex, OpenCode, pi, and other MCP clients can share the same store.
Optional code tools find definitions, outline files, list imports, and compare symbols between Git revisions.
Install
npm install --global @sonic182/graphmem
gmem-install
gmem version
The npm package contains launchers. gmem-install explicitly downloads and
verifies the matching CPU binary, or reuses a working native gmem on your
PATH. Package installation itself downloads no binary. After upgrading the
package, run gmem-install again; separately installed binaries are not replaced.
MCP clients that launch servers with npx can run npx -y @sonic182/graphmem mcp.
The graphmem command downloads and verifies the binary on its first run; gmem
never downloads anything on its own.
Alternatively, download your platform's archive from
GitHub Releases, verify
it against SHA256SUMS, and put the extracted executable on your PATH.
Linux releases require glibc 2.39 and OpenSSL 3. For other systems or CUDA,
build from source.
Use it with your coding agent
Plugins include MCP registration, skills, and guidance to recall context before work and save durable decisions afterward.
| Agent | Install |
|---|---|
| Claude Code | claude plugin marketplace add sonic182/graphmem, then claude plugin install graphmem@graphmem |
| Codex | codex plugin marketplace add sonic182/graphmem, then codex plugin add graphmem@graphmem |
| OpenCode | opencode plugin @sonic182/graphmem --global |
| pi | pi install npm:@sonic182/graphmem |
Claude Code and Codex need gmem and Node.js on PATH. In Codex, trust the
Graphmem hooks in /hooks and start a new thread. Pi offers binary setup on first
startup; OpenCode prints an installer command if needed.
See plugin setup and troubleshooting.
For another MCP client, configure it to launch your installed binary:
{
"mcpServers": {
"graphmem": {
"command": "/absolute/path/to/gmem",
"args": ["mcp"]
}
}
}
CLI
gmem remember "Use nextest for integration tests" \
--type convention --scope repo:/absolute/path/to/project
gmem search "integration tests"
gmem tokens --over-limit # memories the embedding model truncates
gmem tui
gmem mcp
Memories default to the current Git repository; git must be on PATH.
Outside a repository, the default scope is global. Reads always include global
memories; explicitly select other projects with --scope (CLI) or scopes (MCP).
Writes are limited to the current repository and global, including updates and
deletions. The MCP list_scopes tool discovers scopes and their write permissions;
list pages through the memories of a selection.
Data lives in ~/.graphmem; set GRAPHMEM_HOME to use another directory.
CLI reference · MCP tool reference
Code navigation (optional)
Release binaries include these tools; source builds need --features code.
| MCP tool | Purpose |
|---|---|
find_symbol |
Find a definition and its source range |
code_outline |
List a file's definitions and nesting |
code_imports |
List declared imports |
code_diff |
Compare symbols between Git revisions |
gmem code find CodeService
gmem code outline src/application/code.rs
gmem code imports src/application/code.rs
gmem code diff origin/master
These tools work on Git checkouts without an embedding model. They index
definitions, not call sites or references; use ast-grep for those.
Set GRAPHMEM_CODE=off to disable code tools.
Options and supported languages · Benchmark results and limitations
Configuration
No config file is required. To customize embeddings, retrieval, or code indexing,
create ~/.graphmem/config.toml. See the configuration reference.
Build
See source builds and CUDA setup.
Development
just verify
Runs formatting checks, compilation, Clippy, and tests. Design · Schema evolution
To preview the documentation site, run hugo server --source site.
See site setup.
License
MIT.
Graphmem MCP questions
How do I add Graphmem MCP to Claude Code?
Run claude mcp add graphmem -- npx -y @sonic182/graphmem in your terminal. Add --scope user to make it available in every project.
How do I add Graphmem MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
How do I install Graphmem for use with an MCP client?
You can install it via npm using npm install --global @sonic182/graphmem and then running gmem-install, or by using npx -y @sonic182/graphmem mcp for clients that support npx.
Where is the memory data stored?
Data is stored locally in the ~/.graphmem directory, though you can change this by setting the GRAPHMEM_HOME environment variable.
Can I use Graphmem to navigate my code?
Yes, optional code tools allow you to find symbol definitions, outline files, list imports, and compare symbols between Git revisions.
Does Graphmem require a configuration file?
No configuration file is required by default, but you can create ~/.graphmem/config.toml to customize embeddings, retrieval, or code indexing.