mcpField
M
memory

memory

Local
github.com/sharedmemoryaiMemory & Knowledge1Updated 24w ago

About memory

SharedMemory’s MCP server gives Claude Code, Cursor, VS Code Copilot, and other compatible tools persistent memory through a shared knowledge graph. It supports storing, retrieving, and updating memories, along with volume, document, and instruction management.

Key features

  1. 01Store and retrieve memories
  2. 02Semantic search and entity lookup
  3. 03Explore the shared knowledge graph
  4. 04Manage volumes, documents, and instructions
  5. 05Batch storage and memory feedback

Use cases

  1. 01Share persistent context across agents
  2. 02Retrieve relevant memories before answering
  3. 03Look up entities and their relationships
  4. 04Maintain shared, long-term instructions

MCP support

The MCP server provides compatible clients with tools for memories, entities, graphs, documents, and instructions. It also exposes the default volume’s memory://graph resource and two prompts.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"sharedmemoryai-memory": {
"command": "npx",
"args": [
"-y",
"@sharedmemory/mcp-server"
],
"env": {
"SHAREDMEMORY_API_KEY": "<SHAREDMEMORY_API_KEY>",
"SHAREDMEMORY_API_URL": "<SHAREDMEMORY_API_URL>",
"SHAREDMEMORY_VOLUME_ID": "<SHAREDMEMORY_VOLUME_ID>"
}
}
}
}
Run commandnpx -y @sharedmemory/mcp-server
Environment variables to set
SHAREDMEMORY_API_KEYSecretYour SharedMemory API key
SHAREDMEMORY_API_URLAPI endpoint URL
SHAREDMEMORY_VOLUME_IDDefault volume/project ID

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@sharedmemory/mcp-server2.1.1

Tools

12

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
contentstringYesThe fact, note, or information to remember
volume_idstringNoVolume (memory space) ID. Uses default if not set.
memory_typeenumNoType hint for the memory. Default: factualfactual | preference | event | relationship | technical

Details

From the project README

@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.md into 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

VariableRequiredDefaultDescription
SHAREDMEMORY_API_KEYYes—Agent API key
SHAREDMEMORY_API_URLNohttps://api.sharedmemory.aiAPI endpoint
SHAREDMEMORY_VOLUME_IDNo—Default volume

Available tools

ToolDescription
rememberStore a fact or note
queryRetrieve context BEFORE answering — semantic search over memories
get_entityGet entity details and relationships
search_entitiesSearch entities by name
get_graphKnowledge graph overview
list_volumesList accessible volumes
delete_memoryDelete a memory by ID
update_memoryUpdate a memory by ID
feedbackSubmit feedback on memory relevance
batch_rememberStore multiple memories at once
get_memoryRetrieve a specific memory by ID
get_profileAuto-generated user profile from memories
get_contextGet a context block for LLM prompting
set_instructionStore a persistent rule all agents will follow
list_instructionsList all active instructions for a volume
list_documentsList uploaded documents

Resources

URIDescription
memory://graphKnowledge graph for the default volume

Prompts

NameDescription
summarize-knowledgeSummarize all knowledge in a volume
what-do-you-know-aboutRetrieve everything known about a topic

Documentation

https://docs.sharedmemory.ai/sdks/mcp-server

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.