# Koschei

> Koschei is a freemium MCP server for security. Run agent-written code under a capability policy and see what it can touch first. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** CLI, Linux, macOS
- **Website:** https://koschei.dev/agents
- **Repository:** https://github.com/bugsbuny243/koschei-lang
- **MCP Registry name:** io.github.bugsbuny243/koschei
- **Categories:** security, developer tools
- **Listing updated:** 2026-11-14

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
claude mcp add koschei -- uvx koschei-lang
```

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## 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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/koschei
