Back to catalog

API Lab MCP Server

Turn Claude into your AI-powered API testing lab. Test, debug, and document APIs through natural conversation with support for authentication, response validation, and performance metrics.

Turn Claude into your AI-powered API testing lab. Test, debug, and document APIs through natural conversation with support for authentication, response validation, and performance metrics.

Installation

NPM Global

npm install -g api-lab-mcp

NPX (no installation)

npx -y api-lab-mcp

From source

git clone https://github.com/atototo/api-lab-mcp.git
cd api-lab-mcp
npm install && npm run build
node dist/mcp/server.js

Docker

FROM node:20-alpine
RUN npm install -g api-lab-mcp
EXPOSE 3000
CMD ["api-lab-mcp", "--http-mode"]

docker build -t api-lab-mcp .
docker run -p 3000:3000 api-lab-mcp

Configuration

Claude Desktop (macOS/Linux)

{
  "mcpServers": {
    "api-lab-mcp": {
      "command": "npx",
      "args": ["-y", "api-lab-mcp"]
    }
  }
}

Claude Desktop (Windows)

{
  "mcpServers": {
    "api-lab-mcp": {
      "command": "npx.cmd",
      "args": ["-y", "api-lab-mcp"]
    }
  }
}

Available Tools

Tool Description
test_http_endpoint Test any HTTP endpoints with full customization, including all HTTP methods, custom headers, authentication...
test_with_assertions Advanced testing with intelligent response validation using JSONPath expressions, regex patterns,...
test_with_session Session-based authentication for complex flows with cookie jar management, CSRF token handling and...
batch_test Efficient execution of multiple API tests with parallel or sequential execution and aggregated results
analyze_api_spec Extract and understand OpenAPI/Swagger specifications, parse specs, list endpoints and understand...
generate_test_scenarios AI-generated tests from specifications, create comprehensive test suites from OpenAPI documentation with...

Features

  • Universal authentication - Bearer tokens, API keys, OAuth2, session cookies and CSRF tokens
  • Intelligent response analysis - Automatic validation of status codes, headers and JSON paths
  • Real-time performance metrics - Response time, payload sizes and Core Web Vitals
  • Conversational testing - Test complex scenarios through natural dialogue
  • Specification-based test generation - Automatic test suite creation from OpenAPI/Swagger documentation
  • Batch testing - Run multiple APIs in parallel or sequentially
  • MCP server testing - Test tools and resources of other MCP servers
  • Environment management - Seamless switching between dev, staging and production
  • Automatic documentation - Generate API documentation from test conversations
  • Smart assertions - Claude understands intent and creates appropriate tests

Environment Variables

Optional

  • PORT - Server port for HTTP mode (default: 3001)
  • LOG_LEVEL - Logging verbosity level - ERROR, WARN, INFO, DEBUG (default: INFO)

Usage Examples

Test the GitHub API to get my user information
Why is my login endpoint returning 401?
Test my application with session cookie JSESSIONID=ABC123
Check if all my endpoints respond in less than 200ms
Create tests from my OpenAPI specification at /api/docs

Notes

Works with both Claude Desktop and Claude Code. Supports zero-configuration and works out of the box. Includes comprehensive authentication support, session management and AI-powered test generation from OpenAPI specifications.

Comments (0)

Sign In Sign in to leave a comment.