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

# MCP servers

> Endpoints and fields for MCP server configuration, authentication, and tool discovery.

Use the MCP Servers API to connect organization-owned Model Context Protocol
servers and discover their tools. All requests use
`https://api.agents.slng.ai` and a bearer API key.

## Endpoints

| Method   | Path                                         | Purpose                                           |
| -------- | -------------------------------------------- | ------------------------------------------------- |
| `GET`    | `/v1/agents/mcp-servers`                     | List MCP server configurations                    |
| `POST`   | `/v1/agents/mcp-servers`                     | Create a configuration                            |
| `GET`    | `/v1/agents/mcp-servers/{server_id}`         | Get a configuration and its last discovery result |
| `PATCH`  | `/v1/agents/mcp-servers/{server_id}`         | Update a configuration                            |
| `DELETE` | `/v1/agents/mcp-servers/{server_id}`         | Delete a configuration                            |
| `POST`   | `/v1/agents/mcp-servers/{server_id}/connect` | Connect and refresh discovered capabilities       |

The list endpoint accepts `limit` from 1 to 200, `offset` up to 10,000, and
repeatable exact `name` filters.

## Server fields

| Field          | Contract                                                                      |
| -------------- | ----------------------------------------------------------------------------- |
| `name`         | Organization-visible name, 1 to 200 characters                                |
| `description`  | Optional description, up to 500 characters                                    |
| `url_template` | Server URL; Vault placeholders use `{{$NAME}}`                                |
| `transport`    | `streamable_http` or `sse`; default `streamable_http`                         |
| `auth`         | No authentication, bearer authentication, or a custom authentication header   |
| `headers`      | Up to 64 unique literal or Vault-backed custom headers                        |
| `credentials`  | Existing Vault references or secret values to create during the write request |

Secret names use `SCREAMING_SNAKE_CASE`. Read responses never include secret
values or transient credential input.

## Authentication objects

```json No authentication theme={null}
{
  "type": "none"
}
```

```json Bearer authentication theme={null}
{
  "type": "bearer",
  "secret_name": "WAYNE_MCP_TOKEN"
}
```

```json Custom header authentication theme={null}
{
  "type": "header",
  "name": "X-API-Key",
  "secret_name": "WAYNE_MCP_KEY"
}
```

Custom headers cannot duplicate the configured authentication header or a
transport-managed header.

## Connect response

The connect endpoint returns:

* `status`: `connected` or `failed`.
* `latency_ms`, `server_info`, and `protocol_version`.
* `capabilities.tools`, including each name, description, input schema, optional
  output schema, and canonical `schema_hash`.
* Protocol `events` and an `error` when available.

The stored capability status can be `unknown`, `healthy`, `unavailable`,
`invalid`, or `circuit_open`. The server record also reports the observed time,
tool count, revision, and last capability error.

## Attach a discovered tool

An MCP attachment records `attachment_id`, `server_id`, `tool_name`,
`description`, `invocation: "model"`, `argument_overrides`, and the
`observed_schema_hash` returned by discovery. MCP tools do not support system
invocation.

See [Connect an MCP server](/guides/agents/tools-and-mcp/connect-with-mcp) for
the complete task and
[Attach a tool to an agent](/guides/agents/tools-and-mcp/attach-to-an-agent) for
the safe agent update procedure.
