Stateless MCP Server

API Doctor MCP

A deterministic Model Context Protocol server for validating OpenAPI documents, JSON Schemas, and JSON payloads. It is built for local, auditable API checks without LLM calls, sessions, or persistent state.

What It Does

Focused API validation, inspection, and change detection

This server exposes a compact tool surface for API contract workflows. It accepts JSON or YAML text, validates documents locally, and returns structured machine-readable results.

validate_openapi

Validate OpenAPI 2.0 and 3.x documents supplied as JSON or YAML text.

list_openapi_endpoints

Extract HTTP operations, methods, summaries, operation IDs, and deprecation flags.

compare_openapi_specs

Compare two OpenAPI documents and report structural and selected breaking changes.

view_openapi_validation_card

Render a compact MCP App card for quick OpenAPI validation demos.

validate_json_schema

Check whether a JSON Schema document itself is valid.

validate_payload

Validate a JSON-compatible payload against a JSON Schema.

How It Works

The new MCP HTTP format at a glance

This server uses the modern sessionless MCP HTTP flow for protocol version 2026-07-28. There is no initialization handshake and no retained session ID.

1

One request per action

Each tool operation is one HTTP POST carrying one JSON-RPC request body.

2

Headers mirror the method

Requests include protocol and method headers, plus mcp-name for tools/call.

3

Every call carries meta

params._meta must include the protocol version, client info, and client capabilities.

Request Contract

Headers, metadata, and endpoint rules

The stable endpoint is /mcp. Use it directly for POST requests. The trailing-slash variant should not be your primary client target.

Required Headers
Content-Type: application/json
Accept: application/json, text/event-stream
mcp-protocol-version: 2026-07-28
mcp-method: <json-rpc method>
Required params._meta
{
  "io.modelcontextprotocol/protocolVersion": "2026-07-28",
  "io.modelcontextprotocol/clientInfo": {
    "name": "your-client-name",
    "version": "1.0.0"
  },
  "io.modelcontextprotocol/clientCapabilities": {}
}
Examples

Working calls for the modern MCP format

These examples match the live server behavior. First list tools, then call the tool you want.

tools/list
curl -X POST http://localhost:8085/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H 'mcp-protocol-version: 2026-07-28' \
  -H 'mcp-method: tools/list' \
  --data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list",
    "params": {
      "_meta": {
  "io.modelcontextprotocol/protocolVersion": "2026-07-28",
  "io.modelcontextprotocol/clientInfo": {
    "name": "your-client-name",
    "version": "1.0.0"
  },
  "io.modelcontextprotocol/clientCapabilities": {}
}
    }
  }'
tools/call example: validate_openapi
curl -X POST http://localhost:8085/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H 'mcp-protocol-version: 2026-07-28' \
  -H 'mcp-method: tools/call' \
  -H 'mcp-name: validate_openapi' \
  --data '{
    "jsonrpc": "2.0",
    "id": 4,
    "method": "tools/call",
    "params": {
      "name": "validate_openapi",
      "arguments": {
        "specification": "openapi: 3.1.0\ninfo:\n  title: Demo API\n  version: 1.0.0\npaths:\n  /users:\n    get:\n      responses:\n        "200":\n          description: OK"
      },
      "_meta": {
  "io.modelcontextprotocol/protocolVersion": "2026-07-28",
  "io.modelcontextprotocol/clientInfo": {
    "name": "your-client-name",
    "version": "1.0.0"
  },
  "io.modelcontextprotocol/clientCapabilities": {}
}
    }
  }'
Typical successful result shape
{
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\n  \"valid\": true\n}"
      }
    ],
    "isError": false,
    "resultType": "complete",
    "structuredContent": {
      "valid": true
    }
  }
}
Live Demo

Try the endpoints from this page

These browser-side checks call the local server directly. They are useful for confirming that the root URL, health route, and modern MCP tool listing are all wired correctly.

Live response
Click a demo action to load
a live response.
Capabilities

Everything surfaced by this server

The homepage mirrors the operational details from the protocol guide so the root URL can double as a quickstart for humans while the MCP endpoint stays machine-focused.

Stateless modern MCP OpenAPI validation Endpoint listing Breaking change detection JSON Schema validation Payload validation Structured JSON-RPC results JSON and YAML input support