Basic Memory MCP server

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

Basic Memory is an MCP server that enables persistent knowledge through natural conversations with LLMs like Claude. It stores information in simple Markdown files on your computer, allowing AI assistants to read and write to your local knowledge base while maintaining context between conversations.

Installation

Quick Install with UV (Recommended)

# Install with uv
uv tool install basic-memory

Configure Claude Desktop

Edit your Claude Desktop configuration file at ~/Library/Application Support/Claude/claude_desktop_config.json:

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

Alternative Installation via Smithery

You can use Smithery to automatically configure Basic Memory for Claude Desktop:

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

Setting Up VS Code Integration

One-Click Installation

Use the VS Code installation badges provided on the Basic Memory website.

Manual VS Code Configuration

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

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

Alternatively, add it to .vscode/mcp.json in your workspace:

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

Usage

By default, Basic Memory stores files in ~/basic-memory. Files sync in real-time when edits are made.

In Claude Desktop

You can use these commands in your conversations:

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

Available Tools

Basic Memory provides several tools that LLMs can use:

write_note(title, content, folder, tags) - Create or update notes
read_note(identifier, page, page_size) - Read notes by title or permalink
build_context(url, depth, timeframe) - Navigate knowledge graph via memory:// URLs
search_notes(query, page, page_size) - Search across your knowledge base
recent_activity(type, depth, timeframe) - Find recently updated information
canvas(nodes, edges, title, folder) - Generate knowledge visualizations

Example Prompts

Try these prompts with Claude:

"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?"

Using Multiple Projects

If you want to use a specific project, update your Claude Desktop config:

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

How Notes Are Structured

Notes are stored as Markdown files with specific formatting:

Frontmatter

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

Observations (Facts)

- [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]]
- requires [[Burr Grinder]]

How to add this MCP server to 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 > MCP and click "Add new global MCP server".

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

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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