MCP Server
The SharedMemory MCP server lets any MCP-compatible AI assistant (Claude Desktop, Cursor, Windsurf, VS Code Copilot) access persistent memory.
npx @sharedmemory/mcp-server
Setup​
- Claude Desktop
- Cursor
- VS Code Copilot
- Windsurf
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"sharedmemory": {
"command": "npx",
"args": ["@sharedmemory/mcp-server"],
"env": {
"SHAREDMEMORY_API_KEY": "sm_agent_...",
"SHAREDMEMORY_API_URL": "https://api.sharedmemory.ai",
"SHAREDMEMORY_VOLUME_ID": "your-volume-id"
}
}
}
}
Edit .cursor/mcp.json in your project root:
{
"mcpServers": {
"sharedmemory": {
"command": "npx",
"args": ["@sharedmemory/mcp-server"],
"env": {
"SHAREDMEMORY_API_KEY": "sm_agent_...",
"SHAREDMEMORY_API_URL": "https://api.sharedmemory.ai",
"SHAREDMEMORY_VOLUME_ID": "your-volume-id"
}
}
}
}
Add to .vscode/mcp.json:
{
"servers": {
"sharedmemory": {
"command": "npx",
"args": ["@sharedmemory/mcp-server"],
"env": {
"SHAREDMEMORY_API_KEY": "sm_agent_...",
"SHAREDMEMORY_API_URL": "https://api.sharedmemory.ai",
"SHAREDMEMORY_VOLUME_ID": "your-volume-id"
}
}
}
}
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"sharedmemory": {
"command": "npx",
"args": ["@sharedmemory/mcp-server"],
"env": {
"SHAREDMEMORY_API_KEY": "sm_agent_...",
"SHAREDMEMORY_API_URL": "https://api.sharedmemory.ai",
"SHAREDMEMORY_VOLUME_ID": "your-volume-id"
}
}
}
}
Environment Variables​
| Variable | Required | Description |
|---|---|---|
SHAREDMEMORY_API_KEY | Yes | Your agent API key (sm_agent_... or sm_proj_rw_...) |
SHAREDMEMORY_API_URL | No | API base URL (default: https://api.sharedmemory.ai) |
SHAREDMEMORY_VOLUME_ID | No | Default project (volume) ID for all operations |
Tools​
The MCP server exposes 7 tools to the AI assistant:
remember​
Store a fact, note, or piece of information. The memory pipeline handles classification, conflict checking, entity extraction, and graph building automatically.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
content | string | Yes | The information to remember |
volume_id | string | No | Volume ID (uses default) |
memory_type | enum | No | factual, preference, event, relationship, technical |
recall​
Search memories by semantic similarity. Returns matching memories plus knowledge graph facts.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | What to search for |
volume_id | string | No | Volume ID |
limit | number | No | Max results (1–50, default: 10) |
get_entity​
Get everything known about a specific entity (person, project, concept). Returns summary, facts, and relationships.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
entity_name | string | Yes | Name of the entity |
volume_id | string | No | Volume ID |
search_entities​
Search for entities in the knowledge graph by name.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search term |
volume_id | string | No | Volume ID |
limit | number | No | Max results (1–50, default: 20) |
explore_graph​
Overview of the entire knowledge graph — all entities and relationships.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
volume_id | string | No | Volume ID |
limit | number | No | Max entities (1–200, default: 50) |
list_volumes​
List all memory projects (volumes) accessible to this agent. No parameters.
manage_memory​
Delete or update an existing memory by ID.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
action | enum | Yes | delete or update |
memory_id | string | Yes | UUID of the memory to manage |
volume_id | string | No | Volume ID (uses default) |
content | string | No | New content (required for update) |
Resources​
| URI | Description |
|---|---|
memory://graph | JSON representation of the knowledge graph for the default volume |
Prompts​
summarize-knowledge​
Generates a comprehensive summary of all knowledge in a volume. Useful as a conversation starter.
what-do-you-know-about​
Asks the AI to synthesize everything SharedMemory knows about a specific topic, combining entity data, memories, and graph facts.
Usage Examples​
Once configured, just talk to your AI naturally:
"Remember that our quarterly meeting is on March 15th"
"What do you know about the React migration project?"
"Show me everyone who works on the backend team"
"What did I tell you about deployment procedures?"
The MCP server handles the API calls behind the scenes.