Skip to content
MCP server

Koschei

Run agent-written code under a capability policy and see what it can touch first

Runs locallyStatus and history
Pricing
Freemium
Platforms
CLI, Linux, macOS
Runs
Locally
Version
0.14.0
Listing updated
3 days ago

About Koschei

Koschei is a freemium MCP server for security. It runs locally on your machine and is started by your AI client.

Permission prompts get ignored. Koschei moves the decision to a policy you set once and a compiler that enforces it. The agent writes a small Koschei program instead of a shell command; the compiler lists every directory, network origin and environment variable it requests, and if the list fits your policy it runs, otherwise nothing executes.

Start it with uvx koschei-lang --allow-read /srv/reports --allow-net https://api.example.com. With no options, programs can only compute, and the agent cannot change the policy. A blocked program reports exactly which authority it asked for, for example reading /home/me/.ssh outside the allowed paths.

Three tools: a language reference, a check that never runs code, and a run under policy. It needs Python 3.12 or newer and is pre-1.0; process limits are a backstop, not a container.

Install

Run in a terminal

claude mcp add koschei -- uvx koschei-lang

Add to claude_desktop_config.json

{
  "mcpServers": {
    "koschei": {
      "command": "uvx",
      "args": [
        "koschei-lang"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "koschei": {
      "command": "uvx",
      "args": [
        "koschei-lang"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "koschei": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "koschei-lang"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "koschei": {
      "command": "uvx",
      "args": [
        "koschei-lang"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "koschei": {
      "command": "uvx",
      "args": [
        "koschei-lang"
      ]
    }
  }
}

What it does

Capability manifest
Lists disk, network and env access.
Policy flags
--allow-read and --allow-net.
Check without run
A tool that never executes code.
Blocked before running
Rejected programs execute nothing.
Scoped tokens
No .. or escaping symlinks.
uvx install
Nothing else to install.

Good for

  • Let an agent process reports in one folder
  • Allow one API origin
  • See what code can reach before it runs
  • Replace per-command permission prompts

Pricing

Freemium

Free for personal use; commercial licence required for commercial use

Prices change. Check koschei.dev before you buy.

Koschei FAQ

Can the agent widen the policy?

No.

What can programs do by default?

Only compute.

Platform?

Unix-like systems, Python 3.12+.

Licence?

Source-available; free for personal use, commercial licence for commercial use.

Is Koschei free?

Koschei has a free plan, with paid plans for more usage or features.

How do I add Koschei to Claude Code?

Run this command in your terminal: claude mcp add koschei -- uvx koschei-lang

What are the best alternatives to Koschei?

The closest alternatives to Koschei are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to Koschei

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools