API Lab MCP logo

API Lab MCP

Community
atototo

api test mcp

Publisheratototo
Repositoryapi-lab-mcp
LanguageTypeScript
Forks
3
Stars
11
Available tools
14
Transport typestdio, streamable-http
Categories
Links
  • Connect tools to AI workflows

    API Lab MCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 14 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    11 stars and 3 forks from the linked repository.

API Lab MCP 🧪

npm version License: MIT MCP Compatible Claude Desktop

Transform Claude into your AI-powered API testing laboratory. Test, debug, and document APIs through natural conversation.

🌟 Why API Lab MCP?

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.

What makes it different?

  • 🤖 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

✨ Key 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 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

🚀 Quick Start (30 seconds)

For Claude Code

bash
# 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"

For Claude Desktop

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

📸 Live Demo with Claude Desktop

Watch API Lab MCP in action with Claude Desktop - testing real APIs through conversation:

Claude Desktop Demo

Real Results from Claude Desktop

"Test your APIs through natural conversation - in any language you prefer."

💡 Use Cases

For Development Teams

  • 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

For QA Engineers

  • 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

For DevOps

  • 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

Test a REST API

You: "Test the GitHub API to get my user info"
Claude: *Tests GET https://api.github.com/user with your token*

Debug a Failed Request

You: "Why is my login endpoint returning 401?"
Claude: *Analyzes headers, body, and suggests missing auth token*

Session-based Authentication

You: "Test my app with session cookie JSESSIONID=ABC123"
Claude: *Configures session and tests authenticated endpoints*

Performance Testing

You: "Check if all my endpoints respond under 200ms"
Claude: *Runs performance tests and generates report*

Generate Tests from Swagger

You: "Create tests from my OpenAPI spec at /api/docs"
Claude: *Generates comprehensive test suite automatically*

🔧 Installation

Claude Code Installation

bash
# 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"

Claude Desktop Installation

  1. Install the package:
bash
npm install -g api-lab-mcp
  1. Find your config file:
bash
# macOS
open ~/Library/Application\ Support/Claude/

# Linux
open ~/.config/claude/
  1. Edit claude_desktop_config.json:
json
{
  "mcpServers": {
    "api-lab-mcp": {
      "command": "npx",
      "args": ["-y", "api-lab-mcp"]
    }
  }
}
  1. Restart Claude Desktop
  1. Install the package:
powershell
npm install -g api-lab-mcp
  1. Open config folder:
powershell
explorer %APPDATA%\Claude
  1. Edit claude_desktop_config.json:
json
{
  "mcpServers": {
    "api-lab-mcp": {
      "command": "npx.cmd",
      "args": ["-y", "api-lab-mcp"]
    }
  }
}
  1. Restart Claude Desktop
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

Verify Installation

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

Local Development Workflow

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"

Development Setup

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

Architecture

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

FeatureAPI Lab MCPPostmanInsomniaThunder 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

Core Tools

test_http_endpoint

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

test_with_assertions

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

test_with_session

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

batch_test

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

analyze_api_spec

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

generate_test_scenarios

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

Advanced Features

  • 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

Configuration Options

API Lab MCP works out of the box with zero configuration. You can customize behavior through tool parameters:

Tool-level Options

  • timeout: Request timeout in milliseconds (default: 30000) - available in all test tools
  • headers: Custom headers for requests - supports any HTTP headers
  • method: HTTP methods - GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
  • body: Request payload - JSON, form data, or raw text

Environment Variables (HTTP Server Mode)

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

Common Issues & Solutions

Installation Issues

  • If npm install fails, try clearing npm cache: npm cache clean --force
  • On Windows, use npx.cmd instead of npx 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

Full API Documentation →

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

🌟 Success Stories

"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

📈 Roadmap

  • Visual Studio Code extension
  • GraphQL support
  • WebSocket testing
  • Load testing capabilities
  • CI/CD integration
  • Test recording and replay
  • Team collaboration features

🛟 Support

📄 License

MIT © 2024 atototo


If API Lab MCP helps your development workflow, please consider giving it a ⭐

Star on GitHub

Built with ❤️ for developers who value their time

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Available Tools

  • test_http_endpoint

    Test an HTTP endpoint with various methods and options

  • test_with_assertions

    Test an HTTP endpoint with assertions for validation

  • set_auth_config

    Configure authentication for API testing (Bearer, Basic, API Key, or OAuth2)

  • set_session

    Set session-based authentication using cookies and optional headers (e.g., CSRF tokens)

  • test_with_auth

    Test an HTTP endpoint with authentication and optional assertions

  • test_with_session

    Test HTTP endpoint with session-based authentication (cookies and optional headers)

  • load_config

    Load API testing configuration from a JSON file

  • set_environment

    Switch to a different environment from the loaded configuration

  • batch_test

    Execute multiple API tests in batch with parallel or sequential execution

  • analyze_api_spec

    Analyze OpenAPI/Swagger specification and extract endpoint information

  • generate_test_scenarios

    Generate comprehensive test scenarios from OpenAPI/Swagger specification

  • discover_mcp_server

    Discover and analyze an MCP server to find available tools and resources

  • test_mcp_endpoint

    Test a specific MCP endpoint method with parameters

  • generate_mcp_tests

    Generate comprehensive test scenarios for an MCP server

Use API Lab MCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once API Lab MCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add API Lab MCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the API Lab MCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "atototo-api-lab-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "api-lab-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the API Lab MCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the API Lab MCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use API Lab MCP to help me with this task?
API Lab MCP
Sure. I read it.
Here is what I found using API Lab MCP.

Option 2: Add an MCP server URL

Use this when API Lab MCP is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter your server URL in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste your server URL into the Server URL field.
  2. Enter a connection name for API Lab MCP.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the API Lab MCP connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the API Lab MCP tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the API Lab MCP tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use API Lab MCP to help me with this task?
API Lab MCP
Sure. I read it.
Here is what I found using API Lab MCP.

Frequently asked questions

What is the API Lab MCP MCP server used for?

API Lab MCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use API Lab MCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use API Lab MCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use API Lab MCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With API Lab MCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect API Lab MCP MCP to TypingMind?

API Lab MCP can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does API Lab MCP MCP provide in TypingMind?

API Lab MCP exposes 14 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use API Lab MCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If API Lab MCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

MCP Protocol Testing Guide

Comprehensive guide for testing MCP protocol endpoints

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇