Data as of

MCP Knowledge Graph for VS Code: Setup & Config

VS Code: Keep assistant memories as local entities, relationships, and facts across conversations.

What you can do with MCP Knowledge Graph in VS Code

Choose it for local relational memory with separate project, global, and topic-specific stores.

  • Remember project facts and relationships between assistant sessions.
  • Keep repository-specific memory in a project's .aim directory.

Before you start: MCP Knowledge Graph in VS Code

  • Node.js 22 or newer
  • An MCP-compatible AI platform

Replace the sample global memory path with your chosen directory. A project-root directory named exactly .aim takes priority when detected. Named contexts create additional JSONL databases automatically.

MCP Knowledge Graph VS Code configuration

  1. Choose VS Code configuration scope

    For MCP Knowledge Graph, open Workspace: .vscode/mcp.json. Merge into servers; preserve existing inputs.

  2. Add MCP Knowledge Graph to VS Code

    Use the mcp-knowledge-graph entry below in servers. Keep MCP Knowledge Graph's documented stdio connection fields and your other VS Code entries.

  3. Check MCP Knowledge Graph in VS Code

    MCP Knowledge Graph: Start in VS Code’s MCP controls; inspect output and trust prompts.

Config file · Workspace: .vscode/mcp.json

JSON
{
  "servers": {
    "mcp-knowledge-graph": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-knowledge-graph",
        "--memory-path",
        "/Users/yourusername/.aim"
      ],
      "env": {}
    }
  }
}

MCP Knowledge Graph tools available to VS Code

MCP Knowledge Graph's stored tool list documents 10 tools; compare it with VS Code's connected tool list, because the stored list is not a live check.

aim_memory_store

Look for aim_memory_store among VS Code's agent-mode tools after starting MCP Knowledge Graph through the MCP controls.

Create persistent records for people, projects, concepts, or other entities.

aim_memory_link

Look for aim_memory_link among VS Code's agent-mode tools after starting MCP Knowledge Graph through the MCP controls.

Connect stored entities using a named directional relationship.

aim_memory_add_facts

Look for aim_memory_add_facts among VS Code's agent-mode tools after starting MCP Knowledge Graph through the MCP controls.

Append observations to an existing entity while ignoring duplicates.

aim_memory_forget

Look for aim_memory_forget among VS Code's agent-mode tools after starting MCP Knowledge Graph through the MCP controls.

aim_memory_remove_facts

Look for aim_memory_remove_facts among VS Code's agent-mode tools after starting MCP Knowledge Graph through the MCP controls.

aim_memory_unlink

Look for aim_memory_unlink among VS Code's agent-mode tools after starting MCP Knowledge Graph through the MCP controls.

Remove relationships while preserving the linked entities.

aim_memory_read_all

Look for aim_memory_read_all among VS Code's agent-mode tools after starting MCP Knowledge Graph through the MCP controls.

Read a database's complete graph as structured JSON or readable text.

aim_memory_search

Look for aim_memory_search among VS Code's agent-mode tools after starting MCP Knowledge Graph through the MCP controls.

aim_memory_get

Look for aim_memory_get among VS Code's agent-mode tools after starting MCP Knowledge Graph through the MCP controls.

aim_memory_list_stores

Look for aim_memory_list_stores among VS Code's agent-mode tools after starting MCP Knowledge Graph through the MCP controls.

MCP Knowledge Graph: full stored tool descriptions

Troubleshooting MCP Knowledge Graph in VS Code

  • Make npx mcp-knowledge-graph (Node.js/npm) available in the workspace, container, or remote environment hosting MCP Knowledge Graph. Start through VS Code's MCP controls; inspect output and trust prompts.
  • MCP Knowledge Graph uses stdio here: VS Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: Requires Node.js 22 or newer.
  • Known limitation: Project detection depends on the exact .aim directory name.
  • Known limitation: Inconsistent context naming can create redundant databases.
  • General VS Code troubleshooting lives in the /clients/vscode guide.

MCP Knowledge Graph — details. VS Code guide

Frequently asked questions

For MCP Knowledge Graph, edit workspace .vscode/mcp.json. VS Code requires servers rather than mcpServers; preserve the displayed type on each entry.

VS Code's mcp-knowledge-graph example uses stdio.

MCP Knowledge Graph's VS Code configuration invokes npx mcp-knowledge-graph (Node.js/npm).

MCP Knowledge Graph's stored list contains 10 tools, including aim_memory_store, aim_memory_link, aim_memory_add_facts. Compare those names with VS Code's connected tool list; the stored list is not a live check.

The README uses AIM for AI Memory, reflected in tool prefixes, storage directories, and file safety markers.

A context parameter selects a named database, while omitting it uses the default memory.jsonl store.