# api-test-mcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/thisis-najeeb/api-test-mcp  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/api-test-mcp

## Description
Call the real API and check the response against your OpenAPI spec.

## Tools
Capabilities this server exposes over MCP:

- **load_api_spec** — Load and dereference an OpenAPI/Swagger spec from a URL or local path. Returns the API title, servers, and every documented endpoint. Call this first.
- **list_endpoints** — List every endpoint currently loaded.
- **call_endpoint** — Make a real HTTP call to a documented endpoint. Returns the real status, headers, and body.
- **validate_response** — Check a response body against the JSON schema documented for a given method + path + status.
- **test_endpoint** — call_endpoint` + `validate_response` in one step. The main tool — "does this endpoint actually work as documented?"
- **run_all_tests** — Best-effort contract-test pass across every GET endpoint that needs no required parameters. Pass `includeMutating: true` to also auto-generate example params/bodies from the schema and attempt POST/PUT/PATCH (off by default — it can write real data). Endpoints still needing manual input are listed…
- **check_health** — One-shot ping across a set of endpoints (or every parameter-free GET in the loaded spec): reports reachability and latency. Handy before a demo or as a CI step.
- **diff_api_specs** — Compare two versions of a spec (e.g. an old tag vs. `main`) and flag likely-breaking changes — removed endpoints, newly-required fields, type changes, removed enum values — versus safe additive changes.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/thisis-najeeb/api-test-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
git clone <this repo>
```

2. Install:

```sh
cd api-test-mcp
```

3. Install:

```sh
npm install
```

4. Add to Claude Code:

```sh
claude mcp add api-test -- node /absolute/path/to/api-test-mcp/src/index.js
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/api-test-mcp/readme_

