---
title: "Run the doctor"
method: POST
path: "/projects/{projectId}/servers/{serverId}/doctor"
tags: ["Server diagnostics"]
---

# Run the doctor

`POST /projects/{projectId}/servers/{serverId}/doctor`

Runs the full doctor workflow — probe → connect → initialize → capabilities → primitives — and returns a step-by-step report. The richest signal for "is this server healthy, and why not."

## Path parameters

- `projectId` string, required
- `serverId` string, required

## Request body

- object

## Response `200`

Doctor report. `status` summarizes the outcome; per-step detail is in `checks`.

- DoctorReport — Step-by-step health report from the probe → connect → initialize → capabilities workflow.
  - `generatedAt` string, date-time, required — When the report was generated.
  - `status` 'ready' | 'oauth_required' | 'partial' | 'error', required — Overall outcome. `partial` means the server connected but some primitive listings failed.
  - `probe` object, nullable — Transport-level probe result (HTTP reachability, protocol hints), or `null` when skipped.
  - `connection` object, required
    - `status` 'connected' | 'error' | 'skipped', required
    - `detail` string, required
  - `initInfo` object, nullable
  - `capabilities` object, nullable — The server's negotiated MCP capabilities.
  - `tools` Tool[]
    - `name` string, required
    - `description` string
    - `inputSchema` object — JSON Schema for the tool's arguments.
    - `outputSchema` object — JSON Schema for the tool's structured output, when declared.
  - `resources` Resource[]
    - `uri` string, required
    - `name` string
    - `description` string
    - `mimeType` string
  - `resourceTemplates` object[]
  - `prompts` Prompt[]
    - `name` string, required
    - `description` string
    - `arguments` object[]
      - `name` string, required
      - `description` string
      - `required` boolean
  - `checks` object, required — Per-step status. Each check is `{ status: ok | error | skipped, detail }`.
    - `probe` DoctorCheck
      - `status` 'ok' | 'error' | 'skipped', required
      - `detail` string, required
    - `connection` DoctorCheck
      - `status` 'ok' | 'error' | 'skipped', required
      - `detail` string, required
    - `initialization` DoctorCheck
      - `status` 'ok' | 'error' | 'skipped', required
      - `detail` string, required
    - `capabilities` DoctorCheck
      - `status` 'ok' | 'error' | 'skipped', required
      - `detail` string, required
    - `tools` DoctorCheck
      - `status` 'ok' | 'error' | 'skipped', required
      - `detail` string, required
    - `resources` DoctorCheck
      - `status` 'ok' | 'error' | 'skipped', required
      - `detail` string, required
    - `resourceTemplates` DoctorCheck
      - `status` 'ok' | 'error' | 'skipped', required
      - `detail` string, required
    - `prompts` DoctorCheck
      - `status` 'ok' | 'error' | 'skipped', required
      - `detail` string, required
  - `error` object, nullable — Terminal error, or `null` when the workflow completed.
    - `code` string, required
    - `message` string, required
    - `details` unknown

## Other responses

- `400` — Malformed body or parameters.
- `401` — Missing, invalid, revoked, or orphaned key (`UNAUTHORIZED`) — or the **target MCP server** needs an OAuth grant (`OAUTH_REQUIRED`), which is a property of the server, not your key.
- `403` — Key is valid but not allowed to do this.
- `404` — Unknown project, server, or resource.
- `429` — Per-key rate limit exceeded (60 requests/minute sustained, bursts up to 10). Honor `Retry-After` and back off with jitter.
- `500` — Something failed on MCPJam's side.
- `502` — Could not connect to the target MCP server.
- `504` — The target MCP server connected but didn't respond in time.

---

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