# MCP server
URL: https://docs.munito.ai/mcp

Connect Claude, ChatGPT, Cursor or another MCP client to your Munito AI account.
The assistant can then answer questions about your usage and your account, and create API keys.

```text
https://api.munito.ai/mcp/v1
```

The server uses the Streamable HTTP transport and OAuth.
When you connect, your client opens the console. Sign in, then choose what the client may do.

## Connect a client [#connect-a-client]

### Claude [#claude]

1. Open **Settings**, then **Connectors**, and select **Add custom connector**.
2. Enter `Munito` as the name and paste the server URL.
3. Select **Connect**, then sign in and approve the access.

### Claude Code [#claude-code]

```bash
claude mcp add --transport http munito https://api.munito.ai/mcp/v1
```

Run `/mcp` in Claude Code, then sign in and approve the access.

### Cursor [#cursor]

Add the server to `~/.cursor/mcp.json`, then select **Connect** in the MCP settings of Cursor.

```json
{ "mcpServers": { "munito": { "url": "https://api.munito.ai/mcp/v1" } } }
```

### VS Code [#vs-code]

```bash
code --add-mcp '{"name":"munito","type":"http","url":"https://api.munito.ai/mcp/v1"}'
```

### ChatGPT [#chatgpt]

Turn on developer mode in the settings of Apps and Connectors.
Create a connector with the server URL and OAuth authentication.

### Other clients [#other-clients]

Use a client that supports remote MCP servers with OAuth. The client registers itself, then you sign in.

## Permissions [#permissions]

| Permission      | The assistant can                                                             |
| --------------- | ----------------------------------------------------------------------------- |
| Read (always)   | Read your account, members, usage analytics, API keys, spend limits, models.  |
| Create API keys | Create API keys with the permissions that a job needs. Off until you tick it. |

The assistant acts as you, with your role in the organization.
It cannot revoke a key, change a limit, or delete data. Do those in the [console](https://console.munito.ai).

## Tools [#tools]

| Tool               | Use                                                                                |
| ------------------ | ---------------------------------------------------------------------------------- |
| `get_account`      | Your organization, its status, and your role.                                      |
| `list_members`     | The members of your organization and their roles.                                  |
| `get_usage`        | Requests, tokens, pages, errors and cost for a time range, by model or by API key. |
| `list_api_keys`    | Your API keys, their permissions, and their last use. Secrets are never returned.  |
| `create_api_key`   | Create an API key with the permissions that you choose. Its secret appears once.   |
| `get_spend_limits` | Spend of today and of this month against your spend limits.                        |
| `list_models`      | The models that your organization can use.                                         |

The tools read the same data as the [Admin API](https://docs.munito.ai/administration).
A new key holds `inference`, `admin:read`, or both. Only owners and admins can create a key with `admin:read`.
The console names the app that created a key, so you can find the keys of an app and revoke them.

Ask, for example:

- How many tokens did we use this week, by model?
- Which API key sent the most requests yesterday, and how many failed?
- Create an inference key for staging and put it in my `.env` file.

## Security [#security]

- The client never sees your password. Its access is for this server only, and it expires unless the client renews it.
- A new API key goes to your assistant once. Keep it in a secret store or an ignored `.env` file, never in source code.
- The provider of your assistant processes the answers of the tools. Connect only clients that you trust.
- See and disconnect your connected apps on the MCP page of the [console](https://console.munito.ai). A disconnected app stops at once.