> For the complete documentation index, see [llms.txt](https://k-ai.gitbook.io/knowledge-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://k-ai.gitbook.io/knowledge-ai/k-ai-mcp/mcp.md).

# Overview

K-AI exposes two Model Context Protocol (MCP) servers — one for Retrieval (5 tools, the canonical replacement of the `/search` endpoint that was removed from the K-AI Instance API in April 2026 — see [Removed endpoints](/knowledge-ai/sources-and-ingestion/instance-api/removed-endpoints.md)) and one for Audit (21 curated tools). MCP clients (Claude Desktop, Cursor, Mistral Le Chat, any MCP-compatible agent) discover OAuth at each MCP URL and authenticate the end-user once. A single token grants access to every K-AI instance the user is entitled to, on both servers. The host LLM does the orchestration; K-AI exposes primitives, not a chat strategy.

## Two MCP servers

* `https://api-retrieval.kai-studio.ai/mcp` — **5 tools**. The Activate surface over Retrieval. See [Retrieval tools](/knowledge-ai/k-ai-mcp/retrieval-tools.md).
* `https://api-audit.kai-studio.ai/mcp` — **21 tools**. The Activate surface over K-AI Audit, organised conflict-first. See [Audit tools](/knowledge-ai/k-ai-mcp/audit-tools.md). Both servers follow the [schema stability policy](/knowledge-ai/k-ai-mcp/schema-stability.md).

Both servers use Streamable HTTP transport and are stateless (no server-side sessions).

## Authentication

Two ways in, one authorization chain.

**Interactive clients — OAuth 2.1.** Both surfaces share a single Authorization Server: `https://auth-api.kai-studio.ai`. Clients discover it via `/.well-known/oauth-authorization-server` on either MCP host. Tokens are signed JWTs and are accepted on both surfaces — register your client once, use it everywhere. See [OAuth 2.1](/knowledge-ai/authentication/oauth.md) for the full flow.

**Autonomous agents — Organization API key.** A key created in the K-AI Studio portal is accepted **directly** in `Authorization: Bearer` on both MCP endpoints, with no consent screen and no exchange step. This is the path for agent platforms that have no human to authorize anything. See [Autonomous agents (API key)](/knowledge-ai/k-ai-mcp/autonomous-agents.md).

Either way, identity is propagated into every tool call and authorized the same way — group-based RBAC, per-instance visibility, and instructions.

## Quick start

The fastest path is Cursor: two one-click install buttons (one per server). Claude Desktop and Mistral Le Chat require UI steps via their respective Custom Connector panels — see [Connect a client](/knowledge-ai/k-ai-mcp/connect-a-client.md).

## What's in this section

| Page                                                                       | Purpose                                                        |
| -------------------------------------------------------------------------- | -------------------------------------------------------------- |
| [What is MCP](/knowledge-ai/k-ai-mcp/what-is-mcp.md)                       | Protocol primer; why K-AI exposes MCP.                         |
| [Connect a client](/knowledge-ai/k-ai-mcp/connect-a-client.md)             | Install in Claude Desktop, Cursor, Mistral Le Chat.            |
| [OAuth flow (detailed)](/knowledge-ai/k-ai-mcp/oauth-flow.md)              | Sequence diagram, endpoints, troubleshooting.                  |
| [Autonomous agents (API key)](/knowledge-ai/k-ai-mcp/autonomous-agents.md) | Drive MCP with an Organization API key — no OAuth, no browser. |
| [Retrieval tools](/knowledge-ai/k-ai-mcp/retrieval-tools.md)               | The 5 Retrieval MCP tools.                                     |
| [Audit tools](/knowledge-ai/k-ai-mcp/audit-tools.md)                       | The 21 curated Audit MCP tools.                                |
| [Cookbook](/knowledge-ai/k-ai-mcp/cookbook.md)                             | Multi-tool recipes (Retrieval + Audit).                        |
| [Schema stability policy](/knowledge-ai/k-ai-mcp/schema-stability.md)      | What we commit to keep stable, deprecation policy.             |
