Skip to main content

Report the session's MCP servers

GET 

/session/mcp

Returns the MCP servers the session's worker last reported: which ones started, the tools each offers, and why one failed. MCP servers are configured in .agents/mcp.json in the config directory and, when the deployment allows workspace servers, in the session workspace.

At the start of every turn the worker reloads mcp.json, starts the configured servers, and records an mcp.status session event. A turn with no MCP configuration records an empty server list, so once mcp.json is removed the next turn's report is empty. This endpoint returns the servers from the most recent such event, and reportedAt says when it was recorded. A server that stopped after that turn started still shows as ready until the next turn reports.

  • Select the session with the X-Session-ID header.
  • A session that has not run a turn yet returns an empty servers array and a null reportedAt.
  • Returns 404 with code SESSION_NOT_FOUND when the session does not exist.

Request​

Responses​

The MCP servers from the most recent report.

Response Headers
    X-Session-ID

    The session this response belongs to. For session-scoped requests it echoes the X-Session-ID request header; for POST /sessions/open and POST /sessions/system it is the session that was opened or created.

    X-Request-ID

    The request's correlation ID. When the request carried an X-Request-ID header holding a UUID, Peen echoes it; otherwise Peen generates a new UUID. The controller log records the same value for this request.