API Test MCP logo

API Test MCP

Tests live API responses against OpenAPI schemas, checks endpoint health, and detects breaking changes between spec versions.

Install API Test MCP

Run the project’s own setup commands, in order.

Setup steps from the project

api-test-mcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    git clone <this repo>
    
  2. 2. Install
    cd api-test-mcp
    
  3. 3. Install
    npm install
    
  4. 4. Add to Claude Code
    claude mcp add api-test -- node /absolute/path/to/api-test-mcp/src/index.js
    

Overview

api-test-mcp MCP server loads OpenAPI or Swagger 3.x specifications and calls the documented API endpoints over HTTP. It can validate response bodies against documented JSON schemas, run contract tests, check reachability and latency, and compare specification versions for likely breaking changes. Use it when an API may have drifted from its documentation or when you need a live check before a demo or CI step. Authentication presets support bearer tokens, API keys, and basic authentication.

Use cases

  • Check live endpoints against their OpenAPI response schemas
  • Run contract tests against parameter-free GET operations
  • Measure API reachability and latency before a demo
  • Compare an old specification with a newer version
  • Validate authenticated staging API responses

Key features

  • OpenAPI and Swagger 3.x loading with reference resolution
  • Live HTTP endpoint calls
  • JSON schema response validation
  • Batch contract testing with optional mutation coverage
  • Endpoint health and latency checks
  • Breaking-change detection between API specs

Tools8

What API Test MCP lets your agent do. Expand a tool for its parameters.

Self-reported~314 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

15/15 checks healthy over the last 82d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit3mo agoMost recent push to the default branch.
Tools exposed8Callable tools this server registers over MCP.

How API Test MCP works

What api-test-mcp MCP server does

The api-test-mcp MCP server gives an MCP-compatible agent a way to test an API against its OpenAPI or Swagger 3.x contract rather than relying only on documentation. It accepts a specification from a URL or local path, resolves its references, and exposes the API title, servers, and documented operations.

After loading a specification, an agent can inspect the available paths, make real HTTP requests, and compare returned data with the JSON schema declared for a method, path, and response status. This is useful for finding missing required fields, unexpected types, invalid enum values, unreachable endpoints, and other differences between a contract and live behavior.

How it works

The normal workflow starts with load_api_spec, followed by list_endpoints when an inventory of operations is needed. call_endpoint returns the actual status, headers, and body from a documented endpoint. validate_response checks a response against the matching schema, while test_endpoint combines the request and validation into one operation.

For broader checks, run_all_tests covers GET endpoints that have no required parameters. Mutating coverage is opt-in through includeMutating: true; in that mode, the server generates example parameters and request bodies from the schema and may send POST, PUT, or PATCH requests that write real data. Operations requiring manual input are reported as skipped with a reason.

check_health performs one-shot reachability and latency checks for selected endpoints or parameter-free GET operations. diff_api_specs compares two specification versions and separates likely breaking changes, such as removed endpoints, newly required fields, type changes, and removed enum values, from additive changes.

Setup and configuration

Install the project with Node.js by cloning the repository and running npm install. Register the server in an MCP client by using Node to execute src/index.js with its absolute path. The README provides configurations for Claude Code and for JSON-based settings used by Claude Desktop or Cursor.

Requests can optionally include an auth preset. Supported forms are bearer authentication, an API key placed in a header or query parameter, and basic authentication. The tools also accept an optional timeoutMs value for limiting request duration. No environment variables or API keys are required to start the server; credentials are supplied with requests when an API needs them.

Tools and capabilities

The api-test-mcp MCP server exposes these capabilities:

  • Load and dereference an OpenAPI or Swagger specification.
  • List all endpoints in the currently loaded specification.
  • Make real HTTP calls and return status, headers, and body.
  • Validate response data against documented schemas.
  • Run individual or broad contract-test checks.
  • Measure endpoint reachability and latency.
  • Compare specification versions for likely contract breaks.

The project’s tests include live, unmocked HTTP checks, timeout handling, authentication behavior, health checks, specification-diff logic, and MCP protocol communication. CI runs against Node.js 18, 20, and 22.

Limitations and notes

Automatic full testing is intentionally limited: GET operations must not require parameters, and endpoints needing manual values are skipped. Enabling mutating tests can change real API data, so it should be used against an appropriate environment. Health checks are one-shot and do not retain historical results. The documented roadmap mentions retries, persisted health history, pattern-aware example generation, and a non-MCP CLI as future ideas rather than current features.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about API Test MCP

api-test-mcp is an MCP server that connects AI agents to OpenAPI/Swagger 3.x specifications and the APIs they describe. Its main tools load and inspect specs, call documented endpoints, validate response schemas, run contract tests, check health, and compare spec versions for breaking changes.

Install it by cloning the repository, changing into its directory, and running `npm install`.

Yes, api-test-mcp works with Cursor through its MCP settings. Configure a server entry with `node` as the command and the absolute path to `src/index.js` as the argument.

Yes, it supports bearer tokens, API keys in headers or query parameters, and basic authentication through an optional `auth` preset. Authentication details are passed with tool requests rather than configured through required environment variables.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAPI Test MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/api-test-mcp?style=directory)](https://allmcps.com/mcp/api-test-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/api-test-mcp"><img src="https://allmcps.com/api/badge/api-test-mcp?style=directory" alt="API Test MCP on AllMCPs" /></a>