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 MCP Validate 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: LockSpec
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
Available Tools
3 toolsapicontract_endpointsB
List endpoints from OpenAPI JSON.
Inputs: spec (required).
apicontract_statusB
Health check for API Contract MCP.
Inputs: no named parameters.
apicontract_validateB
Validate a response against an expected schema/JSON.
Inputs: actual (required), expected (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a distinct purpose: health check, response validation, and endpoint listing. There is no overlap or ambiguity between them.
All tools share a consistent 'apicontract_' prefix and use lowercase names. There is minor inconsistency between nouns ('status', 'endpoints') and verbs ('validate'), but the pattern is still predictable.
Three tools is on the smaller side but appropriate for a focused API contract utility. Each tool serves a clear, non-redundant function, and the count does not feel artificially inflated or overly thin.
The tool set covers core health check, validation, and endpoint discovery, but lacks broader contract lifecycle operations like importing, diffing, or managing multiple contracts. Agents can perform basic tasks but may need external tooling for full contract workflows.
Maintenance
Related MCP Connectors
Schema-aware API monitoring: diff OpenAPI specs for breaking changes, manage endpoints.
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.
Check API and MCP endpoints, search 21k indexed APIs, signed SLA checks and refundable USDC escrow.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to browse, read, compare, and validate OpenAPI contracts for providers and consumers.1MIT
- AlicenseNot gradedqualityCmaintenanceProvides AI coding agents with accurate OpenAPI contract details to prevent hallucinated API calls, supporting multi-version pinning, endpoint discovery, and request validation.42 npmApache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables MCP-compatible clients to discover API endpoints from OpenAPI/Swagger specs, send HTTP requests, validate responses, and analyze status codes for automated API testing.1-
- AlicenseAqualityCmaintenanceEnables AI agents to call real API endpoints and verify responses against OpenAPI specs, supporting contract testing, auth presets, spec diffing, and health checks.852 npmMIT