API Contract MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@API Contract MCPValidate the payments API response against the contract schema"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@mhdd_24/api-contract-mcp
Validate API contracts between services.
Same architecture as @mhdd_24/sublime-mcp.
Full documentation: docs/WIKI.md
How it works (30 seconds)
You (chat) → MCP client → api-contract-mcp → API Contract APIs / CLIs / local toolsRelated MCP server: OpenAPI Contracts MCP Server
Prerequisites
Requirement | Notes |
Node.js 18+ | ESM TypeScript MCP server |
Credentials / CLIs | See environment variables below |
Install
Option A — npm (after publish)
npm install -g @mhdd_24/api-contract-mcpOption B — npx
npx @mhdd_24/api-contract-mcpOption C — clone and build
git clone https://github.com/Mhdd-24/API-Contract-MCP.git
cd API-Contract-MCP
npm install
npm run build
node dist/index.jsConfigure Cursor
Edit ~/.cursor/mcp.json:
{
"mcpServers": {
"apicontract": {
"command": "npx",
"args": ["-y", "@mhdd_24/api-contract-mcp"],
"env": {
"PROJECT_ROOT": "..."
}
}
}
}Local development:
{
"command": "node",
"args": ["/absolute/path/to/API-Contract-MCP/dist/index.js"]
}Environment variables
Variable | Description |
| Default project/repository root |
Tools
Tool | Description |
| Health check for API Contract MCP. |
| Validate a response against an expected schema/JSON. |
| List endpoints from OpenAPI JSON. |
License
ISC
Related MCP Connectors
Deterministic validation for AI-generated artifacts: JSON Schema, OpenAPI response, SQL syntax.
API monitoring from your editor. Checks the JSON your endpoints return, not just the status code.
Monitor MCP servers, API contracts and AI outputs for schema drift. Alerts on breaking changes.
End-to-end API testing — generate and run tests from OpenAPI, curl, Postman, or real user traffic.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables reading and parsing Swagger/OpenAPI specifications to list API endpoints, get detailed endpoint info, search APIs, and generate TypeScript types for request/response.9-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to browse, read, compare, and validate OpenAPI contracts for providers and consumers.1MIT
- AlicenseBqualityDmaintenanceEnables natural language exploration of OpenAPI/Swagger specs, allowing users to register APIs, browse endpoints, describe schemas, and detect breaking changes through conversational queries.9243 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides AI coding agents with accurate OpenAPI contract details to prevent hallucinated API calls, supporting multi-version pinning, endpoint discovery, and request validation.38 npmApache 2.0