crossmem
Provides MCP server tools to search, recall, and save memories from Claude Code and Gemini CLI, making cross-project insights accessible within GitHub Copilot sessions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@crossmemsearch for credential masking pattern from backend-api"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
crossmem
One search across all your Claude Code and Gemini CLI memories — every project, every tool.


The problem
You use AI coding assistants across multiple projects. Each project's memories are locked in a silo — and each tool has its own silo too. You solved credential masking in your backend API three months ago, but when you need it in a new microservice, your AI assistant starts from scratch.
Here's what's happening under the hood:
~/.claude/projects/
├── backend-api/memory/MEMORY.md ← Claude remembers here
├── mobile-app/memory/MEMORY.md ← ...but can't see here
└── data-pipeline/memory/MEMORY.md ← ...or here
~/.gemini/GEMINI.md ← Gemini's memories (separate silo entirely)Every project is a silo. Every tool is a silo. Knowledge doesn't compound — it resets.
Related MCP server: Context Pilot
The fix
$ crossmem ingest
Ingested: 42 memories across 4 projects (Claude Code + Gemini CLI)
$ crossmem search "credential masking"
Found 3 results for "credential masking":
[1] backend-api / Security
Source: MEMORY.md
- Credentials masked in experience_memory before persisting (_mask_actions)...
[2] mobile-app / Security
Source: MEMORY.md
- Credentials masked via _mask_context_credentials() + _mask_text()...
[3] backend-api / Security
Source: GEMINI.md
- Credential masking pattern: _mask_actions for persistence, _mask_text for logs...Three results. Two projects. Two AI tools. One query. The pattern was already solved.
How crossmem differs
vs Mem0 — Mem0 is cloud-based and requires an API key. crossmem is local-only with zero accounts.
vs Basic Memory — Basic Memory works within one tool. crossmem aggregates across tools and projects.
vs grep — crossmem parses multiple formats, deduplicates, and runs as an MCP server — your AI assistant queries it automatically at session start.
Install
pip install crossmem
# or
uv pip install crossmemQuick start
pip install crossmem # 1. Install
crossmem ingest # 2. Index all your AI memories
crossmem search "retry" # 3. Search across every projectThat's it. Three commands, zero config. crossmem finds Claude Code and Gemini CLI memory files automatically.
To give your AI tools direct access, add the MCP server to your config (see MCP Server below) — then mem_recall() and mem_search() just work inside your coding sessions.
Usage
# Ingest Claude Code + Gemini CLI memories
crossmem ingest
# Search across every project
crossmem search "JWT token rotation"
crossmem search "retry strategy" -p backend-api
crossmem search "docker compose" -n 5
# Save a discovery
crossmem save "Always use middleware for credential masking" -p backend-api -s Patterns
# Delete stale or wrong memories
crossmem forget 42 # delete memory #42 (with confirmation)
crossmem forget -p old-app # delete all memories for a project
crossmem forget 42 --confirm # skip confirmation prompt
# Sync Claude memories → Gemini CLI
crossmem sync # sync everything
crossmem sync -p backend-api # sync one project + shared patterns
# Watch for changes and auto-sync
crossmem sync-watch # polls every 30s
crossmem sync-watch --interval 10 # custom interval
# Visualize the knowledge graph
crossmem graph
# See what's in the database
crossmem statsHow it works
Ingest — Finds Claude Code and Gemini CLI memory files automatically, splits into chunks, deduplicates
Index — Stores everything locally in SQLite — no cloud, no API keys, no accounts
Search — Full-text search with stemming. Multi-word queries use AND logic; quoted phrases for exact matches
Learn — AI tools save new discoveries via
mem_saveduring sessions. Knowledge compounds automaticallySync — One-way sync from Claude → Gemini, preserving each tool's own memories
How it works with your AI tools
Once the MCP server is configured, your AI assistant automatically uses crossmem:
You: "How should I handle credentials in this new service?"
AI: Let me check crossmem for existing patterns...
[calls mem_recall → finds credential masking in 3 of your projects]
Based on your previous work across backend-api, mobile-app, and infra-tools,
you consistently use a middleware layer for credential masking. Here's the
pattern from your backend-api project:
- Credentials stored in Secret Manager, never in env vars
- API keys masked in logs via _mask_sensitive_headers()
...No copy-pasting. No "I already solved this." Your AI assistant recalls patterns from every project you've worked on — automatically.
MCP Server
crossmem runs as an MCP server so AI coding tools can search, recall, and save memories in real-time.
Setup
Add to your tool's MCP config:
Claude Code (~/.mcp.json for global, or .mcp.json in project root):
{
"mcpServers": {
"crossmem": {
"command": "crossmem-server"
}
}
}Gemini CLI (~/.gemini/settings.json):
{
"mcpServers": {
"crossmem": {
"command": "crossmem-server"
}
}
}VS Code / GitHub Copilot (.vscode/mcp.json in project root, or user settings.json):
{
"servers": {
"crossmem": {
"command": "uvx",
"args": ["--from", "crossmem", "crossmem-server"]
}
}
}Note: For Claude Code and Gemini CLI, if
crossmem-serverisn't on PATH, use the sameuvxcommand shown in the Copilot config above.
Tools
Tool | Description |
| Load project context + cross-project patterns at session start (auto-detects project from cwd) |
| Search across all memories (query, project filter, limit) |
| Save a discovery during a session — immediately searchable |
| Delete a memory by ID (find IDs via |
| Refresh the index when memory files change (auto-runs on server startup) |
Start manually
crossmem serve # starts MCP server on stdio (same as crossmem-server)Supported tools
Tool | Ingestion |
Claude Code |
|
Gemini CLI |
|
VS Code / GitHub Copilot | Via MCP server (no direct ingestion — uses the shared index) |
Ingestion is pluggable — PRs welcome for new tools.
License
MIT
Available Tools
5 toolsmem_forgetA
Delete a memory by ID.
Use this to remove stale, wrong, or duplicate memories. Find the ID via mem_search first, then pass it here.
Args: memory_id: The ID of the memory to delete (shown in search results)
| Name | Required | Description | Default |
|---|---|---|---|
| memory_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It explains the deletion action and the need for a valid ID from search, but fails to mention potential behaviors like what happens if the ID does not exist or if the operation is irreversible.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise, with the core action in the first sentence, followed by usage guidance and parameter explanation. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, clear action) and the presence of an output schema (implied from context signals), the description covers the essential aspects: what, when, and how. It could be improved by noting error behavior for nonexistent IDs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description explains the parameter memory_id as 'The ID of the memory to delete (shown in search results),' adding meaning beyond the schema's type and title.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Delete a memory by ID,' a specific verb and resource. It distinguishes from sibling tools like mem_search, mem_recall, mem_save, and mem_ingest by focusing on deletion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description says 'Use this to remove stale, wrong, or duplicate memories' and advises to 'Find the ID via mem_search first, then pass it here.' This provides clear context on when and how to use the tool, but does not explicitly mention when NOT to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mem_ingestA
Refresh the memory index by re-ingesting all memory files.
Reads Claude Code and Gemini CLI memory files and updates the searchable index. Run this when you know memory files have changed.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description details the action: reads files and updates the searchable index. While it doesn't specify overwrite vs merge, it adequately conveys the non-destructive update behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences, front-loaded with the main purpose, and contains no unnecessary words. Every sentence provides essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters, an output schema (not needing description), and sibling tools covering other actions, the description fully explains when and why to use this tool. It mentions the specific files read and the effect on the index.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and schema coverage is 100%. The description implicitly clarifies no arguments are needed by stating 're-ingesting all memory files,' adding value beyond the empty schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it refreshes the memory index by re-ingesting memory files, specifically from Claude Code and Gemini CLI. This distinguishes it from sibling tools like mem_search, mem_recall, etc., which are for different operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Run this when you know memory files have changed,' providing clear when-to-use guidance. No exclusions or alternatives needed since siblings cover other actions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mem_recallA
Recall relevant memories for a project at session start.
Returns the project's own memories plus cross-project patterns (knowledge validated across multiple projects). Call this at the beginning of a coding session to load context.
If no project is given, auto-detects from the working directory by matching path segments against known project names.
Args: project: Project name to recall memories for (auto-detected if omitted) cwd: Working directory path for auto-detection (defaults to os.getcwd())
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| project | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses that it returns 'the project's own memories plus cross-project patterns' and that it auto-detects the project from cwd. It does not mention side effects, but as a recall operation, it is likely read-only. Could be more transparent about idempotency or performance, but still informative.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured: first sentence states purpose, then explains return and timing, followed by auto-detection detail and Args section. Every sentence is essential and adds value, with no redundancy. Front-loaded with the most important information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has an output schema (context signal shows true), the description does not need to explain returns. It covers purpose, usage context, auto-detection behavior, and parameters. For a recall tool with 2 optional params, this is complete and no major gaps are present.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description fully explains both parameters: 'project' (auto-detected if omitted) and 'cwd' (defaults to os.getcwd()). It adds meaningful context beyond the schema, making the parameters clear and compensating for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description immediately states 'Recall relevant memories for a project at session start,' specifying the verb 'recall' and the resource 'memories for a project.' It distinguishes from siblings like mem_search (search) and mem_save/ingest/forget (modify) by focusing on context loading. The purpose is specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Call this at the beginning of a coding session to load context,' providing clear when-to-use guidance. It also explains auto-detection when no project is given. However, it does not explicitly mention when not to use or provide alternatives (e.g., mem_search for more specific queries), but the context is strong.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mem_saveA
Save a memory during a coding session.
Use this when you discover something worth remembering: patterns, decisions, gotchas, architecture notes, debugging insights, or any knowledge that would help future sessions.
The memory is immediately searchable via mem_search.
Args: content: The memory content to save (be specific and actionable) section: Category heading (e.g. "Security", "Architecture", "Gotchas") project: Project name (auto-detected from cwd if omitted) cwd: Working directory for auto-detection (defaults to os.getcwd())
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| content | Yes | ||
| project | No | ||
| section | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions that the memory is immediately searchable, but does not disclose any destructive effects, authorization requirements, or whether the tool is idempotent. For a save operation, this is adequate but not thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured. It opens with a clear one-liner, then lists usage scenarios in a bullet-like manner, and follows with parameter descriptions. Every sentence adds value without being verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists (though not shown), the description need not explain return values. It adequately covers the tool's purpose, parameters, and usage context. It could mention return values or error cases for completeness, but it is sufficient for a save tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 0%, so the description must compensate. It does so effectively by explaining each parameter: content (be specific and actionable), section (category heading with examples), project (auto-detected), and cwd (defaults to os.getcwd()). This adds significant meaning beyond the schema's basic type and default info.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Save a memory during a coding session.' It uses a specific verb and resource, and it distinguishes itself from sibling tools (e.g., mem_search) by noting that saved memories are searchable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides extensive usage guidance, listing concrete scenarios (patterns, decisions, gotchas, etc.) and stating 'when you discover something worth remembering.' It does not explicitly state when not to use the tool or name alternatives, but the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mem_searchA
Search across all project memories.
Use this to find patterns, decisions, and solutions from past projects. Multi-word queries use AND logic. Use quoted phrases for exact matches.
Args: query: Search terms (e.g. "credential masking", "docker sidecar") project: Optional project name to filter results limit: Max number of results (default 10)
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| project | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description implies a read-only search but does not explicitly state that no changes are made or disclose any side effects. With no annotations, the description carries the full burden, and it only partially addresses behavioral transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, front-loaded with the purpose, and uses only necessary words. The structure with intro, usage, and parameter list is efficient and scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the 3 parameters and output schema, the description covers the essential behavior, usage, and parameter details. It lacks information on pagination or sorting, but overall it is sufficiently complete for a search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description fully compensates with an 'Args' section that explains each parameter: query (with examples), project (optional filter), and limit (default 10). This adds clear meaning beyond the schema's type definitions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches across all project memories, with specific use cases (find patterns, decisions, solutions). However, it does not explicitly differentiate from sibling tools like mem_recall, which might also retrieve memories.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly tells when to use the tool ('find patterns, decisions, and solutions') and provides query logic (AND, quoted phrases). It does not mention when not to use it or alternative tools, but the guidance is clear for its intended purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v0.3.1- First observed
mem_forget - First observed
mem_ingest - First observed
mem_recall - First observed
mem_save - First observed
mem_search
TDQS
Each tool targets a distinct memory operation: searching, recalling context, saving, ingesting index, and deleting. No overlaps.
All tools follow a consistent 'mem_' prefix with descriptive snake_case verbs (search, recall, save, ingest, forget).
With 5 tools, the set covers core memory lifecycle operations without being excessive or insufficient for the domain.
CRUD-like operations are present (save, search, recall, forget), and ingest handles index refresh. Lacks an explicit update tool, but save can potentially overwrite.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
- mcpOAuthai.butlerbrain
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
One memory, every AI: Claude, ChatGPT, Perplexity, Gemini, Cursor, OpenClaw, Hermes, any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenancePersistent memory MCP server that captures coding session context and automatically injects relevant memories into prompts using hybrid search for OpenCode and Claude Code.64MIT
- AlicenseNot gradedqualityAmaintenanceMCP server providing persistent, searchable memory management for AI workflows, enabling Claude Code to store, retrieve, and organize context through CRUD operations and knowledge tools.MIT
- AlicenseNot gradedqualityDmaintenanceCross-machine memory system for Claude Code that records sessions as searchable markdown, syncs across machines via Git, and exposes full-text search, semantic search, session summarization, and a knowledge graph through an MCP server.12MIT
- AlicenseNot gradedqualityDmaintenanceA persistent memory MCP server for Claude Code that enables long-term recall across sessions via hybrid search, code intelligence, and tools for reading/writing memory.121MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jamiemoles/crossmem'
If you have feedback or need assistance with the MCP directory API, please join our Discord server