Basic Memory MCP server

Knowledge management system that builds a persistent semantic graph in markdown, locally.
Back to servers
Setup instructions
Provider
Basic Machines
Release date
Mar 15, 2025
Language
Python
Package
Stats
83.7K downloads
2.2K stars

Basic Memory is a powerful tool that lets you build a persistent knowledge base through natural conversations with AI assistants like Claude. It stores information in simple Markdown files on your computer and uses the Model Context Protocol (MCP) to enable compatible LLMs to read and write to your local knowledge base. This allows you to pick up conversations where you left off and maintain a growing collection of structured knowledge.

Installation

Using UV (Recommended)

# Install with uv
uv tool install basic-memory

Alternative Installation via Smithery

npx -y @smithery/cli install @basicmachines-co/basic-memory --client claude

This automatically configures Basic Memory for Claude Desktop without requiring manual configuration edits.

Configuration

For Claude Desktop

  1. Edit your Claude Desktop configuration file:
# Location: ~/Library/Application Support/Claude/claude_desktop_config.json
  1. Add this configuration to the file:
{
  "mcpServers": {
    "basic-memory": {
      "command": "uvx",
      "args": [
        "basic-memory",
        "mcp"
      ]
    }
  }
}

For VS Code

Add the following to your VS Code User Settings (JSON):

{
  "mcp": {
    "servers": {
      "basic-memory": {
        "command": "uvx",
        "args": ["basic-memory", "mcp"]
      }
    }
  }
}

Alternatively, create a .vscode/mcp.json file in your workspace:

{
  "servers": {
    "basic-memory": {
      "command": "uvx",
      "args": ["basic-memory", "mcp"]
    }
  }
}

Using Basic Memory

Core Usage

Once configured, you can interact with your knowledge base:

  • Write notes with prompts like "Create a note about coffee brewing methods"
  • Read notes with prompts like "What do I know about pour over coffee?"
  • Search with prompts like "Find information about Ethiopian beans"

All knowledge is stored in ~/basic-memory (default directory location).

Syncing Your Knowledge

# One-time sync of local knowledge updates
basic-memory sync

# Run realtime sync process (recommended)
basic-memory sync --watch

Cloud Features (Optional)

# Authenticate with cloud
basic-memory cloud login

# Bidirectional sync with cloud
basic-memory cloud sync

# Verify cloud integrity
basic-memory cloud check

# Mount cloud storage
basic-memory cloud mount

Available Tools

Once configured, the LLM can use these tools:

Content Management

write_note(title, content, folder, tags) - Create or update notes
read_note(identifier, page, page_size) - Read notes by title or permalink
read_content(path) - Read raw file content (text, images, binaries)
view_note(identifier) - View notes as formatted artifacts
edit_note(identifier, operation, content) - Edit notes incrementally
move_note(identifier, destination_path) - Move notes with database consistency
delete_note(identifier) - Delete notes from knowledge base

Knowledge Graph Navigation

build_context(url, depth, timeframe) - Navigate knowledge graph via memory:// URLs
recent_activity(type, depth, timeframe) - Find recently updated information
list_directory(dir_name, depth) - Browse directory contents with filtering

Search & Discovery

search(query, page, page_size) - Search across your knowledge base

Project Management

list_memory_projects() - List all available projects
create_memory_project(project_name, project_path) - Create new projects
get_current_project() - Show current project stats
sync_status() - Check synchronization status

Visualization

canvas(nodes, edges, title, folder) - Generate knowledge visualizations

Using Multiple Projects

To use a specific project instead of the default, update your configuration:

{
  "mcpServers": {
    "basic-memory": {
      "command": "uvx",
      "args": [
        "basic-memory",
        "mcp",
        "--project",
        "your-project-name"
      ]
    }
  }
}

Example Prompts to Try

"Create a note about our project architecture decisions"
"Find information about JWT authentication in my notes"
"Create a canvas visualization of my project components"
"Read my notes on the authentication system"
"What have I been working on in the past week?"

How Knowledge Is Structured

Basic Memory uses simple Markdown files with frontmatter and special formatting:

Frontmatter

---
title: <Entity title>
type: <The type of Entity> (e.g. note)
permalink: <a uri slug>
tags:
- <optional metadata tags>
---

Observations (Facts about a topic)

- [category] content #tag (optional context)

Examples:

- [method] Pour over extracts more floral notes than French press
- [tip] Grind size should be medium-fine for pour over #brewing
- [preference] Ethiopian beans have bright, fruity flavors (especially from Yirgacheffe)

Relations (Links to other topics)

- relation_type [[WikiLink]] (optional context)

Examples:

- pairs_well_with [[Chocolate Desserts]]
- grown_in [[Ethiopia]]
- contrasts_with [[Tea Brewing Methods]]

For more information and detailed documentation, visit the Basic Memory documentation.

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 "basic-memory" '{"command":"uvx","args":["basic-memory","mcp"]}'

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": {
        "basic-memory": {
            "command": "uvx",
            "args": [
                "basic-memory",
                "mcp"
            ]
        }
    }
}

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": {
        "basic-memory": {
            "command": "uvx",
            "args": [
                "basic-memory",
                "mcp"
            ]
        }
    }
}

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