A-MEM (Agentic Memory) MCP server

Provides persistent memory capabilities for coding contexts using ChromaDB vector storage and semantic search, enabling storage and retrieval of coding memories with AI-generated keywords, automated memory network evolution, and contextual assistance across development sessions.
Back to servers
Setup instructions
Provider
nixlim
Release date
Jul 17, 2025
Language
TypeScript
Stats
6 stars

This MCP server provides a Zettelkasten-based memory system for Claude, allowing persistent context awareness across multiple coding sessions. It creates a "living" memory system that evolves as new information is added, automatically discovering relationships between memories.

Installation

Quick Installation

The easiest way to get started is with the one-command installation:

git clone [email protected]:nixlim/amem_mcp.git
cd amem_mcp
./scripts/install.sh

This installer will:

  • Check all prerequisites and dependencies
  • Detect your Claude installation
  • Clean up existing containers and processes
  • Start A-MEM services with Docker
  • Configure Claude MCP integration
  • Test the installation and verify connectivity

Manual Installation

If you prefer to install manually:

  1. Ensure you have Docker, Docker Compose, Go 1.23+, and an OpenAI API key
  2. Set up your configuration:
    cp .env.example .env
    
  3. Add your OpenAI API key to the .env file
  4. Start the services:
    docker-compose up -d && make build
    

Verification

After installation, verify that A-MEM is working correctly:

# Check services
docker-compose ps

# Validate installation
./scripts/validate_installation.sh

You can also verify in Claude by asking: "What tools do you have available?" - you should see memory-related tools in the response.

Usage

The server provides three main MCP tools that Claude can use:

1. Store Coding Memory

Stores code snippets with AI-generated analysis:

{
  "tool": "store_coding_memory",
  "arguments": {
    "content": "function fibonacci(n) { return n <= 1 ? n : fibonacci(n-1) + fibonacci(n-2); }",
    "project_path": "/projects/algorithms",
    "code_type": "javascript",
    "context": "Recursive implementation of Fibonacci sequence"
  }
}

2. Retrieve Relevant Memories

Search for relevant memories using vector similarity:

{
  "tool": "retrieve_relevant_memories",
  "arguments": {
    "query": "How to implement fibonacci efficiently?",
    "max_results": 5,
    "min_relevance": 0.7
  }
}

3. Evolve Memory Network

Triggers memory network evolution to update connections and relationships:

{
  "tool": "evolve_memory_network",
  "arguments": {
    "trigger_type": "manual",
    "scope": "recent",
    "max_memories": 100
  }
}

Workspace Management

The server supports workspace management with these additional tools:

  • workspace_init: Initialize a workspace for your project
  • workspace_create: Create a new workspace
  • workspace_retrieve: Get memories from a specific workspace

Configuration

Configuration is managed through YAML files and environment variables:

  • config/development.yaml - Development settings
  • config/production.yaml - Production settings
  • .env - Environment variables (API keys, overrides)

Troubleshooting

Common Issues

  1. ChromaDB connection failed:

    • Ensure ChromaDB is running: docker-compose ps chromadb
    • Check URL in config: chromadb.url
  2. LLM API errors:

    • Verify API key in .env file
    • Check rate limits and quotas
  3. Memory storage errors:

    • Check ChromaDB logs: docker-compose logs chromadb
    • Verify collection initialization

Viewing Logs

# Docker deployment
docker-compose logs amem-server

# Direct execution
./amem-server -log-level debug

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "amem" '{"command":"docker-compose","args":["up","-d"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "amem": {
            "command": "docker-compose",
            "args": [
                "up",
                "-d"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "amem": {
            "command": "docker-compose",
            "args": [
                "up",
                "-d"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later