# Api Test MCP

> Api Test MCP is an open-source MCP server for developer tools. MCP server letting AI agents call a live API and check responses against its OpenAPI spec. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API
- **Repository:** https://github.com/thisis-najeeb/api-test-mcp
- **MCP Registry name:** io.github.thisis-najeeb/api-test-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

The README says this server lets Claude Code, Cursor, Windsurf and other MCP clients send real HTTP requests to an API and compare the replies with the schema in its OpenAPI or Swagger 3.x document. Instead of relying on the written docs, an agent can see the actual status, headers and body and report mismatches such as missing required fields or enum values outside the documented set.

The toolset covers loading a spec from a URL or local file, calling and validating individual endpoints, running a best-effort contract-test pass across GET routes, pinging endpoints for reachability and latency, and diffing two spec versions to flag likely breaking changes. Auth presets for bearer, API key and basic schemes are available on each tool, along with a timeout option. Mutating POST, PUT and PATCH calls are off by default and only run when explicitly enabled, because they can write real data.

The package is aimed at developers testing their own or staging APIs, and at teams who want a quick contract check before a demo or as a CI step. The README describes it as MIT licensed with no API keys or cost required.

## Features

- **Live endpoint calling:** Makes real HTTP requests to documented endpoints and returns the actual status, headers and body.
- **Response schema validation:** Checks response bodies against the JSON schema documented for a method, path and status code.
- **Best-effort contract tests:** Runs a pass across parameter-free GET endpoints, listing skipped routes with reasons.
- **Opt-in mutating tests:** Can generate example bodies and attempt write requests, disabled unless explicitly turned on.
- **Spec version diffing:** Compares two spec versions and flags removed endpoints, new required fields and type changes.
- **Authentication presets:** Supports bearer, API key and basic auth presets on each tool call.

## Good for

- Checking whether a live endpoint matches its OpenAPI documentation before shipping
- Letting an AI coding agent verify API behaviour instead of guessing from the spec
- Running a contract-test pass against a staging API with a bearer token
- Spotting breaking changes between an old spec tag and the main branch
- Pinging key endpoints as a health check before a demo or in CI

## Install

### Claude Code (Terminal)

```sh
claude mcp add api-test-mcp -- npx -y api-test-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "api-test-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "api-test-mcp"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "api-test-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "api-test-mcp"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "api-test-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "api-test-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "api-test-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "api-test-mcp"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "api-test-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "api-test-mcp"
      ]
    }
  }
}
```

## Tools

- `load_api_spec`: Load and dereference an OpenAPI/Swagger spec from a URL or local path.
- `list_endpoints`: List every endpoint currently loaded.
- `call_endpoint`: Make a real HTTP call to a documented endpoint.
- `validate_response`: Check a response body against the documented JSON schema.
- `test_endpoint`: Call an endpoint and validate the response in one step.
- `run_all_tests`: Best-effort contract-test pass across parameter-free GET endpoints.
- `check_health`: Ping a set of endpoints and report reachability and latency.
- `diff_api_specs`: Compare two spec versions and flag likely-breaking changes.

## FAQ

### Which MCP clients does it work with?

The README names Claude Code, Cursor and Windsurf, and says it works with any MCP-compatible AI agent.

### Does it need API keys or paid services?

The README says there are no API keys, no config and no cost required for the server itself.

### Can it modify data on my API?

Write methods are off by default. Setting includeMutating to true enables POST, PUT and PATCH attempts, which the README warns can write real data.

### Which OpenAPI versions are supported?

The README says it works with any OpenAPI or Swagger 3.x spec, loaded from a URL or a local file.

### Is Api Test MCP free?

Yes. Api Test MCP is open source, so you can use and self-host it for free.

### How do I add Api Test MCP to Claude Code?

Run this command in your terminal: claude mcp add api-test-mcp -- npx -y api-test-mcp

### What are the best alternatives to Api Test MCP?

The closest alternatives to Api Test MCP are MCP Foundry — Build, Test & Publish MCP Servers, Apollo MCP Server, simplify3x-connect, MCP Compliance and Llmmcp.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [MCP Foundry — Build, Test & Publish MCP Servers](https://ai-powered.com/mcp/mcp-foundry-build-test-and-publish-mcp-servers): MCP Foundry — Build, Test & Publish MCP Servers is a freemium MCP server for developer tools.
- [Apollo MCP Server](https://ai-powered.com/mcp/apollo-mcp-server): Apollo MCP Server is an open-source MCP server for developer tools.
- [simplify3x-connect](https://ai-powered.com/mcp/simplify3x-connect): simplify3x-connect is an open-source MCP server for developer tools.
- [MCP Compliance](https://ai-powered.com/mcp/mcp-compliance): MCP Compliance is an open-source MCP server for security.
- [Llmmcp](https://ai-powered.com/mcp/llmmcp): Llmmcp is an open-source MCP server for developer tools.
- [Solana MCP by Vybe](https://ai-powered.com/mcp/solana-mcp-by-vybe): Solana MCP by Vybe is an MCP server for finance and payments.
- [Mobai MCP](https://ai-powered.com/mcp/mobai-mcp): Mobai MCP is an open-source MCP server for developer tools.
- [Postman MCP Server](https://ai-powered.com/mcp/postman-mcp-server): Postman MCP Server is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/api-test-mcp
