---
title: "Patch Mcp Server"
method: PATCH
path: "/admin/api/v1/mcp-servers/{mcp_id}"
tags: ["Integrations & Tools"]
---

# Patch Mcp Server

`PATCH /admin/api/v1/mcp-servers/{mcp_id}`

Apply a shallow update to an existing MCP server row.

Only fields present in the body are touched. Slug is sticky on
rename so existing references stay valid. Inner ``mcp_server`` is
replaced wholesale when provided.

## Path parameters

- `mcp_id` string, uuid, required

## Request body

- StandaloneMCPServerPatch — Body for PATCH /admin/api/v1/mcp-servers/{id}.
  - `name` string, nullable
  - `enabled` boolean, nullable
  - `mcpServer` MCPServer — Configuration for a single MCP server connection.
    - `name` string, required — Unique identifier for this MCP server.
    - `transport` 'stdio' | 'sse' | 'streamable_http' | 'websocket' — Transport type used to reach the MCP server.
    - `url` string, nullable — Endpoint URL for HTTP/S based transports (SSE, streamable_http, websocket).
    - `command` string, nullable — Executable to run when using stdio transport.
    - `args` string[] — Arguments to pass to the command for stdio transport.
    - `headers` object — Optional headers for HTTP/S transports.
    - `env` object — Environment variables to set when spawning stdio servers.
    - `cwd` string, nullable — Working directory for stdio transports.
    - `encoding` string, nullable — Encoding used for stdio transport.
    - `encodingErrorHandler` 'strict' | 'ignore' | 'replace', nullable — Encoding error handler for stdio transport.
    - `timeoutSeconds` number, nullable — Timeout in seconds for HTTP/S transports (maps to `timeout`).
    - `sseReadTimeoutSeconds` number, nullable — Timeout in seconds waiting for SSE events (maps to `sse_read_timeout`).
    - `terminateOnClose` boolean, nullable — Whether to terminate Streamable HTTP sessions on close.
    - `sessionKwargs` object — Extra keyword arguments forwarded to MCP ClientSession.

## Response `200`

Successful Response

- StandaloneMutationResponseStandaloneMCPServerRead
  - `data` StandaloneMCPServerRead, required — GET response and the data payload of POST/PATCH/DELETE responses.
    - `id` string, uuid, required
    - `slug` string, required
    - `name` string, required
    - `enabled` boolean, required
    - `mcpServer` MCPServer, required — Configuration for a single MCP server connection.
      - `name` string, required — Unique identifier for this MCP server.
      - `transport` 'stdio' | 'sse' | 'streamable_http' | 'websocket' — Transport type used to reach the MCP server.
      - `url` string, nullable — Endpoint URL for HTTP/S based transports (SSE, streamable_http, websocket).
      - `command` string, nullable — Executable to run when using stdio transport.
      - `args` string[] — Arguments to pass to the command for stdio transport.
      - `headers` object — Optional headers for HTTP/S transports.
      - `env` object — Environment variables to set when spawning stdio servers.
      - `cwd` string, nullable — Working directory for stdio transports.
      - `encoding` string, nullable — Encoding used for stdio transport.
      - `encodingErrorHandler` 'strict' | 'ignore' | 'replace', nullable — Encoding error handler for stdio transport.
      - `timeoutSeconds` number, nullable — Timeout in seconds for HTTP/S transports (maps to `timeout`).
      - `sseReadTimeoutSeconds` number, nullable — Timeout in seconds waiting for SSE events (maps to `sse_read_timeout`).
      - `terminateOnClose` boolean, nullable — Whether to terminate Streamable HTTP sessions on close.
      - `sessionKwargs` object — Extra keyword arguments forwarded to MCP ClientSession.
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
  - `reload` StandaloneReloadResult, required — Reload outcome attached to every admin mutation response. ``reloaded`` means DB committed and runtime now uses the new config. ``restart_required`` means DB committed and process restart is needed. ``reload_failed`` means DB rolled back and runtime is unchanged.
    - `status` 'reloaded' | 'restart_required' | 'reload_failed', required — Outcome of a reload triggered by an admin mutation.
    - `message` string, required
    - `error` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/idun-group/apis/idun-agent-engine-server.md) · [All operations](https://skmtc.net/idun-group/apis/idun-agent-engine-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/idun-group/idun-agent-engine-server/versions/8909cd73cc1c/schema)
