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

> Connect AI assistants to Kremis via the Model Context Protocol.

Kremis provides an MCP (Model Context Protocol) server that enables AI assistants like Claude to interact with the knowledge graph directly.

```
Claude/GPT <── MCP (stdio) ──> kremis-mcp <── HTTP ──> kremis server
```

The MCP server (`apps/kremis-mcp`) is a pure HTTP proxy — it does **not** embed `kremis-core`. It translates MCP tool calls into REST API requests.

<Info>
  **Protocol:** rmcp 3.0 | **Transport:** stdio (JSON-RPC) | **Status:** Beta
</Info>

## Architecture

| Module      | Responsibility                                            |
| ----------- | --------------------------------------------------------- |
| `main.rs`   | Entry point: env vars, tracing to stderr, stdio transport |
| `server.rs` | `KremisMcp` + `ServerHandler` + all MCP tools via `rmcp`  |
| `client.rs` | `KremisClient`: HTTP wrapper (`reqwest`) to Kremis API    |

<Warning>
  Logging is **only** to stderr. stdout is reserved for the MCP stdio transport protocol.
</Warning>
