MCP server for API testing and experimentation - Your API Laboratory
npm install api-lab-mcp



> 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
bash
Install globally
npm install -g api-lab-mcpAdd to Claude Code
claude mcp add api-lab-mcp api-lab-mcpStart testing!
Tell Claude: "Test my API at localhost:3000"
`$3
`bash
Install via npm
npm install -g api-lab-mcpThen add to Claude Desktop config (see Installation section)
`That's it! You're ready to test APIs with Claude.
๐ธ Live Demo with Claude Desktop
Watch API Lab MCP in action with Claude Desktop - testing real APIs through conversation:
$3

> "Test your APIs through natural conversation - in any language you prefer."
๐ก Use Cases
$3
- 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$3
- 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$3
- 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๐ฌ Real-World Examples
$3
`
You: "Test the GitHub API to get my user info"
Claude: Tests GET https://api.github.com/user with your token
`$3
`
You: "Why is my login endpoint returning 401?"
Claude: Analyzes headers, body, and suggests missing auth token
`$3
`
You: "Test my app with session cookie JSESSIONID=ABC123"
Claude: Configures session and tests authenticated endpoints
`$3
`
You: "Check if all my endpoints respond under 200ms"
Claude: Runs performance tests and generates report
`$3
`
You: "Create tests from my OpenAPI spec at /api/docs"
Claude: Generates comprehensive test suite automatically
`๐ง Installation
$3
`bash
Method 1: Global install (recommended)
npm install -g api-lab-mcp
claude mcp add api-lab-mcp api-lab-mcpMethod 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"
`$3
macOS/Linux Setup
1. Install the package:
`bash
npm install -g api-lab-mcp
`2. Find your config file:
`bash
macOS
open ~/Library/Application\ Support/Claude/Linux
open ~/.config/claude/
`3. Edit
claude_desktop_config.json:
`json
{
"mcpServers": {
"api-lab-mcp": {
"command": "npx",
"args": ["-y", "api-lab-mcp"]
}
}
}
`4. Restart Claude Desktop
Windows Setup
1. Install the package:
`powershell
npm install -g api-lab-mcp
`2. Open config folder:
`powershell
explorer %APPDATA%\Claude
`3. Edit
claude_desktop_config.json:
`json
{
"mcpServers": {
"api-lab-mcp": {
"command": "npx.cmd",
"args": ["-y", "api-lab-mcp"]
}
}
}
`4. Restart Claude Desktop
Docker Setup
`dockerfile
FROM node:20-alpine
RUN npm install -g api-lab-mcp
EXPOSE 3000
CMD ["api-lab-mcp", "--http-mode"]
`Run with:
`bash
docker build -t api-lab-mcp .
docker run -p 3000:3000 api-lab-mcp
`
$3
After installation, ask Claude:
`
"Can you test the API at https://api.github.com?"
`If Claude can test the API, installation was successful!
๐๏ธ For Developers
$3
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"
`$3
`bash
Clone the repository
git clone https://github.com/atototo/api-lab-mcp.git
cd api-lab-mcpInstall dependencies
npm installRun in development mode
npm run devBuild for production
npm run buildRun tests
npm test
`$3
`
api-lab-mcp/
โโโ src/
โ โโโ mcp/ # MCP server implementation
โ โโโ core/ # Core business logic
โ โโโ http/ # HTTP client layer
โ โโโ types/ # TypeScript definitions
โโโ tests/ # Test suites
โโโ docs/ # Documentation
`๐ How It Compares
| 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 | โ
| โ ๏ธ | โ ๏ธ | โ
|
๐ Documentation
$3
-
test_http_endpoint - Test any HTTP endpoint with auth, headers, and body
- test_with_assertions - Advanced testing with response validation
- test_with_session - Session-based authentication with cookies
- batch_test - Run multiple tests in parallel
- analyze_api_spec - Extract info from OpenAPI/Swagger specs
- generate_test_scenarios - Auto-generate comprehensive test suites$3
- 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
๐ค Contributing
We love contributions! Whether it's a bug report, feature request, or pull request, all contributions are welcome.
`bash
Fork and clone
git clone https://github.com/YOUR_USERNAME/api-lab-mcp.gitCreate your feature branch
git checkout -b feature/amazing-featureMake 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
---
If API Lab MCP helps your development workflow, please consider giving it a โญ

Built with โค๏ธ for developers who value their time