---
title: "Connect an MCP server"
method: POST
path: "/api/v0/agent/mcp-servers"
tags: ["Agent MCP Servers"]
---

# Connect an MCP server

`POST /api/v0/agent/mcp-servers`

## Request

- Base URL: `https://api.outerport.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.outerport.com/api/v0/agent/mcp-servers`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/outerport/apis/outerport-api/docs/api/v0/agent/mcp-servers/post.ts> (a function with typed inputs; its response is checked against the schema)

Register a Model Context Protocol server reachable over streamable HTTP. Attach it to a persona to put its tools in that persona's toolset.

## Request body

- AgentMcpServerCreateRequest: Request body for connecting an MCP server.
  - `name` string, required: Display name. Also the prefix its tools are exposed under, so two servers with the same name cannot both contribute a tool.
  - `url` string, required: The server's streamable-HTTP endpoint.
  - `headers` object: HTTP headers sent verbatim on every request to the server, e.g. an Authorization header. Write-only: never returned on read.

## Response `200`

Successful Response

- AgentMcpServerGetResponse: Response for getting an MCP server connection. Header values are credentials and write-only; ``header_names`` lists which headers are configured, never their values.
  - `id` string, uuid, required: The ID of the MCP server.
  - `name` string, required: The display name of the MCP server.
  - `url` string, required: The server's streamable-HTTP endpoint.
  - `header_names` string[]: Names of the configured HTTP headers. Values are never returned.
  - `created_at` string, date-time, required: When the server was connected.
  - `updated_at` string, date-time, required: When the server was last updated.

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-25** `fcd15f6d35b4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/outerport/apis/outerport-api/changes/api/v0/agent/mcp-servers/post.md)

---

[API](https://skmtc.dev/outerport/apis/outerport-api.md) - [All operations](https://skmtc.dev/outerport/apis/outerport-api/llms.txt) - [OpenAPI document](https://skmtc.dev/outerport/apis/outerport-api/revisions/08b5bf6f7f18?raw)
