KRouter logo

KRouter

Local Markdown memory for coding agents, with cited recall, connected pages, corrections, and explicit no-match results.

Install KRouter

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "krouter": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/398894496-arch/KRouter",
        "krouter"
      ],
      "env": {
        "KROUTER_STRICT": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env KROUTER_STRICT=YOUR_VALUE_HERE --transport stdio krouter -- uvx --from git+https://github.com/398894496-arch/KRouter krouter

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

The install command installed and started the server, which then stopped for configuration (such as an API key) that our sandbox does not have — expected for servers that connect to your account.

uvx --from git+https://github.com/398894496-arch/KRouter krouter

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

KRouter MCP server connects AI agents to a local folder of plain-Markdown memory pages, recalling decisions, related context, and lessons without sending lookups to a model. It can surface memory through MCP tools, session-start context, and prompt hooks, depending on the host application. Answers identify their source page and distinguish direct, related, and absent memory. Reach for KRouter when an agent needs durable, editable knowledge that can be inspected in Obsidian or any text editor.

Use cases

  • Recall earlier decisions while coding
  • Carry task lessons into new work
  • Inspect why a memory page was selected
  • Keep an editable agent memory in Markdown
  • Prevent superseded decisions from competing with corrections

Key features

  • Local plain-Markdown memory
  • Connected-page retrieval
  • Prompt-hook and session-start recall
  • Source-page citations
  • Direct, related, and no-match classifications
  • Inspectable memory with view and why commands

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

6/6 checks healthy over the last 18d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · krouter (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars80Stargazers on the source repository.
Last commit5d agoMost recent push to the default branch.
Install checkRunsOur sandbox started it; it then asked for an API key or config.

How KRouter works

What KRouter does

KRouter gives coding agents access to a local Markdown memory. The memory can contain decisions, changed opinions, task lessons, and other pages that should carry between sessions. When an agent encounters a matching topic, KRouter can return the relevant page along with connected pages, such as linked material, replacements, pages from the same session, or pages commonly cited together.

The Markdown files remain ordinary files that a person can open and edit in Obsidian or another editor. KRouter preserves the distinction between decisions and reference material: declared knowledge-base content does not count as the memory's answer. Corrections replace an older answer rather than leaving competing versions active.

Each result identifies its source page. KRouter also reports when the memory has no match and gives a confidence distinction when the result is only related. This makes the returned context inspectable instead of presenting an approximate match as a settled fact.

How it works

KRouter uses two recall paths. A prompt hook performs a local lookup for each message, without a model call and without sending the message elsewhere. It can match a page or alias named in the message, or a page whose wording is clearly the best match. For unrelated messages, the hook returns nothing.

At session start, an index of settled topics can be placed in front of the agent. The agent can then fetch the relevant page itself. Claude Code and Codex support both layers; Cursor supports the session-start layer. Applications that only run the MCP server receive its lookup tools rather than automatic hook behavior.

A lookup returns up to five pages: three matching pages and up to two pages connected to those matches. Lessons can be offered in a different task with the same situation. Repeatedly useful lessons can develop into skills, while unused lessons and hook triggers recede after 60 days. The hot_days setting controls that period rather than changing the stored rules themselves.

Setup and configuration

Install with the release bootstrap script, then run the included krouter doctor command to check the installation and krouter search to make an initial query. The installer detects compatible AI applications and asks no setup questions. Existing memory folders are retained; only missing installation files are added, and uninstalling does not remove the memory.

A temporary demonstration is available through uvx, so the example memory can be tried without installing the system or using an API key. KRouter also supports a minimal installation mode and Windows installation. Its memory can be used with Claude Desktop and Obsidian.

Set KROUTER_STRICT=1 to treat related matches as no match. Strict mode is disabled by default.

Tools and capabilities

  • Search the local Markdown memory from the command line or through MCP lookup tools.
  • Return matching pages together with connected pages.
  • Show stored content with krouter view.
  • Explain why a result was selected with krouter why.
  • Expose source-page citations with each recalled answer.
  • Mark results as direct, related, or none.
  • Keep a session-start topic index and use prompt hooks where the host supports them.
  • Carry lessons between tasks and replace superseded decisions.

Limitations and notes

Automatic recall depends on the host. MCP-only applications do not receive the prompt hook or session-start behavior unless they provide those hooks separately. KRouter's local lookup does not use a model and does not send the lookup out, but the agent may still read and use the returned page according to its own behavior.

A related page is not necessarily an answer. In the default mode, KRouter labels that situation and supplies a confidence level; strict mode treats it as no memory match. The system reports no match when nothing in the memory fits, but this is not a guarantee that an agent will always refuse to answer.

Published evaluations use small, invented or benchmark datasets and should be read as test results rather than universal accuracy guarantees. The memory is local Markdown, so its usefulness depends on the pages, aliases, links, and lessons stored in the vault.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about KRouter

KRouter is an MCP server that connects AI coding agents to a local folder of plain-Markdown memory. Its main capabilities are searching and recalling pages, returning connected context, showing stored content with `krouter view`, and explaining selections with `krouter why`, while citing the page used and reporting when memory has no answer.

Install it with the release bootstrap script, then run `~/.dsh-krouter/current/scripts/krouter doctor` to check the setup. Use `krouter search` for an initial query. The installer detects compatible AI applications, preserves an existing memory folder, and does not require an API key.

Yes, KRouter works with Cursor through its session-start recall layer. Cursor does not receive the prompt-hook layer described for Claude Code and Codex, while an MCP-only application gets the lookup tools without automatic recall.

Yes, KRouter keeps existing files in place and adds only missing installation files. The memory remains ordinary Markdown that can be opened and edited in Obsidian or another editor, and uninstalling does not delete it.

Set `KROUTER_STRICT=1`. Strict mode treats a related result as no match instead of passing the related page to the agent as usable memory; the default configuration leaves strict mode off.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewKRouter AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/krouter?style=directory)](https://allmcps.com/mcp/krouter)
HTML Embed
<a href="https://allmcps.com/mcp/krouter"><img src="https://allmcps.com/api/badge/krouter?style=directory" alt="KRouter on AllMCPs" /></a>