Skip to main content
Glama
you06

mem9 MCP Server

by you06

@mem9/mcp-server

Universal MCP Server for mem9 memory service. One server, all platforms.

Quick Start

# Requires a running mnemo-server and API key
git clone https://github.com/you06/mem9-mcp.git
cd mem9-mcp
npm install

Environment Variables

Variable

Required

Default

Description

MEM9_API_KEY

Yes

-

API key for authentication (also serves as tenant ID)

MEM9_API_URL

No

https://api.mem9.ai

mnemo-server base URL

MEM9_AGENT_ID

No

auto-detected

Agent identifier

MEM9_LOG_LEVEL

No

info

Log level: debug, info, warn, error

MEM9_TIMEOUT_MS

No

10000

HTTP request timeout (ms)

MEM9_SEARCH_LIMIT

No

10

Default search result limit

Agent ID is auto-detected from platform environment variables (CURSOR_WORKSPACE, CLAUDE_CODE_VERSION, CODEX_CLI_VERSION).

Related MCP server: Mem0 MCP Server

Tools

Tool

Description

memory_store

Store a new memory (processed via fact extraction)

memory_search

Search memories by semantic similarity and keywords

memory_get

Retrieve a specific memory by ID

memory_update

Update an existing memory (direct field update)

memory_delete

Delete a memory

Development

npm install
npm run build
npm test

Local Testing with Claude Code / Codex

Before publishing, you can test the MCP server locally by pointing to the built entry file:

Claude Code:

claude mcp add mem9 -e MEM9_API_KEY=your-key -e MEM9_API_URL=http://localhost:8080 -- node /path/to/mem9-mcp/dist/index.js

Or in .mcp.json:

{
  "mcpServers": {
    "mem9": {
      "command": "node",
      "args": ["/path/to/mem9-mcp/dist/index.js"],
      "env": {
        "MEM9_API_URL": "http://localhost:8080",
        "MEM9_API_KEY": "your-key"
      }
    }
  }
}

Codex:

codex mcp add mem9 -- node /path/to/mem9-mcp/dist/index.js

Or in .codex/config.toml:

[mcp_servers.mem9]
command = "node"
args = ["/path/to/mem9-mcp/dist/index.js"]

[mcp_servers.mem9.env]
MEM9_API_URL = "http://localhost:8080"
MEM9_API_KEY = "your-key"

After code changes, run npm run build and restart the MCP client to pick up the new build.

Platform Setup

Cursor

Settings > Features > MCP Servers:

{
  "mcpServers": {
    "mem9": {
      "command": "npx",
      "args": ["-y", "@mem9/mcp-server"],
      "env": {
        "MEM9_API_URL": "http://localhost:8080",
        "MEM9_API_KEY": "your-key"
      }
    }
  }
}

Claude Code

claude mcp add mem9 -- npx -y @mem9/mcp-server

Or in .mcp.json:

{
  "mcpServers": {
    "mem9": {
      "command": "npx",
      "args": ["-y", "@mem9/mcp-server"],
      "env": {
        "MEM9_API_URL": "http://localhost:8080",
        "MEM9_API_KEY": "your-key"
      }
    }
  }
}

OpenAI Codex

codex mcp add mem9 -- npx -y @mem9/mcp-server

Or in .codex/config.toml:

[mcp_servers.mem9]
command = "npx"
args = ["-y", "@mem9/mcp-server"]

[mcp_servers.mem9.env]
MEM9_API_URL = "http://localhost:8080"
MEM9_API_KEY = "your-key"

License

Apache-2.0

Available Tools

5 tools
memory_deleteA

Delete a memory that is no longer relevant or accurate. Use this to clean up outdated information. This action is irreversible.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesThe memory ID to delete.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Given no annotations are provided, the description carries the burden of behavioral disclosure. It explicitly states 'This action is irreversible,' which is a critical behavioral trait for a destructive tool. It doesn't detail additional effects, but the irreversibility warning is a strong disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with two sentences that cover purpose, usage, and a critical warning. Every sentence earns its place with no redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple delete operation with one parameter and no output schema, the description is complete: it states what is deleted, when to use it, and warns about irreversibility. The context is fully covered without needing additional detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema fully describes the 'id' parameter as 'The memory ID to delete.' The description adds no additional semantic information beyond this, so with 100% schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Delete') and a clear resource ('a memory'), directly stating its function. It distinguishes itself from sibling tools like memory_get, memory_store, and memory_update by focusing on removal.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context by stating 'Use this to clean up outdated information' and specifying the condition 'no longer relevant or accurate.' However, it does not explicitly mention alternatives or when not to use this tool, so it falls short of full guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memory_getA

Retrieve a specific memory by its ID. Use this when you have a memory ID from a previous search and need the full content.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesThe memory ID (UUID format).

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. The verb 'retrieve' clearly indicates a read-only, non-destructive operation, which is behaviorally transparent for a simple getter. It also mentions that it returns 'full content,' setting expectations for the response, though it does not detail edge cases like missing IDs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, with the main action front-loaded. The first sentence states the purpose; the second clarifies usage. No redundant information or filler words. Every sentence serves a distinct function: definition and usage guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one parameter and no output schema, the description adequately covers the essentials: what it does, when to use it, and what the input should be. It references sibling tools implicitly by mentioning 'previous search,' providing context for integration. The simplicity of the operation doesn't demand more detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage for the single parameter 'id', describing it as a UUID. The tool description adds context beyond the schema by stating the ID comes from 'a previous search,' helping the agent understand the provenance and relationship to sibling tools. This adds meaningful usage semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Retrieve a specific memory by its ID.' It uses a specific verb with a resource and scope, distinguishing it from siblings like memory_search (which finds memories without an ID) and memory_delete/memory_update (which modify memories). The additional clause 'need the full content' further clarifies its purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides usage guidance: 'Use this when you have a memory ID from a previous search and need the full content.' This tells the agent the prerequisite (an existing memory ID) and the typical workflow (search first, then retrieve). It implies that this tool is not for initial discovery, contrasting with memory_search.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memory_storeA

Store a new memory. The content will be processed asynchronously by the memory service (fact extraction and reconciliation) — it is not stored verbatim and may take a few seconds to become searchable. Use this when you learn something worth remembering: user preferences, project conventions, important decisions, recurring patterns, or any context that would be useful in future sessions. Do NOT store trivial or transient information like current file paths, temporary debug notes, or information that only matters in the current session. Note: the response does not include the stored memory's ID. If you need to update or delete a memory you just stored, use memory_search to find it first.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNoOptional tags for categorization (e.g., ['coding-style', 'python', 'user-preference']).
contentYesThe memory content to store. Be specific and self-contained — this should make sense when retrieved later without additional context.
metadataNoOptional key-value metadata (e.g., { 'project': 'web-app', 'source': 'code-review' }).
session_idNoOptional session identifier to associate this memory with a specific conversation or workflow.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully discloses key behaviors: asynchronous processing, non-verbatim storage, searchability delay, and the absence of the stored memory's ID in the response. It also implicitly warns about the processing pipeline, exceeding expectations for transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently front-loaded with the core action and expands into necessary behavioral disclosures and usage guidance. Each sentence adds distinct value: purpose, async behavior, appropriate content, exclusions, and ID caveat. No redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of annotations and output schema, the description carries the full contextual burden and does so admirably: it explains the async processing, searchability delay, appropriate content, exclusions, and the response limitation regarding IDs. The schema covers parameters comprehensively, so no additional parameter context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters with specific examples and guidance. The description adds only tangential context (async processing) that affects content meaning but does not enhance understanding of individual parameters. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('Store') and resource ('a new memory'), explicitly distinguishing it from sibling memory tools (get/delete/search/update) by focusing on creation. It also clarifies the async behavior and non-verbatim storage, making the purpose 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.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage criteria with concrete examples of appropriate content (user preferences, project conventions, important decisions) and explicit exclusions (trivial/transient info). It also directs users to memory_search for subsequent updates/deletes, clearly demarcating when not to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memory_updateA

Update an existing memory. Use this when information has changed, needs correction, or should be enriched with additional context. Provide the memory ID and at least one field to update. This is a direct field update — content is NOT re-processed through reconciliation.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesThe memory ID to update.
tagsNoUpdated tags (replaces the entire tag list). Omit to keep current tags.
contentNoThe updated memory content (replaces the existing content). Omit to keep current content.
metadataNoUpdated metadata (replaces existing metadata). Omit to keep current metadata.

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations available, the description carries the full burden. It reveals key behavioral traits: it is a direct field update, not re-processed through reconciliation, and requires at least one field to update beyond the ID. This goes beyond the schema by clarifying operational semantics, though it doesn't address permissions or return behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences long, front-loaded with the core action, and every sentence provides necessary information. There is no redundancy or fluff, making it efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity and complete schema descriptions, the description covers purpose, usage, behavioral caveats, and parameter constraints. It does not mention return values, but with no output schema this is a minor gap. Overall, it is sufficiently complete for an AI agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers 100% of parameters with descriptions, so baseline is 3. The description adds a crucial semantic constraint: 'Provide the memory ID and at least one field to update,' which is not enforced by the schema (only id is required). This clarifies invocation requirements and adds value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action: 'Update an existing memory.' It distinguishes the tool from siblings by specifying it modifies existing memories rather than creating, retrieving, deleting, or searching. The verb 'update' plus resource 'memory' 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.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage context: 'Use this when information has changed, needs correction, or should be enriched with additional context.' It also sets expectations with 'direct field update' and notes the need for at least one field. However, it does not explicitly name alternative tools or state when not to use it, so it's just under a full 5.

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.

  1. 5 tool updatesv0.1.0
    • First observedmemory_delete
    • First observedmemory_get
    • First observedmemory_search
    • First observedmemory_store
    • First observedmemory_update

TDQS

A4.4/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct operation: create (store), read (get/search), update, and delete. There is no overlap between retrieving by ID, searching, storing, updating, or deleting.

Naming Consistency5/5

All tool names follow the same verb_noun pattern: memory_get, memory_delete, memory_store, memory_search, memory_update. Consistent and predictable.

Tool Count5/5

Five tools is well-scoped for a memory server. It covers all core operations without unnecessary bloat or missing essentials.

Completeness5/5

The tool set provides full CRUD coverage (store, get, update, delete) plus search, which is the complete lifecycle for a memory service. No obvious gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI applications to use advanced memory management capabilities through the memU AI framework. Supports storing conversation memories, semantic retrieval, multi-user management, and memory statistics via standardized MCP protocol.
    3
    MIT
  • A
    license
    A
    quality
    Not graded
    maintenance
    Enables AI applications to add, search, update, and delete long-term memories using the Mem0 Memory API, allowing agents to persistently remember user preferences, conversation history, and contextual information across sessions.
    9
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to store and retrieve persistent memories with a web management interface. Supports creating, searching, and managing memories through natural language commands or a visual web dashboard.
    14
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Adds persistent memory to AI assistants by connecting to the Memphora cloud platform, allowing them to store and recall facts across conversations. It enables tools for searching memories, extracting insights, and maintaining long-term user context and preferences.
    5
    3
    MIT