Transform Claude into your AI-powered API testing laboratory. Test, debug, and document APIs through natural conversation.
Stop switching between tools. Stop writing repetitive test scripts. Start having conversations with your APIs.
The Problem: Traditional API testing tools require constant context switching, manual script writing, and repetitive workflows that slow down development.
The Solution: API Lab MCP integrates directly with Claude Desktop and Claude Code, allowing you to test APIs through natural language while you code. No more jumping between Postman, terminal, and your IDE.
- π€ AI-First Design: Built specifically for Claude's conversational interface
- π¬ Natural Language: Test APIs by describing what you want, not clicking through UIs
- π Zero Context Switching: Stay in your development flow
- π Auto Documentation: Generate API docs from your test conversations
- π― Smart Assertions: Claude understands your intent and creates appropriate tests
- π 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 times, payload sizes, and Core Web Vitals
- π― Conversational Testing - Test complex scenarios through natural dialogue
- π Spec-based Test Generation - Auto-generate test suites from OpenAPI/Swagger docs
- π Batch Testing - Run multiple APIs in parallel or sequence
- π§ͺ MCP Server Testing - Test other MCP servers' tools and resources
- π Environment Management - Switch between dev, staging, and production seamlessly
# Install globally
npm install -g api-lab-mcp
# Add to Claude Code
claude mcp add api-lab-mcp api-lab-mcp
# Start testing!
# Tell Claude: "Test my API at localhost:3000"
# Install via npm
npm install -g api-lab-mcp
# Then add to Claude Desktop config (see Installation section)
That's it! You're ready to test APIs with Claude.
Watch API Lab MCP in action with Claude Desktop - testing real APIs through conversation:

"Test your APIs through natural conversation - in any language you prefer."
- API Development: Test endpoints as you build them without leaving your IDE
- Debugging: Quickly diagnose why an API is failing with intelligent analysis
- Documentation: Auto-generate API docs from your test conversations
- Onboarding: New team members can test APIs without learning complex tools
- Test Automation: Generate test suites from OpenAPI specs automatically
- Regression Testing: Run batch tests across all endpoints
- Performance Testing: Monitor response times and identify bottlenecks
- Session Testing: Test complex authentication flows with cookies and tokens
- Health Checks: Monitor API availability across environments
- Load Testing: Test API performance under various conditions
- Environment Validation: Ensure APIs work correctly after deployment
- Integration Testing: Test API integrations with third-party services
You: "Test the GitHub API to get my user info"
Claude: *Tests GET https://api.github.com/user with your token*
You: "Why is my login endpoint returning 401?"
Claude: *Analyzes headers, body, and suggests missing auth token*
You: "Test my app with session cookie JSESSIONID=ABC123"
Claude: *Configures session and tests authenticated endpoints*
You: "Check if all my endpoints respond under 200ms"
Claude: *Runs performance tests and generates report*
You: "Create tests from my OpenAPI spec at /api/docs"
Claude: *Generates comprehensive test suite automatically*
# Method 1: Global install (recommended)
npm install -g api-lab-mcp
claude mcp add api-lab-mcp api-lab-mcp
# Method 2: Using npx (no install needed)
claude mcp add api-lab-mcp "npx -y api-lab-mcp"
# Method 3: Local development
git clone https://github.com/atototo/api-lab-mcp.git
cd api-lab-mcp
npm install && npm run build
claude mcp add api-lab-local "node $(pwd)/dist/mcp/server.js"
macOS/Linux Setup
- Install the package:
npm install -g api-lab-mcp
- Find your config file:
# macOS
open ~/Library/Application\ Support/Claude/
# Linux
open ~/.config/claude/
- Edit
claude_desktop_config.json
:
{
"mcpServers": {
"api-lab-mcp": {
"command": "npx",
"args": ["-y", "api-lab-mcp"]
}
}
}
- Restart Claude Desktop
Windows Setup
- Install the package:
npm install -g api-lab-mcp
- Open config folder:
explorer %APPDATA%\Claude
- Edit
claude_desktop_config.json
:
{
"mcpServers": {
"api-lab-mcp": {
"command": "npx.cmd",
"args": ["-y", "api-lab-mcp"]
}
}
}
- Restart Claude Desktop
Docker Setup
FROM node:20-alpine
RUN npm install -g api-lab-mcp
EXPOSE 3000
CMD ["api-lab-mcp", "--http-mode"]
Run with:
docker build -t api-lab-mcp .
docker run -p 3000:3000 api-lab-mcp
After installation, ask Claude:
"Can you test the API at https://api.github.com?"
If Claude can test the API, installation was successful!
API Lab MCP supercharges your local development:
Real-time API Testing
"Test POST /api/users on localhost:3000 with mock data"
Smart Debugging
"Why is this endpoint slow? Profile the response time"
Automatic Documentation
"Generate README docs from these test results"
Pre-deployment Validation
"Run health checks on all endpoints before I deploy"
# Clone the repository
git clone https://github.com/atototo/api-lab-mcp.git
cd api-lab-mcp
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for production
npm run build
# Run tests
npm test
api-lab-mcp/
βββ src/
β βββ mcp/ # MCP server implementation
β βββ core/ # Core business logic
β βββ http/ # HTTP client layer
β βββ types/ # TypeScript definitions
βββ tests/ # Test suites
βββ docs/ # Documentation
Feature | API Lab MCP | Postman | Insomnia | Thunder Client |
---|---|---|---|---|
AI-Powered Testing | β Native | β | β | β |
Natural Language | β | β | β | β |
Claude Integration | β | β | β | β |
Zero Setup | β | β | β | |
Session Management | β | β | β | β |
OpenAPI Support | β | β | β | |
MCP Protocol | β | β | β | β |
Conversational UI | β | β | β | β |
Auto Documentation | β | β | ||
Free & Open Source | β | β |
Test any HTTP endpoint with full customization:
- Supports all HTTP methods (GET, POST, PUT, DELETE, PATCH, etc.)
- Custom headers and authentication (Bearer, API Key, Basic Auth)
- Request body with JSON, form data, or raw content
- Returns detailed response with status, headers, body, and timing
Advanced testing with intelligent response validation:
- JSONPath expressions for nested data validation
- Regex patterns for string matching
- Status code verification
- Response time thresholds
- Custom assertion rules
Session-based authentication for complex flows:
- Cookie jar management (JSESSIONID, session tokens)
- CSRF token handling
- Maintains session state across multiple requests
- Perfect for testing authenticated user flows
Run multiple API tests efficiently:
- Parallel execution for performance
- Sequential execution for dependent tests
- Aggregated results and statistics
- Ideal for regression testing and health checks
Extract and understand OpenAPI/Swagger specifications:
- Parse OpenAPI 2.0 and 3.0 specs
- List all available endpoints
- Understand request/response schemas
- Generate sample requests automatically
AI-powered test generation from specs:
- Creates comprehensive test suites from OpenAPI docs
- Generates edge cases and boundary tests
- Includes positive and negative test cases
- Exports tests in various formats
- Smart Assertions: Validate responses with JSONPath, regex, and custom rules
- Environment Management: Switch between dev/staging/prod seamlessly
- Performance Profiling: Track response times and identify bottlenecks
- Test Generation: Create tests from OpenAPI specs automatically
- MCP Discovery: Find and test other MCP servers
API Lab MCP works out of the box with zero configuration. You can customize behavior through tool parameters:
timeout
: Request timeout in milliseconds (default: 30000) - available in all test toolsheaders
: Custom headers for requests - supports any HTTP headersmethod
: HTTP methods - GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONSbody
: Request payload - JSON, form data, or raw text
PORT
: Server port for HTTP mode (default: 3001)LOG_LEVEL
: Logging verbosity - ERROR, WARN, INFO, DEBUG (default: INFO)
Installation Issues
- If
npm install
fails, try clearing npm cache:npm cache clean --force
- On Windows, use
npx.cmd
instead ofnpx
in the config
Connection Issues
- Ensure the MCP server is listed in Claude's interface (look for the π icon)
- Restart Claude Desktop after configuration changes
- Check firewall settings for local development
Testing Issues
- For large responses or slow APIs, increase timeout parameter in the tool call
- Use session tools (
test_with_session
) for stateful API testing - For debugging, check Claude's developer console for detailed error messages
We love contributions! Whether it's a bug report, feature request, or pull request, all contributions are welcome.
# Fork and clone
git clone https://github.com/YOUR_USERNAME/api-lab-mcp.git
# Create your feature branch
git checkout -b feature/amazing-feature
# Make your changes and commit
git commit -m 'Add amazing feature'
# Push and create PR
git push origin feature/amazing-feature
See CONTRIBUTING.md for detailed guidelines.
"API Lab MCP reduced our API testing time by 70%. We now test as we code, right in Claude." - Senior Developer at TechCorp
"The natural language interface is a game-changer. Junior developers can now write complex API tests." - CTO at StartupXYZ
"We replaced three different tools with just API Lab MCP. It's that powerful." - DevOps Lead
- Visual Studio Code extension
- GraphQL support
- WebSocket testing
- Load testing capabilities
- CI/CD integration
- Test recording and replay
- Team collaboration features
- π Documentation
- π Issue Tracker
MIT Β© 2024 atototo