---
title: "Add Server"
method: POST
path: "/api/v2/mcp/servers/{server_name}"
tags: ["MCP"]
---

# Add Server

`POST /api/v2/mcp/servers/{server_name}`

## Path parameters

- `server_name` string, required

## Request body

- MCPServerConfig — Pydantic model for MCP server configuration.
  - `args` string[], nullable
  - `command` string, nullable
  - `env` object, nullable
  - `headers` object, nullable
  - `url` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-03-12** `830c31118215` — 7 info
  - added the new optional request property `args`
  - added the new optional request property `command`
  - added the new optional request property `env`
  - added the new optional request property `headers`
  - …3 more
- **2026-03-06** `0be341779529` — 2 info
  - the endpoint scheme security `OAuth2PasswordBearerCookie` was added to the API
  - the endpoint scheme security `OAuth2PasswordBearer` was removed from the API
- **2026-02-18** `191b57fc530b` — 2 info
  - the endpoint scheme security `OAuth2PasswordBearer` was added to the API
  - the endpoint scheme security `OAuth2PasswordBearerCookie` was removed from the API
- **2026-02-10** `0be341779529` — 2 info
  - the endpoint scheme security `OAuth2PasswordBearerCookie` was added to the API
  - the endpoint scheme security `OAuth2PasswordBearer` was removed from the API
- **2025-10-16** `9bd3e81318d7` — 7 warning, 2 info
  - removed the request property `args`
  - removed the request property `command`
  - removed the request property `env`
  - removed the request property `headers`
  - …5 more

[Change history](https://skmtc.dev/langflow-ai/apis/langflow/changes/api/v2/mcp/servers/:server_name/post.md)

---

[API](https://skmtc.dev/langflow-ai/apis/langflow.md) · [All operations](https://skmtc.dev/langflow-ai/apis/langflow/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/langflow-ai/langflow/revisions/22962dc5e81b/schema)
