Cogmemory MCP server
io.github.skylarng89/cogmemory-mcp·v1.15.1CogMemory MCP Server — Unified context subsystems for AI coding agents
0 stars71 downloads/wk
Reviews
Write oneNobody has reviewed Cogmemory yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Cogmemory tools (44, 11 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
add_observationAttach a fact/observation to a knowledge graph entity
add_plan_itemAdd a roadmap/plan item
analyze_impactAnalyze the impact of uncommitted changes. Auto-detects changed files via `git diff`, maps them to indexed symbols, and computes the reverse transitive caller closure. Returns impacted symbols with depth and path.
annotate_symbolAttach narrative text to a symbol or execution trace (storage-only — the server never generates the text)
check_for_updatesCheck if a newer version of cogmemory-mcp is available on npm. Makes a read-only HTTPS GET to registry.npmjs.org (cached 24h). Disable with COGMEMORY_DISABLE_UPDATE_CHECK=1 or config.json disable_update_check=true.
check_index_coverageReport indexed vs. unindexed vs. stale files and per-language breakdowns. Use to understand how much of the workspace the code graph covers.
cogmemory_statusShow runtime configuration: package version, schema version, db path, workspace root, scope, index coverage, and subsystem counts. Use this to understand the current state of CogMemory.
create_entitywrite actionAdd an entity to the knowledge graph (deduped on name+type)
create_relationwrite actionLink two entities with a typed relation
create_specwrite actionStore a long-form document (PRD, SRS, design doc), optionally linked to a knowledge graph entity
create_taskwrite actionCreate an actionable task, optionally linked to a plan item
delete_by_keywrite actionDelete a context entry by its string key
delete_by_pathwrite actionRemove a file from the code graph file_index
delete_itemwrite actionDelete a single row by ID from any CogMemory subsystem that uses an integer primary key. For 'context' use delete_by_key; for 'file_index' use delete_by_path.
end_sessionClose a work session and optionally store a summary
find_dead_codeFind symbols with zero inbound structural edges (calls, imports, extends, implements). Excludes exported symbols, configurable entry-point patterns, and test files.
find_duplicatesFind duplicate/clone symbol pairs via exact body_hash match and MinHash similarity. Inserts SIMILAR_TO edges for pairs above threshold.
find_relatedFind semantically-related symbols using structural heuristics: shared callers, shared imports, same file, existing SIMILAR_TO edges. Inserts SEMANTICALLY_RELATED edges.
generate_codemapBFS from an entry symbol through the code graph, returning a bounded subgraph with optional traces and annotations
get_active_contextRead the current value of a context key
get_code_snippetGet the source code lines for a symbol by ID or name. Returns the file content between start_line and end_line, with optional context padding.
get_session_summaryRecall what happened in a previous session, including its decisions, errors, and changelog entries
get_specRetrieve a spec by ID or exact title
index_codebaseWalk the workspace and extract symbols + edges. Dispatches files to the correct language analyzer automatically via the analyzer registry. Incremental by default (only re-analyzes changed files); use full=true to force complete re-index.
list_itemsBrowse stored entries from any CogMemory subsystem (sessions, decisions, conventions, errors, context, changelog, plan, tasks, entities, relations, observations, specs, symbols, edges, execution_traces, codemap_annotations, file_index). Returns rows with optional filters.
list_projectsList all projects known to this CogMemory database, with row counts, last-seen timestamps, and staleness flags. The active project is marked.
log_changeAppend an entry to the changelog (what happened)
log_errorRecord an error with its signature, description, and resolution
prune_projectsPermanently delete a project and ALL of its memories (decisions, conventions, errors, sessions, code graph, etc.). Requires confirm=true. Irreversible.
purge_subsystemwrite actionRemove ALL rows from a single subsystem (and cascaded dependents). Requires confirm=true. Use with care — this is irreversible.
query_code_graphLook up a symbol by name, ID, or file path — returns its callers, callees, and imports (1-hop)
query_graphMulti-hop structural graph query using recursive CTE. Start from a symbol and traverse outbound/inbound/both through edges of specified types up to max_depth. Returns nodes and paths.
recallUnified search across decisions, conventions, errors, and changelog by text, tags, session, or date range
remember_conventionLog or update a convention (design token, pattern, style, naming)
remember_decisionLog a decision with rationale and optional tags
rename_projectRename a project's display label. The slug (identity) is immutable — renaming never affects memory continuity.
search_knowledgeQuery the knowledge graph: entities, relations, and observations by name, type, or text
semantic_code_searchSemantic/meaning-based code search using TF-IDF over symbol names and source code. Returns symbols ranked by relevance to the natural-language query.
set_active_contextSet or update the current active context (upsert by key)
start_sessionBegin a new work session (returns session ID)
switch_projectSwitch database, project identity, and workspace root together at runtime. Use when the MCP client pinned a stale --workspace/cwd that does not match the project being worked on (the agent can self-correct without restarting the server). Creates and persists a new project identity if the root has none.
update_plan_statuswrite actionUpdate the status of a plan item
update_specwrite actionUpdate a spec's content, title, or entity link (auto-bumps version)
update_task_statuswrite actionUpdate the status of a task
Public scan report
scanner v0.1.10 · 2026-10-15 · same rubric, same numbers if you re-run it
- Code scan59 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 9 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Cogmemory compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 92/100
- higher than 93% of 48,243 servers
- Tools
- 44
- the typical server has 7
- Tools that change things
- 25%
- typical: 0%. Fewer write tools means less an agent can break
- Downloads a week
- 71
- more than 53% of 12,306 servers with a package
What its tools let an agent do: 27 read · 7 create · 5 change · 4 delete · 1 run or deploy
Release history: 2 versions in the registry since 2026-09-09, latest 2026-09-24, typically one every 15 days.
Install Cogmemory in Claude Code, Cursor or VS Code
Runs npx -y cogmemory-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add cogmemory-mcp -- npx -y cogmemory-mcp
What the publisher says
From the Cogmemory repository's README, as published. We do not edit it. Read it on GitHub
CogMemory MCP Server
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@latestOption B — Global install:
npm install -g cogmemory-mcp
cogmemory-mcpOption C — pnpm dlx:
pnpm dlx cogmemory-mcp@latestOption D — From source (developers):
git clone https://github.com/skylarng89/cogmemory-mcp.git
cd cogmemory-mcp
pnpm install
pnpm run buildNative 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 --workspace for 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/claudedesktopconfig.json (Linux/macOS) or %APPDATA%\Claude\claudedesktopconfig.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 clinemcpsettings.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
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Grade history
- 2026-09-19restoreB → Ascore 92
Cogmemory: common questions
- Is Cogmemory MCP server safe?
- Yes, by our scan: it is graded A (92/100). Read the Cogmemory safety report
- How do I install Cogmemory?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Cogmemory need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Cogmemory maintained?
- The last commit was 30 days ago (2026-10-06). The latest release is v1.15.1.
- How does Cogmemory compare with other MCP servers?
- safety score 92/100 (higher than 93% of 48,243 servers); tools 44 (the typical server has 7); tools that change things 25% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.