Skip to main content

Overview

Basic Memory integrates with VS Code through the Model Context Protocol (MCP), allowing AI assistants in VS Code to access and manage your knowledge base while you code. This is particularly useful for:
  • Documenting code decisions and architecture
  • Maintaining project-specific knowledge
  • Building context for code reviews
  • Tracking technical debt and TODOs
  • Capturing meeting notes and decisions

Prerequisites

  • VS Code with MCP support (requires compatible AI extension)
  • Basic Memory installed on your system

Installation

1

Install Basic Memory

Install Basic Memory using uv (recommended):
uv tool install basic-memory
Alternatively, use pip:
pip install basic-memory
2

Choose Configuration Method

You can configure Basic Memory for VS Code in two ways:
  • User Settings - Available across all workspaces
  • Workspace Settings - Specific to a project, can be shared with team

Configuration

Configure Basic Memory globally for all VS Code workspaces.
1

Open User Settings (JSON)

Press Ctrl+Shift+P (or Cmd+Shift+P on macOS) and type:
Preferences: Open User Settings (JSON)
2

Add MCP Configuration

Add this configuration to your user settings:
{
  "mcp": {
    "servers": {
      "basic-memory": {
        "command": "uvx",
        "args": ["basic-memory", "mcp"]
      }
    }
  }
}
If you installed with pip instead of uv, use "command": "basic-memory" and "args": ["mcp"]

Starting the Sync Process

For real-time synchronization between files and the database, run:
# One-time sync
basic-memory sync

# Real-time sync (recommended)
basic-memory sync --watch
Run basic-memory sync --watch in a VS Code terminal to keep it running while you work.

Usage Examples

Documenting Architecture Decisions

You: Create a note documenting our decision to use SQLite for
local storage instead of a full PostgreSQL setup.

AI: [Uses write_note to create architecture decision record]

Retrieving Context During Code Review

You: What was our rationale for the async client pattern?

AI: [Uses build_context to load related architecture notes]
Based on your architecture notes, the async client pattern was
chosen because...

Tracking Technical Debt

You: Add a note about the authentication refactor we need to do

AI: [Creates note with technical debt observations and relations
to affected components]

Searching Documentation

You: Find all notes about database migrations

AI: [Uses search_notes with relevant filters]
I found 5 notes about database migrations...

Development Workflows

Code Documentation Workflow

1

Write Code

Develop features as usual in VS Code
2

Document Decisions

Ask the AI to create notes about important design decisions:
"Create a note about why we chose this caching strategy"
3

Link Related Concepts

Build connections between related notes:
"Link this note to our performance optimization notes"
4

Review and Refine

Open the notes in your file browser or Obsidian to review and enhance

Meeting Notes Workflow

1

Start Meeting

Open VS Code before or during the meeting
2

Capture Notes

Ask AI to create structured meeting notes:
"Create a meeting note for today's sprint planning with attendees,
decisions, and action items"
3

Link to Relevant Code

Connect meeting decisions to code:
"Link this decision to the authentication module"

Available Tools

The AI assistant in VS Code has access to all Basic Memory tools:

write_note

Create notes with observations and relations

read_note

Read notes by title or permalink

search_notes

Full-text search across knowledge base

build_context

Navigate the knowledge graph

recent_activity

See recently updated content

list_directory

Browse project directories

edit_note

Make incremental edits to notes

canvas

Create visual knowledge maps

Viewing Your Notes

Notes are stored as Markdown files and can be viewed in:
Open notes directly in VS Code:
# Open project directory
code ~/basic-memory

# Or open specific note
code ~/basic-memory/notes/my-note.md
VS Code’s built-in Markdown preview works great for viewing notes.

Tips for VS Code Users

Create a Basic Memory project for each code repository:
basic-memory project add "my-app" ~/code/my-app/docs
Then configure .vscode/mcp.json to use that project:
{
  "servers": {
    "basic-memory": {
      "command": "uvx",
      "args": ["basic-memory", "mcp", "--project", "my-app"]
    }
  }
}
Track your knowledge base with git:
cd ~/basic-memory
git init
git add .
git commit -m "Initial knowledge base"
Install VS Code Markdown extensions for better note editing:
  • Markdown All in One
  • Markdown Preview Enhanced
  • Markdown Links
Create VS Code snippets for common note patterns:
{
  "Basic Memory Observation": {
    "prefix": "obs",
    "body": ["- [$1] $2"]
  },
  "Basic Memory Relation": {
    "prefix": "rel",
    "body": ["- $1 [[$2]]"]
  }
}

Troubleshooting

  1. Verify Basic Memory is installed: basic-memory --version
  2. Check your MCP configuration syntax in settings
  3. Restart VS Code
  4. Check VS Code’s Output panel for MCP errors
  1. Ensure Basic Memory has write access to the project directory
  2. Check file ownership: ls -la ~/basic-memory
  3. Fix permissions if needed: chmod -R u+rw ~/basic-memory
  1. Verify sync is running: basic-memory status
  2. Check for errors: basic-memory doctor
  3. Manually sync: basic-memory sync

Next Steps

Writing Effective Notes

Learn note format and best practices

Search Techniques

Master search and discovery features

Project Management

Organize knowledge with multiple projects

Visualization

Create visual knowledge maps

Build docs developers (and LLMs) love