SharedMemory MCP server
Provides AI agents with persistent memory and a shared knowledge graph to remember, recall, and explore information.
Also known as sharedmemoryai/mcp-server, mcp-server, @sharedmemory/mcp-server
- Stars
- 1
- Tools
- 16
- Downloads, 30 days
- —
- Latest version
- 2.1.1
- Last commit
- May 17, 2026
- License
- MIT
What is SharedMemory MCP?
SharedMemory provides AI agents with persistent memory and a shared knowledge graph to remember, recall, and explore information. It exposes 16 tools, such as remember, query, get_entity.
Summary generated from the project's README
About SharedMemory MCP server
Giving AI agents a persistent knowledge graph to store and recall information is what this server enables for developers using tools like Claude Code, Cursor, and VS Code Copilot. It provides a shared memory layer that allows different sessions and agents to access a consistent set of facts, entities, and relationships through a centralized volume.
Users can set up the server via npx for various clients including Claude Desktop, Windsurf, and Cursor. The installation requires a SharedMemory API key and a volume ID to function. Once connected, the server provides specific tools such as remember to store notes, query for semantic search, and get_entity to explore relationships within the knowledge graph.
Beyond simple storage, the server supports advanced management through batch_remember for multiple entries and set_instruction to establish persistent rules for all agents. It also offers capabilities to retrieve user profiles, list uploaded documents, and summarize all knowledge within a specific volume.
Written from the project's README. Every use case is checked against a quote from it.
How to install SharedMemory MCP
Formats verified 10 Nov 2026Install SharedMemory MCP in Claude Code
$ claude mcp add --env SHAREDMEMORY_API_KEY=<YOUR_SHAREDMEMORY_API_KEY> mcp-server -- npx -y @sharedmemory/mcp-serverInstall SharedMemory MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@sharedmemory/mcp-server"
],
"env": {
"SHAREDMEMORY_API_KEY": "<YOUR_SHAREDMEMORY_API_KEY>"
}
}
}
}Install SharedMemory MCP in VS Code
.vscode/mcp.json
{
"servers": {
"mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@sharedmemory/mcp-server"
],
"env": {
"SHAREDMEMORY_API_KEY": "<YOUR_SHAREDMEMORY_API_KEY>"
}
}
}
}Install SharedMemory MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@sharedmemory/mcp-server"
],
"env": {
"SHAREDMEMORY_API_KEY": "<YOUR_SHAREDMEMORY_API_KEY>"
}
}
}
}Install SharedMemory MCP in Codex
~/.codex/config.toml
[mcp_servers.mcp-server] command = "npx" args = ["-y", "@sharedmemory/mcp-server"] [mcp_servers.mcp-server.env] SHAREDMEMORY_API_KEY = "<YOUR_SHAREDMEMORY_API_KEY>"
Install SharedMemory MCP in Gemini CLI
~/.gemini/settings.json
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@sharedmemory/mcp-server"
],
"env": {
"SHAREDMEMORY_API_KEY": "<YOUR_SHAREDMEMORY_API_KEY>"
}
}
}
}SharedMemory MCP tools 16
Detected from the READMErememberqueryget_entitysearch_entitiesget_graphlist_volumesdelete_memoryupdate_memoryfeedbackbatch_rememberget_memoryget_profile
| remember | — | |
| query | — | |
| get_entity | — | |
| search_entities | — | |
| get_graph | — | |
| list_volumes | — | |
| delete_memory | — | |
| update_memory | — | |
| feedback | — | |
| batch_remember | — | |
| get_memory | — | |
| get_profile | — |
Show all 16 toolsShow fewer tools
get_contextset_instructionlist_instructionslist_documents
| get_context | — | |
| set_instruction | — | |
| list_instructions | — | |
| list_documents | — |
Configuration
SHAREDMEMORY_API_KEYRequiredSecretYour SharedMemory API key
SHAREDMEMORY_API_URLAPI endpoint URL
SHAREDMEMORY_VOLUME_IDDefault volume/project ID
| Name | Description | |
|---|---|---|
| SHAREDMEMORY_API_KEY | Your SharedMemory API key | RequiredSecret |
| SHAREDMEMORY_API_URL | API endpoint URL | |
| SHAREDMEMORY_VOLUME_ID | Default volume/project ID |
README
View on GitHub@sharedmemory/mcp-server
Model Context Protocol server for SharedMemory. Gives Claude Code, Claude Desktop, Cursor, VS Code Copilot, and other MCP-compatible tools persistent memory.
Quick Install (Recommended)
The fastest way to set up SharedMemory — one command, no JSON editing:
# Interactive — picks your client, asks for your API key
npx -y @sharedmemory/mcp-server install
# Or specify everything inline
npx -y @sharedmemory/mcp-server install --cursor --api-key sm_live_... --volume your-volume-id
# Install for all supported clients at once
npx -y @sharedmemory/mcp-server install --all --api-key sm_live_...
Supported clients: --claude-code, --claude, --cursor, --vscode, --windsurf, --all
Manual Setup
If you prefer to edit config files yourself:
Claude Code
One command:
claude mcp add sharedmemory -- npx -y @sharedmemory/mcp-server
Or with env vars:
claude mcp add --env SHAREDMEMORY_API_KEY=sm_live_... \
--env SHAREDMEMORY_VOLUME_ID=your-volume-id \
sharedmemory -- npx -y @sharedmemory/mcp-server
Or create .mcp.json in your project root to share with your team:
{
"mcpServers": {
"sharedmemory": {
"command": "npx",
"args": ["-y", "@sharedmemory/mcp-server"],
"env": {
"SHAREDMEMORY_API_KEY": "${SHAREDMEMORY_API_KEY}",
"SHAREDMEMORY_API_URL": "https://api.sharedmemory.ai",
"SHAREDMEMORY_VOLUME_ID": "${SHAREDMEMORY_VOLUME_ID}"
}
}
}
}
Tip: Copy the included
CLAUDE.mdinto your project root to teach Claude Code when and how to use SharedMemory proactively.
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"sharedmemory": {
"command": "npx",
"args": ["-y", "@sharedmemory/mcp-server"],
"env": {
"SHAREDMEMORY_API_KEY": "sm_live_...",
"SHAREDMEMORY_API_URL": "https://api.sharedmemory.ai",
"SHAREDMEMORY_VOLUME_ID": "your-volume-id"
}
}
}
}
Cursor
.cursor/mcp.json in your project root:
{
"mcpServers": {
"sharedmemory": {
"command": "npx",
"args": ["-y", "@sharedmemory/mcp-server"],
"env": {
"SHAREDMEMORY_API_KEY": "sm_live_...",
"SHAREDMEMORY_API_URL": "https://api.sharedmemory.ai",
"SHAREDMEMORY_VOLUME_ID": "your-volume-id"
}
}
}
}
VS Code Copilot
.vscode/mcp.json:
{
"servers": {
"sharedmemory": {
"command": "npx",
"args": ["-y", "@sharedmemory/mcp-server"],
"env": {
"SHAREDMEMORY_API_KEY": "sm_live_...",
"SHAREDMEMORY_API_URL": "https://api.sharedmemory.ai",
"SHAREDMEMORY_VOLUME_ID": "your-volume-id"
}
}
}
}
Windsurf
~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"sharedmemory": {
"command": "npx",
"args": ["-y", "@sharedmemory/mcp-server"],
"env": {
"SHAREDMEMORY_API_KEY": "sm_live_...",
"SHAREDMEMORY_API_URL": "https://api.sharedmemory.ai",
"SHAREDMEMORY_VOLUME_ID": "your-volume-id"
}
}
}
}
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
SHAREDMEMORY_API_KEY |
Yes | — | Agent API key |
SHAREDMEMORY_API_URL |
No | https://api.sharedmemory.ai |
API endpoint |
SHAREDMEMORY_VOLUME_ID |
No | — | Default volume |
Available tools
| Tool | Description |
|---|---|
remember |
Store a fact or note |
query |
Retrieve context BEFORE answering — semantic search over memories |
get_entity |
Get entity details and relationships |
search_entities |
Search entities by name |
get_graph |
Knowledge graph overview |
list_volumes |
List accessible volumes |
delete_memory |
Delete a memory by ID |
update_memory |
Update a memory by ID |
feedback |
Submit feedback on memory relevance |
batch_remember |
Store multiple memories at once |
get_memory |
Retrieve a specific memory by ID |
get_profile |
Auto-generated user profile from memories |
get_context |
Get a context block for LLM prompting |
set_instruction |
Store a persistent rule all agents will follow |
list_instructions |
List all active instructions for a volume |
list_documents |
List uploaded documents |
Resources
| URI | Description |
|---|---|
memory://graph |
Knowledge graph for the default volume |
Prompts
| Name | Description |
|---|---|
summarize-knowledge |
Summarize all knowledge in a volume |
what-do-you-know-about |
Retrieve everything known about a topic |
Documentation
https://docs.sharedmemory.ai/sdks/mcp-server
License
MIT
SharedMemory MCP questions
How do I add SharedMemory MCP to Claude Code?
Run claude mcp add --env SHAREDMEMORY_API_KEY=<YOUR_SHAREDMEMORY_API_KEY> mcp-server -- npx -y @sharedmemory/mcp-server in your terminal. Add --scope user to make it available in every project.
How do I add SharedMemory MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does SharedMemory MCP provide?
It exposes 16 tools, including remember, query, get_entity, search_entities, get_graph.
Which AI clients are supported?
The server supports Claude Code, Claude Desktop, Cursor, VS Code Copilot, and Windsurf.