Kg MCP Server

`kg` gives your AI assistant persistent, structured, editable project memory stored locally as a knowledge graph.

Local serverstdioPython

What is the Kg MCP server?

Connect Kg to Claude, Cursor or any other MCP client and it stops being a tab you switch to. kg gives your AI assistant persistent, structured, editable project memory stored locally as a knowledge graph. The kg mcp server is what makes that connection.

What the server does

  • Persistent memory — — keep project knowledge between conversations
  • Structured, not fuzzy — — inspect nodes, edges, facts, and gaps directly
  • Editable and reviewable — — store graphs as *.kg files with readable diffs
  • Local-first — — your project memory stays on your machine in git-friendly format
  • Works with MCP clients — — connect it as a local stdio MCP server

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • Local-first — your project memory stays on your machine in git-friendly format
  • Verb — What it does
  • stats — show graph statistics
  • strict — disable defaults for following lines
  • Relations — HAS USES STORED_IN TRIGGERS CREATED_BY AFFECTED_BY AVAILABLE_IN DOCUMENTED_IN DEPENDS_ON TRANSITIONS DECIDED_BY GOVERNED_BY READS_FROM
  • Tips — The Tips tool exposed by this server

Installation

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Where it fits

Among the knowledge and memory options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Kg's toolset — Local-first, Verb, stats and 3 more — is a fair guide to whether it matches your workflow. It is maintained by nnar1o; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
Local-firstyour project memory stays on your machine in git-friendly format
VerbWhat it does
statsshow graph statistics
strictdisable defaults for following lines
RelationsHAS USES STORED_IN TRIGGERS CREATED_BY AFFECTED_BY AVAILABLE_IN DOCUMENTED_IN DEPENDS_ON TRANSITIONS DECIDED_BY GOVERNED_BY READS_FROM
TipsThe Tips tool exposed by this server.

How to install the Kg MCP server

{
  "mcpServers": {
    "kg": {
      "command": "/absolute/path/to/kg-mcp"
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • Use Kg to Local-first.
  • Use Kg to Verb.
  • Use Kg to stats.

Frequently asked questions

It connects Kg to MCP-compatible AI assistants such as Claude and Cursor, exposing 6 tools (Local-first, Verb, stats, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Kg directly.