Skip to main content
Glama
SharedMemory MCP Server

SharedMemory MCP Server

Official

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

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

Related MCP server: BaseGrid MCP Server

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

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

Available Tools

18 tools
batch_rememberA

Store multiple facts or pieces of information at once. More efficient than calling remember() in a loop.

Inputs: memories (required), volume_id, user_id, session_id, +2 more.

decideA

Ask SharedMemory to make a decision or answer a question based on all stored knowledge. Returns an answer with confidence score, supporting evidence, applicable procedures, and conflict detection. Use this when you need a definitive answer about 'what should we do?' or 'how do we handle X?'

Inputs: question (required), volume_id, domain, fast.

delete_memoryB

Delete an existing memory by ID.

Inputs: memory_id (required), volume_id.

feedbackA

Submit feedback on a memory's relevance. Helps improve future recall quality.

Inputs: memory_id (required), feedback (required), volume_id, reason.

get_contextA

Assemble a smart context block from stored memories. Returns a pre-formatted context string ready to inject into a system prompt.

Inputs: volume_id, user_id, max_tokens.

get_entityA

Get everything SharedMemory knows about a specific entity (person, project, concept, etc). Returns the summary, all facts, and relationships.

Inputs: name (required), volume_id.

get_graphB

Get an overview of the entire knowledge graph for a volume. Shows all entities and their relationships — like a map of everything SharedMemory knows.

Inputs: volume_id, limit.

get_memoryB

Retrieve a specific memory by its ID. Useful for viewing the full details of a memory found via recall.

Inputs: memory_id (required), volume_id.

get_profileA

Get a comprehensive profile for a volume or user. Returns categorized facts (identity, preferences, expertise, projects), relationships, recent activity, instructions, topics, stats, and a pre-formatted context_block for LLM injection.

Inputs: user_id, volume_id, refresh.

list_documentsA

List all documents that have been uploaded and processed for a volume.

Inputs: volume_id.

list_instructionsA

List all active instructions/rules for a volume. These are automatically included in every context assembly.

Inputs: volume_id.

list_volumesA

List all memory volumes (projects) this API key has access to. Each volume is an independent memory space.

Inputs: no named parameters.

profileA

Get a structured profile for any entity (person, project, team, concept, company). Returns their role, facts, relationships, recent activity, and confidence level. Use this to understand 'who is X?' or 'what is project Y?'

Inputs: entity (required), volume_id.

queryA

Retrieve context BEFORE answering. Searches SharedMemory for relevant memories using semantic similarity. Returns matching memories from vector search + related knowledge graph facts.

Inputs: query (required), volume_id, limit, date_from, +6 more.

rememberA

Store a fact, note, or piece of information in SharedMemory. The memory pipeline will classify it, check for conflicts, extract knowledge, and build the graph automatically.

Inputs: content (required), volume_id, memory_type, event_date, +5 more.

search_entitiesA

Search for entities in the knowledge graph by name. Useful for finding people, projects, concepts, etc.

Inputs: query (required), volume_id, limit.

set_instructionA

Store a persistent instruction or rule for a volume. Instructions are automatically included in every context assembly — any agent querying this volume will see them. Use for coding conventions, project rules, team preferences, or architectural decisions that all agents should follow.

Inputs: content (required), volume_id.

update_memoryB

Update the content of an existing memory by ID.

Inputs: memory_id (required), content (required), volume_id.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 18 tools

    Disambiguation4/5

    Most tools have distinct purposes, but 'get_entity' and 'profile' are very similar in function, which could cause confusion. Descriptions help differentiate them, but the overlap is notable.

    Naming Consistency4/5

    The predominant pattern is verb_noun lowercase with underscores, but 'profile' and 'decide' are verb-only outliers, breaking perfect consistency. Overall, the naming is still predictable.

    Tool Count5/5

    18 tools cover a wide range of memory operations without being excessive. Each tool serves a clear, non-redundant role in storing, retrieving, managing, and deciding based on knowledge.

    Completeness4/5

    The tool surface covers CRUD, search, context assembly, and decision-making. Missing volume creation/deletion and advanced ability management, but the core memory workflows are well-served.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Persistent memory for Claude Code. Automatically indexes every conversation and provides production-grade hybrid search (BM25 + vectors + reranker) via MCP tools. 100% local, zero config, zero API keys, zero invoice.
      16
      50 npm
      8
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Gives Claude Desktop, Cursor, Cline, and other MCP-compatible AI tools persistent memory, enabling them to store and recall information seamlessly across sessions.
      1
      Apache 2.0