> ## Documentation Index
> Fetch the complete documentation index at: https://kremis.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Setup

> How to configure the Kremis MCP server with AI assistants.

## Prerequisites

1. A running Kremis HTTP server
2. The `kremis-mcp` binary (built from `apps/kremis-mcp` or extracted from a release tarball)

## Build

```bash theme={null}
cargo build -p kremis-mcp --release
```

## Configuration

| Variable            | Default                 | Description                         |
| ------------------- | ----------------------- | ----------------------------------- |
| `KREMIS_URL`        | `http://localhost:8080` | Kremis server URL                   |
| `KREMIS_API_KEY`    | (none)                  | Optional Bearer token               |
| `KREMIS_LOG_FORMAT` | `text`                  | Log output format: `text` or `json` |

## Claude Desktop

Add to your `claude_desktop_config.json`:

```json theme={null}
{
  "mcpServers": {
    "kremis": {
      "command": "/path/to/kremis-mcp",
      "env": {
        "KREMIS_URL": "http://localhost:8080",
        "KREMIS_API_KEY": "your-key-here"
      }
    }
  }
}
```

## Claude Code

Add to your `.mcp.json` or project settings:

```json theme={null}
{
  "mcpServers": {
    "kremis": {
      "command": "/path/to/kremis-mcp",
      "env": {
        "KREMIS_URL": "http://localhost:8080"
      }
    }
  }
}
```

## Manual Testing

```bash theme={null}
# Start the Kremis server first
kremis server

# In another terminal, run the MCP server
KREMIS_URL=http://localhost:8080 ./target/release/kremis-mcp
```

The MCP server communicates via stdin/stdout using JSON-RPC. It will wait for MCP protocol messages.
