Cogmemory Mcp
CogMemory MCP Server — Unified context subsystems for AI coding agents
- Transport
- Not stated
- Package
- —
- Registry id
- io.github.skylarng89/cogmemory-mcp
No install snippet on purpose. A working MCP config is a command, its arguments and an environment block — the last two are where API keys live, so this catalogue never stores them and cannot publish them. Follow the link above for the authors' own instructions.
A unified Model Context Protocol server providing four context subsystems for AI coding agents:
- Memory — decisions, conventions, errors, active context, changelog, plan, tasks, sessions
- Knowledge Graph — entities, relations, observations
- Specs — long-form documents (PRD/SRS), optionally linked to a KG entity
- Code Graph — static structural graph (symbols/edges) + named execution traces + AI-generated annotations
Storage: SQLite via better-sqlite3. By default, each clone gets its own
database under ~/.cogmemory/projects/.
Quick Start
Install
Option A — npx (recommended, always latest):
npx -y cogmemory-mcp@latest
Option B — Global install:
npm install -g cogmemory-mcp
cogmemory-mcp
Option C — pnpm dlx:
pnpm dlx cogmemory-mcp@latest
Option D — From source (developers):
git clone https://github.com/skylarng89/cogmemory-mcp.git
cd cogmemory-mcp
pnpm install
pnpm run build
Native Module Requirements
CogMemory depends on better-sqlite3 and tree-sitter, which compile native modules on install. You need:
- Python 3 (for
node-gyp) - C/C++ compiler (
gcc/g++on Linux, Xcode Command Line Tools on macOS, Visual Studio Build Tools on Windows) make(Linux/macOS, installed by default)
Most platforms have prebuilt binaries available, so compilation is usually skipped on:
- Linux x64 / arm64
- macOS x64 / arm64
- Windows x64
If installation fails, see Troubleshooting below.
IDE / Client Configuration
VS Code
Add to .vscode/mcp.json (workspace-scoped):
{
"servers": {
"cogmemory": {
"command": "npx",
"args": ["-y", "cogmemory-mcp@latest"]
}
}
}
Or use --workspace for multi-root support (rarely needed — see Workspace Resolution):
{
"servers": {
"cogmemory-frontend": {
"command": "npx",
"args": ["-y", "cogmemory-mcp@latest", "--workspace", "/path/to/frontend"]
},
"cogmemory-backend": {
"command": "npx",
"args": ["-y", "cogmemory-mcp@latest", "--workspace", "/path/to/backend"]
}
}
}
Zero-config default: if you omit
--workspace, CogMemory discovers the project automatically from the working directory (git root first, then the nearest.cogmemory/parent). One server entry is enough for all projects — each repo gets its own memory bucket. Only pin--workspacefor monorepo sub-root targeting.
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"cogmemory": {
"command": "npx",
"args": ["-y", "cogmemory-mcp@latest"]
}
}
}
Claude Desktop
Add to ~/.config/claude/claude_desktop_config.json (Linux/macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"cogmemory": {
"command": "npx",
"args": ["-y", "cogmemory-mcp@latest"]
}
}
}
Claude Code
Add to ~/.claude/mcp.json (user-level) or .claude/mcp.json (project-level):
{
"mcpServers": {
"cogmemory": {
"command": "npx",
"args": ["-y", "cogmemory-mcp@latest"]
}
}
}
Cline
In the Cline extension settings, add an MCP server:
- Name:
cogmemory - Command:
npx -y cogmemory-mcp@latest
Or in cline_mcp_settings.json:
{
"mcpServers": {
"cogmemory": {
"command": "npx",
"args": ["-y", "cogmemory-mcp@latest"]
}
}
}
Windsurf
MCP settings → Add server:
{
"mcpServers": {
"cogmemory": {
"command": "npx",
"args": ["-y", "cogmemory-mcp@latest"]
}
}
}
OpenCode
Add to opencode.json:
{
"mcp": {
"cogmemory": {
"command": "npx",
"args": ["-y", "cogmemory-mcp@latest"]
}
}
}
Zed
Add to Zed settings (settings.json):
From the project's README.