---
title: "Add an MCP server"
method: POST
path: "/api/v1/mcp/servers"
tags: ["MCP"]
---

# Add an MCP server

`POST /api/v1/mcp/servers`

**Required scope:** `mcp`

## Request body

- McpServerConfig
  - `name` string, required
  - `enabled` boolean
  - `transport` 'stdio' | 'sse' | 'streamable_http'
  - `command` string
  - `args` string[]
  - `url` string
  - `headers` object
  - `timeout` integer

## Response `200`

Standard AstrBot success response

- SuccessEnvelope
  - `status` 'ok', required
  - `message` string
  - `data` unknown, required

---

[API](https://skmtc.net/astrbotdevs/apis/astrbot-openapi-v1.md) · [All operations](https://skmtc.net/astrbotdevs/apis/astrbot-openapi-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/astrbotdevs/astrbot-openapi-v1/revisions/4463c5ffdb9c/schema)
