---
title: "Update MCP configuration"
method: PUT
path: "/workspaces/{workspace_id}/mcp-config"
tags: ["mcp"]
---

# Update MCP configuration

`PUT /workspaces/{workspace_id}/mcp-config`

Updates an existing MCP configuration for a specific workspace. Returns 404 if no configuration exists (use POST to create one).

For each server entry, if `headers` is omitted or `null` and a server with the same `id` already exists, the stored header values are preserved. To explicitly clear all headers for a server, pass `headers: {}`.

## Path parameters

- `workspace_id` string, required

## Headers

- `Authorization` string, required

## Request body

- AgentMCPConfigIn
  - `servers` MCPServerIn[], required — List of MCP server configurations
    - `id` string — Stable config ID. Omit for new entries (auto-generated).
    - `mcp_url` string, uri, required — The HTTPS URL of the MCP server (SSE endpoint)
    - `headers` object, nullable — Custom headers to send with MCP requests (e.g. Authorization, API keys)

## Response `204`

MCP configuration updated successfully

- object

## Other responses

- `400` — Invalid request
- `404` — No MCP configuration found for this workspace

---

[API](https://skmtc.net/synthflow/apis/platform-api.md) · [All operations](https://skmtc.net/synthflow/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/synthflow/platform-api/versions/decb652b52e0/schema)
