API Doctor MCP
Validates OpenAPI documents, JSON Schemas, and JSON payloads. Also compares OpenAPI specs and displays breaking changes.
README
API Doctor MCP
A deterministic, stateless MCP server for validating OpenAPI documents, JSON Schemas, and JSON payloads.
It uses Python libraries only. It does not call an LLM, persist user data, or require login.
Current tools
validate_openapilist_openapi_endpointscompare_openapi_specsview_openapi_breaking_changesview_openapi_validation_cardvalidate_json_schemavalidate_payload
Architecture
MCP transport
-> ServerFactory
-> ToolProvider discovery
-> Handlers
-> Services
-> Validators / Comparators
Important properties:
- Stateless: no database, sessions, cache, or persistent files.
- Open/Closed: add a new
IToolProviderimplementation; discovery registers it automatically. - Dependency Inversion: handlers depend on service interfaces, not concrete libraries.
- Strategy: parsers, validators, and comparison rules are replaceable strategies.
- Factory: application and server creation are centralized.
- Adapter: third-party validation libraries are hidden behind internal interfaces.
- Class-based: application behavior is represented by classes and objects.
- CamelCase Python filenames: used as explicitly requested.
Run locally
uv sync --extra dev
uv run uvicorn app.Main:app --host 0.0.0.0 --port 8085
MCP endpoint:
http://localhost:8085/mcp
Health endpoint:
http://localhost:8085/health
The server uses the MCP Python SDK v2 beta and exposes one Streamable HTTP application. Modern 2026-07-28 requests are sessionless. stateless_http=True also prevents legacy clients from creating retained HTTP sessions.
MCP HTTP usage
The callable MCP endpoint is:
http://localhost:8085/mcp
This server uses the modern stateless MCP HTTP format for protocol version 2026-07-28.
Each MCP request is a single HTTP POST with:
- header
Content-Type: application/json - header
Accept: application/json, text/event-stream - header
mcp-protocol-version: 2026-07-28 - header
mcp-method: <json-rpc-method> - header
mcp-name: <tool-name>fortools/callrequests - JSON-RPC body containing
params._meta
See MCP_API.md for complete request and response examples for:
tools/listvalidate_json_schemavalidate_payloadvalidate_openapilist_openapi_endpointscompare_openapi_specsview_openapi_breaking_changes
MCP Apps
This repo now includes two MCP Apps:
view_openapi_breaking_changesview_openapi_validation_card
It follows the MCP Apps pattern described in the official docs:
- the tool advertises
_meta.ui.resourceUri - the server exposes a
ui://...resource - the host fetches and renders the bundled HTML app in a sandboxed iframe
The bundled app source lives in:
mcp_apps/breaking-change-viewer/
Build the app bundle:
make app-build
The built artifact served by the Python MCP server is:
mcp_apps/breaking-change-viewer/dist/mcp-app.html
Test with basic-host
The easiest local host-level test path is the MCP Apps basic-host.
- Start this server:
make run
- In another folder, clone the MCP Apps repository and start the host:
git clone https://github.com/modelcontextprotocol/ext-apps.git
cd ext-apps/examples/basic-host
npm install
SERVERS='["http://localhost:8085/mcp"]' npm start
- Open:
http://localhost:8080
- Select and call either
view_openapi_breaking_changesorview_openapi_validation_card
When the host calls the tool, it should fetch the ui://... resource and render the inline app. The validation card is intentionally small and is useful as a lightweight MCP Apps demo.
Test
uv run pytest
uv run ruff check .
uv run mypy app
Docker
docker compose up --build
Add a tool without modifying existing code
- Add a service interface and implementation, when needed.
- Add a handler class.
- Add a concrete class implementing
IToolProviderunderapp/ToolProviders. - Give the provider a parameterless constructor.
- The provider-discovery mechanism imports and registers it automatically.
Providers receive the application ServiceContainer during registration.
Production note
The pinned MCP SDK is a prerelease. Upgrade the exact pin deliberately after testing API changes.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。