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

# MCP Server

Our MCP server lets coding agents search the docs and read your account. It's a remote HTTP server at:

```
https://mcp.flexinference.com/mcp
```

## Connecting

```json mcp.json theme={null}
{
  "mcpServers": {
    "flexinference": {
      "type": "http",
      "url": "https://mcp.flexinference.com/mcp"
    }
  }
}
```

```bash Claude Code theme={null}
claude mcp add --transport http flexinference https://mcp.flexinference.com/mcp
```

The first account call opens a browser for dashboard login and shows the requested scopes, which you can approve or narrow. Docs tools need no login.

## Tools without login

* `search_docs` searches the docs and the full error catalog, and returns the best matches with links.
* `get_error_reference` looks up what an error code means and how to fix it. Leave `code` out to list every code.
* `run_flex_demo` sends one prompt twice on the same model, once through the Flex Race and once as a default request, and returns both answers with the billed comparison. One run per IP address per day.
* `compare_usage_export` prices a usage CSV export (OpenAI platform, Anthropic console, or OpenRouter) at each model's measured rate and returns the per-model breakdown. Neither tool stores what you send.

## Tools behind login

Each one takes one scope, and each one only reads.

* `get_usage_summary` (`usage:read`) reads your usage and savings by model.
* `list_api_keys` (`keys:read`) lists your keys by name, last 4, and created date. Never the full key.
* `get_byok_status` (`byok:status`) reads which providers have a key on file, as a yes or no. Never the key.
* `get_billing_status` (`billing:read`) reads your plan and balance. Never the full card number.

No tool here creates or takes a key. Keys live in the [dashboard](https://www.flexinference.com/dashboard).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.