---
title: "Connect an MCP server"
method: POST
path: "/voice/mcp-servers"
tags: ["Voice"]
---

# Connect an MCP server

`POST /voice/mcp-servers`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/voice/mcp-servers`
- Auth: HTTP bearer

Register a Model Context Protocol server agents can call tools on.

`transport_type` decides which other field is required: `sse` needs
`connection_url`, `stdio` needs `command`. It is closed to those two here.

`env_vars` IS A SECRET FIELD. It is write-only by convention on this
surface - the read routes return the server's tools, not its environment -
and anything put here is available to the process voice starts.

`org_id` is not in the body. Voice's own model requires it; it is supplied
from the key, so a caller cannot register a server into another tenant.

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- McpServerCreateRequest: An MCP server an agent can call tools on. `org_id` is deliberately ABSENT even though voice's model requires it: it is pinned from the API key by the router and a body-supplied value would be a tenancy hole.
  - `name` string, required
  - `description` string, nullable
  - `transport_type` 'sse' | 'stdio', required: `sse` for a remote server reached over HTTP, `stdio` for a local process.
  - `connection_url` string, nullable: Required when `transport_type` is `sse`.
  - `command` string, nullable: Required when `transport_type` is `stdio`.
  - `args` string[], nullable
  - `env_vars` object, nullable: Environment for the server process. WRITE-ONLY: values set here are never echoed back by the read routes.
  - `enabled` boolean

## Response `201`

Successful Response

- ApiResponseVoicePayload
  - `data` VoicePayload, required: One voice object - a collection, an agent, a route, a chat. Open-shaped: voice adds fields to these bodies on its own release cadence and a dropped-or-added key must not be a 500 in this service.
  - `pagination` PaginationMeta
    - `page` integer, required: Current page number (1-indexed)
    - `limit` integer, required: Items per page
    - `total` integer, required: Total number of items
    - `has_next` boolean, required: Whether there are more pages
    - `next_cursor` string, nullable: Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.
    - `total_available` integer, nullable: Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search.
    - `total_is_lower_bound` boolean, nullable: Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search.
    - `notes` string[], nullable: Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
