Subcog

v1.0.0Knowledge & Memorystable

Persistent memory system for AI coding assistants. Captures decisions, learnings, and context from coding sessions. Features hybrid search (semantic + BM25), MCP server integration, SQLite persistence with knowledge graph, and proactive memory surfac

aiai-assistantclaudeclaude-plugincli
Share:
24
Stars
0
Downloads
0
Weekly
0/5

What is Subcog?

Subcog is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to persistent memory system for ai coding assistants. captures decisions, learnings, and context from coding sessions. features hybrid search (semantic + bm25), mcp server integration, sqlite persistence...

Persistent memory system for AI coding assistants. Captures decisions, learnings, and context from coding sessions. Features hybrid search (semantic + BM25), MCP server integration, SQLite persistence with knowledge graph, and proactive memory surfac

This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Persistent memory system for AI coding assistants. Captures

Use Cases

Persistent coding memory
Hybrid semantic search
Knowledge graph persistence
zircote

Maintainer

LicenseMIT
Languagerust
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx subcog

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Subcog

Subcog is a persistent memory system for AI coding assistants that captures decisions, learnings, and context across sessions so your AI never starts from scratch. It combines semantic vector search with BM25 keyword ranking (hybrid search) and stores everything in SQLite with a knowledge graph for entity and relationship tracking. Subcog integrates with Claude Code via MCP hooks and exposes around 22 MCP tools for capturing, recalling, consolidating, and managing memories scoped by namespace, project, or git branch. It is written in Rust for performance and supports optional PostgreSQL backends and encryption at rest.

Prerequisites

  • Rust toolchain (for cargo install) OR Homebrew (macOS/Linux) OR Docker
  • An MCP-compatible client such as Claude Desktop or Claude Code CLI
  • Optional: an LLM provider API key (Anthropic, OpenAI, or Ollama) for advanced summarization features
  • SQLite is bundled — no separate database setup required for the default backend
1

Install Subcog

Install using Cargo (recommended for Rust developers), Homebrew on macOS/Linux, or npx as a fallback.

# Homebrew (macOS/Linux)
brew install zircote/tap/subcog

# Cargo
cargo install subcog

# npx fallback
npx @zircote/subcog --help
2

Start the MCP server

Run subcog in server mode to expose MCP tools to your AI client. By default it uses SQLite at ~/.config/subcog/.

subcog serve
3

Configure your MCP client

Add subcog to your Claude Desktop configuration file. The server runs as a local stdio process.

4

Capture your first memory

Use the CLI to store a decision or context snippet, scoped to a namespace for easy retrieval later.

subcog capture --namespace decisions "Use PostgreSQL for primary storage due to ACID requirements"

# With project and branch scope
subcog capture --namespace decisions --project my-app --branch feature/auth "Added JWT support"
5

Search your memories

Use hybrid semantic + BM25 search to find relevant past decisions and context.

subcog recall "database storage decision"

# Scoped to a project
subcog recall "authentication" --project my-app
6

Tune storage and embedding config

Edit ~/.config/subcog/config.toml to change the embedding model, storage backend, or enable encryption. The default embedding model is all-MiniLM-L6-v2 with 384 dimensions.

# Example config.toml snippet
[storage]
backend = "sqlite"
data_dir = "~/.config/subcog"

[embedding]
model = "all-MiniLM-L6-v2"
dimensions = 384

[hooks]
enabled = true
session_start_timeout_ms = 2000

Subcog Examples

Client configuration

Add subcog to Claude Desktop so it has persistent memory across all coding sessions.

{
  "mcpServers": {
    "subcog": {
      "command": "subcog",
      "args": ["serve"]
    }
  }
}

Prompts to try

Once connected, ask your AI assistant to store and recall project knowledge automatically.

- "Remember that we decided to use Redis for session caching because of its TTL support."
- "What database decisions have we made for this project?"
- "Recall any notes about our authentication approach."
- "Consolidate and summarize memories from last week's session."
- "Show me the knowledge graph relationships for the auth module."

Troubleshooting Subcog

subcog serve fails with embedding model download errors

Subcog downloads the all-MiniLM-L6-v2 model on first run. Ensure you have internet access during initial startup. If behind a proxy, set standard HTTP_PROXY/HTTPS_PROXY environment variables.

Recall results are irrelevant or missing

Run 'subcog reindex' to rebuild the search index if you upgraded subcog or changed the embedding model. Also check that memories were captured with matching namespace/project scopes.

Claude Code hooks integration not triggering

Ensure 'hooks.enabled = true' is set in ~/.config/subcog/config.toml and that the subcog MCP server is listed in your Claude Code MCP configuration. Restart Claude Code after making changes.

Frequently Asked Questions about Subcog

What is Subcog?

Subcog is a Model Context Protocol (MCP) server that persistent memory system for ai coding assistants. captures decisions, learnings, and context from coding sessions. features hybrid search (semantic + bm25), mcp server integration, sqlite persistence with knowledge graph, and proactive memory surfac It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Subcog?

Follow the installation instructions on the Subcog GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Subcog?

Subcog works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Subcog free to use?

Yes, Subcog is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Knowledge & Memory MCP Servers

Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "subcog": { "command": "npx", "args": ["-y", "subcog"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Subcog?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides