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

# MCP server

> Connect an MCP client to a Fluent agent's tools.

Every Fluent agent exposes its own Model Context Protocol server over Streamable HTTP. An MCP client that connects to it gets the tools that agent is configured with — the same tools the agent uses itself.

```text theme={null}
https://www.fluenterp.com/api/v1/agents/{agent_id}/mcp
```

The transport is stateless: each request carries everything the server needs, and there is no session to keep open. `DELETE` on the endpoint is accepted and acknowledged so well-behaved clients can run their cleanup step.

## Authenticating

Both credential types work:

```http theme={null}
Authorization: Bearer fl-...
```

```http theme={null}
Authorization: Bearer flpt_...
```

An agent-scoped OAuth token is the better fit for a client acting on a person's behalf. A request with no credential receives a `401` with an RFC 9728 `WWW-Authenticate` challenge naming the protected-resource metadata document, so a spec-compliant MCP client can discover the authorization server and complete the OAuth flow on its own:

```text theme={null}
https://www.fluenterp.com/.well-known/oauth-protected-resource/api/v1/agents/{agent_id}/mcp
```

The authorization server itself is described at:

```text theme={null}
https://www.fluenterp.com/.well-known/oauth-authorization-server
```

## Configuring a client

Most MCP clients accept a remote server as a URL plus a header. For example, in a client that reads a JSON config:

```json theme={null}
{
  "mcpServers": {
    "fluent": {
      "type": "http",
      "url": "https://www.fluenterp.com/api/v1/agents/AGENT_ID/mcp",
      "headers": {
        "Authorization": "Bearer fl-..."
      }
    }
  }
}
```

List what an agent offers with a plain JSON-RPC call:

```bash theme={null}
curl https://www.fluenterp.com/api/v1/agents/AGENT_ID/mcp \
  -H "Authorization: Bearer $FLUENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

<Tip>
  Use the [API index](https://www.fluenterp.com/api/v1) to discover the current
  endpoints, scopes, and rate limits without authenticating.
</Tip>

## Limits

MCP requests count against the same rate limit as the rest of the API: 100 requests per 60 seconds per credential. See [Errors and rate limits](/docs/api-reference/errors-and-rate-limits).
