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

# Connect Claude and your IDE over MCP

> Let Claude Code, Cursor, VS Code and other Model Context Protocol clients search your knowledge and ask your assistants. Preview: three read-only tools.

MITHUNAI runs a [Model Context Protocol](https://modelcontextprotocol.io) server, so AI clients such as Claude Code, Cursor and VS Code can search your knowledge and ask your assistants while they work. Answers come back grounded and cited, from the same answer engine as every other channel.

<Info>
  The MCP server is in preview: it offers three read-only tools, and MITHUNAI does not yet connect
  to other MCP servers. Each text value in a tool result (a passage, a title or an answer) is
  limited to 512 characters and line breaks arrive as `\n` escapes, so a long answer is cut short.
  Use the [HTTP API](/channels/api) when you need the full answer text.
</Info>

The server exposes three **read-only** tools. None of them can change anything in your organisation.

| Tool               | What it does                                                                                                                                                 | Arguments                                                                 |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
| `list_knowledge`   | Lists the assistants you can ask and the knowledge bases you can search, with the IDs the other tools take. Archived assistants are not listed. Start here   | None                                                                      |
| `search_knowledge` | Returns the passages that best match a query, each with a citation. Does not generate an answer. Searches every collection you can read unless you name some | `query` (required), `knowledge_base_ids`, `limit` (default 5, maximum 20) |
| `ask_assistant`    | Asks an assistant and returns a grounded answer with citations, or an abstention. Each call is saved as a one-question conversation                          | `assistant_id`, `question` (both required)                                |

## Connect a client

You need:

* **The server URL**: `https://app.mithunai.com/arukz/api/v1/mcp`, or `/arukz/api/v1/mcp` on your MITHUNAI host.
* **An API key.** Create a dedicated key with the **Member** role for each person or tool. See [API keys](/administration/api-keys).

The server uses the streamable HTTP transport and authenticates with a bearer token.

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    claude mcp add --transport http mithunai https://app.mithunai.com/arukz/api/v1/mcp \
      --header "Authorization: Bearer $MITHUNAI_API_KEY"
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` in a project:

    ```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      "mcpServers": {
        "mithunai": {
          "url": "https://app.mithunai.com/arukz/api/v1/mcp",
          "headers": {
            "Authorization": "Bearer arukz_sk_..."
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="VS Code">
    Add to `.vscode/mcp.json`:

    ```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      "inputs": [
        {
          "type": "promptString",
          "id": "mithunai-key",
          "description": "MITHUNAI API key",
          "password": true
        }
      ],
      "servers": {
        "mithunai": {
          "type": "http",
          "url": "https://app.mithunai.com/arukz/api/v1/mcp",
          "headers": {
            "Authorization": "Bearer ${input:mithunai-key}"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Desktop">
    Claude Desktop connects to remote servers that need a custom header through the open-source [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) bridge. Add to `claude_desktop_config.json`:

    ```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      "mcpServers": {
        "mithunai": {
          "command": "npx",
          "args": [
            "mcp-remote",
            "https://app.mithunai.com/arukz/api/v1/mcp",
            "--header",
            "Authorization:${MITHUNAI_AUTH}"
          ],
          "env": {
            "MITHUNAI_AUTH": "Bearer arukz_sk_..."
          }
        }
      }
    }
    ```
  </Tab>
</Tabs>

<Warning>
  A configuration file holding an API key is a secret. Keep it out of version control, or use your
  client's secret or input mechanism as the VS Code example does.
</Warning>

## Try it

Once connected, ask your client something that needs your documentation:

<Prompt description="Example prompt for an MCP client connected to MITHUNAI">
  Use the mithunai tools to list the knowledge you can access, then ask the most relevant assistant
  how to configure rate limiting in our product. Quote the citations it returns.
</Prompt>

## What the server does not do

* **No write tools.** The tools only read and answer. They cannot add sources, change assistants or read settings.
* **No streaming.** `ask_assistant` returns the complete answer in one response.
* **Temporary failures are tool errors.** If the search index or model provider is unavailable, the tool returns an error result (`isError: true`) the client can show or retry. Permission and authentication problems are refused outright.
* **No browser access.** MCP clients run on desktops and servers; the endpoint does not accept cross-origin browser requests.

Tool output is your ingested content. The server tells clients to treat it as content, not as instructions, and a well-behaved client will. The control that matters is that no tool can change anything.

## Permissions and limits

The tools see exactly what the API key's role can read, inside your organisation. A request for an assistant or collection in another organisation is refused as not found.

MCP requests count against the API key's normal budget and also against a separate MCP budget of the same size. Each API key has its own budgets, so give each MCP client its own key and an agent calling tools in a loop cannot exhaust another integration's budget. See [Rate limits](/api-reference/rate-limits).

For the wire protocol, see the [MCP endpoint reference](/api-reference/mcp/mcp).
