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

# MCP Connections

Register an MCP server once, then create separate connections for the API keys or OAuth accounts you want to use. See [MCP Servers](https://docs.lyzr.ai/enterprise/agent-studio/tools/MCP.md) for Studio setup.

## Authentication

Send requests to `https://agent-prod.studio.lyzr.ai` with your Lyzr API key in the `x-api-key` header. Send JSON request bodies with `Content-Type: application/json`.

## Connection endpoints

| Method and path | Purpose |
| - | - |
| [List MCP Servers](https://docs.lyzr.ai/enterprise/api/tools/mcp-list-servers.md) | Find the server ID. |
| [Create MCP API Key Connection](https://docs.lyzr.ai/enterprise/api/tools/mcp-create-api-key.md) | Add a named API-key connection. |
| [Create MCP OAuth Connection](https://docs.lyzr.ai/enterprise/api/tools/mcp-create-oauth.md) | Add a named OAuth connection. |
| [List MCP Connections](https://docs.lyzr.ai/enterprise/api/tools/mcp-list-connections.md) | Find your usable connection IDs. |
| [Refresh MCP Connection Status](https://docs.lyzr.ai/enterprise/api/tools/mcp-refresh-status.md) | Check whether OAuth sign-in completed. |
| [Reconnect MCP OAuth Connection](https://docs.lyzr.ai/enterprise/api/tools/mcp-reconnect.md) | Restart authorization-code sign-in. |
| [Delete Tool Credential](https://docs.lyzr.ai/enterprise/api/tools/credentials/delete.md) | Remove a connection without deleting the server. |

See [request body examples](https://docs.lyzr.ai/enterprise/agent-studio/tools/MCP.md#add-connections-through-the-api) for API-key and OAuth connections.

## Select a connection for inference

Pass `provider_overrides` to [Chat With Agent](https://docs.lyzr.ai/enterprise/api/agents/chat.md) or [Stream Chat With Agent](https://docs.lyzr.ai/enterprise/api/agents/stream-chat.md). The map key is the MCP server ID; the value is the `credential_id` of a usable connection owned by the caller:

```json theme={null}
{
  "provider_overrides": {
    "<MCP_SERVER_ID>": "<CREDENTIAL_ID>"
  }
}
```

This field applies only to the current request. The MCP tool must use caller credentials (`persist_auth: false`); tools using creator credentials ignore the override. An invalid explicit connection returns HTTP `401` with `detail.reason_code: "personal_connection_required"` rather than falling back to another account.


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