---
title: "Create Mcp Server"
method: POST
path: "/api/mcp/servers"
tags: ["MCP Management"]
---

# Create Mcp Server

`POST /api/mcp/servers`

Create a new MCP server.

## Request body

- MCPServerCreate — Request model for creating MCP server.
  - `name` string, required — Server name
  - `transport` string, required — Transport type (stdio, sse, websocket, streamable_http)
  - `description` string, nullable — Server description
  - `config` object, required — Transport-specific configuration
  - `is_active` boolean — Whether the server is active

## Response `201`

Successful Response

- MCPServerResponse — Response model for MCP server.
  - `id` integer, required
  - `user_id` integer, required
  - `name` string, required
  - `transport` string, required
  - `description` string, nullable, required
  - `config` object, required
  - `is_active` boolean, required
  - `is_default` boolean, required
  - `transport_display` string, required
  - `created_at` string, nullable, required
  - `updated_at` string, nullable, required
  - `connected_account` string, nullable
  - `app_id` string, nullable
  - `provider` string, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-06-13** `33e4ba4936ad` — 2 breaking
  - response property `created_at` list-of-types was widened by adding types `null` to media type `application/json` of response `201`
  - response property `updated_at` list-of-types was widened by adding types `null` to media type `application/json` of response `201`
- **2026-05-01** `c9eb29ec9a1b` — 3 info
  - added the optional property `app_id` to the response with the `201` status
  - added the optional property `connected_account` to the response with the `201` status
  - added the optional property `provider` to the response with the `201` status

[Change history](https://skmtc.dev/xorbitsai/apis/xagent/changes/api/mcp/servers/post.md)

---

[API](https://skmtc.dev/xorbitsai/apis/xagent.md) · [All operations](https://skmtc.dev/xorbitsai/apis/xagent/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/xorbitsai/xagent/revisions/33e4ba4936ad/schema)
