api-tester-mcp


Nameapi-tester-mcp JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/kirti676/api_tester_mcp
SummaryMCP server for API testing with Swagger/OpenAPI and Postman collection support
upload_time2025-09-04 16:07:30
maintainerNone
docs_urlNone
authorAPI Tester MCP
requires_python>=3.8
licenseMIT
keywords mcp api-testing swagger openapi postman qa sdet testing model-context-protocol
VCS
bugtrack_url
requirements fastmcp pydantic requests jsonschema pyyaml jinja2 aiofiles aiohttp faker
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # API Tester MCP Server

[![npm version](https://badge.fury.io/js/@kirti676/api-tester-mcp.svg)](https://badge.fury.io/js/@kirti676/api-tester-mcp)
[![npm downloads](https://img.shields.io/npm/dt/@kirti676/api-tester-mcp.svg)](https://www.npmjs.com/package/@kirti676/api-tester-mcp)
[![PyPI version](https://badge.fury.io/py/api-tester-mcp.svg)](https://badge.fury.io/py/api-tester-mcp)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A comprehensive Model Context Protocol (MCP) server for QA/SDET engineers that provides API testing capabilities with Swagger/OpenAPI and Postman collection support.

> 🎉 **Now available on NPM!** Install with `npx @kirti676/api-tester-mcp@latest`

## 🆕 What's New

- ✅ **Enhanced Progress Tracking** - Real-time progress with completion percentages and ETA
- ✅ **Visual Progress Bars** - ASCII progress bars with milestone notifications
- ✅ **Performance Metrics** - Throughput calculations and execution summaries
- ✅ **Published on NPM** - Install instantly with NPX
- ✅ **VS Code Integration** - One-click installation buttons  
- ✅ **Simplified Setup** - No manual Python installation required
- ✅ **Cross-Platform** - Works on Windows, macOS, and Linux
- ✅ **Auto-Updates** - Always get the latest version with `@latest`

## 🚀 Getting Started

### Installation

The API Tester MCP server can be used directly with npx without any installation:

```bash
npx @kirti676/api-tester-mcp@latest
```

**Quick Install:**

[![Install in VS Code](https://img.shields.io/badge/Install%20in-VS%20Code-blue?style=for-the-badge&logo=visual-studio-code)](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%7B%22name%22%3A%22api-tester%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40kirti676%2Fapi-tester-mcp%40latest%22%5D%7D) [![Install in VS Code Insiders](https://img.shields.io/badge/Install%20in-VS%20Code%20Insiders-blue?style=for-the-badge&logo=visual-studio-code)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%7B%22name%22%3A%22api-tester%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40kirti676%2Fapi-tester-mcp%40latest%22%5D%7D)

### Claude Desktop

Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user), use the standard config below:

```json
{
  "mcpServers": {
    "api-tester": {
      "command": "npx",
      "args": ["@kirti676/api-tester-mcp@latest"]
    }
  }
}
```

### Other MCP Clients

The standard configuration works with most MCP clients:

```json
{
  "mcpServers": {
    "api-tester": {
      "command": "npx",
      "args": ["@kirti676/api-tester-mcp@latest"]
    }
  }
}
```

**Supported Clients:**
- [Claude Desktop](https://claude.ai/desktop)
- [VS Code](https://code.visualstudio.com/) with MCP extension
- [Cursor](https://cursor.sh/)
- [Windsurf](https://codeium.com/windsurf)
- [Goose](https://github.com/Codium-ai/goose)
- Any other MCP-compatible client

### Python Installation (Alternative)

```bash
pip install api-tester-mcp
```

### From Source

```bash
git clone https://github.com/kirti676/api_tester_mcp.git
cd api_tester_mcp
npm install
```

## ⚡ Quick Start

Try the API Tester MCP server immediately:

```bash
# Run the server
npx @kirti676/api-tester-mcp@latest

# Check version
npx @kirti676/api-tester-mcp@latest --version

# Get help
npx @kirti676/api-tester-mcp@latest --help
```

For MCP clients like Claude Desktop, use this configuration:

```json
{
  "mcpServers": {
    "api-tester": {
      "command": "npx",
      "args": ["@kirti676/api-tester-mcp@latest"]
    }
  }
}
```

## ✨ Features

- **📥 Input Support**: Swagger/OpenAPI documents and Postman collections
- **🔄 Test Generation**: Automatic API and Load test scenario generation
- **⚡ Test Execution**: Run generated tests with detailed reporting
- **🔐 Smart Auth Detection**: Automatic environment variable analysis and setup guidance
- **🔐 Authentication**: Bearer token and API key support via `set_env_vars`
- **📊 HTML Reports**: Beautiful, accessible reports via MCP resources
- **📈 Real-time Progress**: Live updates with progress bars and completion percentages
- **⏱️ ETA Calculations**: Estimated time to completion for all operations
- **🎯 Milestone Tracking**: Special notifications at key progress milestones (25%, 50%, 75%, etc.)
- **📊 Performance Metrics**: Throughput calculations and execution summaries
- **✅ Schema Validation**: Request body generation from schema examples
- **🎯 Assertions**: Per-endpoint status code assertions (2xx, 4xx, 5xx)

## 📈 Progress Tracking

The API Tester MCP includes comprehensive progress tracking for all operations:

### Visual Progress Indicators
```
🎯 API Test Execution: [██████████░░░░░░░░░░] 50.0% (5/10) | ETA: 2.5s - GET /api/users ✅
```

### Features:
- **Progress Bars**: ASCII progress bars with filled/empty indicators
- **Completion Percentages**: Real-time percentage completion
- **ETA Calculations**: Estimated time to completion based on current performance
- **Milestone Notifications**: Special highlighting at key progress points
- **Performance Metrics**: Throughput and timing statistics
- **Operation Context**: Detailed information about current step being executed

### Available for:
- Scenario generation
- Test case generation  
- API test execution
- Load test execution
- All long-running operations

## 🛠️ MCP Tools

The server provides 8 comprehensive MCP tools:

1. **`ingest_spec`** - Load Swagger/OpenAPI or Postman collections with automatic environment variable analysis
2. **`get_env_var_suggestions`** - Get detailed environment variable setup guidance (NEW!)
3. **`set_env_vars`** - Configure authentication and environment variables
4. **`generate_scenarios`** - Create test scenarios from specifications
5. **`generate_test_cases`** - Convert scenarios to executable test cases
6. **`run_api_tests`** - Execute API tests with detailed results
7. **`run_load_tests`** - Execute performance/load tests
8. **`get_session_status`** - Retrieve current session information

## 📚 MCP Resources

- **`file://reports`** - List all available test reports
- **`file://reports/{report_id}`** - Access individual HTML test reports

## 💡 MCP Prompts

- **`create_api_test_plan`** - Generate comprehensive API test plans
- **`analyze_test_failures`** - Analyze test failures and provide recommendations

## � Smart Environment Variable Analysis

The API Tester MCP now automatically analyzes your API specifications to detect required environment variables and provides helpful setup guidance:

### Automatic Detection
- **Authentication Schemes**: Bearer tokens, API keys, Basic auth, OAuth2
- **Base URLs**: Extracted from specification servers/hosts
- **Template Variables**: Postman collection variables like `{{baseUrl}}`, `{{authToken}}`
- **Path Parameters**: Dynamic values in paths like `/users/{userId}`

### Smart Suggestions
```javascript
// 1. Ingest specification - automatic analysis included
const result = await mcp.call("ingest_spec", {
  spec_type: "openapi",
  content: openapi_json_string
});

// Check the setup message for immediate guidance
console.log(result.setup_message);
// "⚠️ 2 required environment variable(s) detected..."

// 2. Get detailed setup instructions
const suggestions = await mcp.call("get_env_var_suggestions");
console.log(suggestions.setup_instructions);
// Provides copy-paste ready configuration examples
```

## �🔧 Configuration Example

```javascript
// NEW: Get smart suggestions first
const suggestions = await mcp.call("get_env_var_suggestions");

// Set environment variables for authentication
await mcp.call("set_env_vars", {
  variables: {
    "baseUrl": "https://api.example.com",
    "auth_bearer": "your-bearer-token",
    "auth_apikey": "your-api-key"
  }
});

// Ingest an OpenAPI specification (now with automatic env var analysis)
await mcp.call("ingest_spec", {
  spec_type: "openapi",
  content: openapi_json_string
});

// Generate test scenarios
await mcp.call("generate_scenarios", {
  include_negative_tests: true,
  include_edge_cases: true
});

// Run API tests
await mcp.call("run_api_tests", {
  max_concurrent: 5
});
```

## � Complete Workflow Example

Here's a complete example of testing the Petstore API:

```bash
# 1. Start the MCP server
npx @kirti676/api-tester-mcp@latest
```

Then in your MCP client (like Claude Desktop):

```javascript
// 1. Load the Petstore OpenAPI spec
await mcp.call("ingest_spec", {
  kind: "openapi", 
  path_or_text: "https://petstore.swagger.io/v2/swagger.json"
});

// 2. Set environment variables
await mcp.call("set_env_vars", {
  pairs: {
    "baseUrl": "https://petstore.swagger.io/v2",
    "auth_apikey": "special-key"
  }
});

// 3. Generate test cases
const tests = await mcp.call("get_generated_tests");

// 4. Run API tests
const result = await mcp.call("run_api_tests");

// 5. View results in HTML report
const reports = await mcp.call("list_resources", {
  uri: "file://reports"
});
```

## �📖 Usage Examples

### Basic API Testing Workflow

1. **Ingest API Specification**
   ```json
   {
     "tool": "ingest_spec",
     "params": {
       "spec_type": "openapi",
       "content": "{ ... your OpenAPI spec ... }"
     }
   }
   ```

2. **Configure Authentication**
   ```json
   {
     "tool": "set_env_vars", 
     "params": {
       "variables": {
         "auth_bearer": "your-token",
         "baseUrl": "https://api.example.com"
       }
     }
   }
   ```

3. **Generate and Run Tests**
   ```json
   {
     "tool": "generate_scenarios",
     "params": {
       "include_negative_tests": true
     }
   }
   ```

4. **View Results**
   - Access HTML reports via MCP resources
   - Get session status and statistics

### Load Testing

```json
{
  "tool": "run_load_tests",
  "params": {
    "users": 10,
    "duration": 60,
    "ramp_up": 10
  }
}
```

## 🔍 Test Generation Features

- **Positive Tests**: Valid requests with expected 2xx responses
- **Negative Tests**: Invalid authentication (401), wrong methods (405)
- **Edge Cases**: Large payloads, boundary conditions
- **Schema-based Bodies**: Automatic request body generation from OpenAPI schemas
- **Comprehensive Assertions**: Status codes, response times, content validation

## 📊 HTML Reports

Generated reports include:
- Test execution summary with pass/fail statistics
- Detailed test results with timing information
- Assertion breakdowns and error details
- Response previews and debugging information
- Mobile-friendly responsive design

## 🔒 Authentication Support

- **Bearer Tokens**: `auth_bearer` environment variable
- **API Keys**: `auth_apikey` environment variable (sent as X-API-Key header)
- **Basic Auth**: `auth_basic` environment variable

## 🔧 Requirements

- **Python**: 3.8 or higher
- **Node.js**: 14 or higher (for npm installation)

## 📦 Dependencies

### Python Dependencies
- fastmcp>=0.2.0
- pydantic>=2.0.0
- aiohttp>=3.8.0
- jinja2>=3.1.0
- pyyaml>=6.0
- jsonschema>=4.0.0
- faker>=19.0.0

### Node.js Dependencies  
- None (self-contained package)

## 🔧 Troubleshooting

### Common Issues

**NPX Command Not Working**
```bash
# If npx command fails, try:
npm install -g @kirti676/api-tester-mcp@latest

# Or run directly:
node ./node_modules/@kirti676/api-tester-mcp/cli.js
```

**Python Not Found**
```bash
# Make sure Python 3.8+ is installed and in PATH
python --version

# Install Python dependencies manually if needed:
pip install fastmcp>=0.2.0 pydantic>=2.0.0 requests>=2.28.0
```

**MCP Client Connection Issues**
- Ensure the MCP server is running on stdio transport (default)
- Check that your MCP client supports the latest MCP protocol version
- Verify the configuration JSON syntax is correct

### Getting Help

1. Check the [Examples](examples/) directory for working configurations
2. See [PROGRESS_TRACKING.md](PROGRESS_TRACKING.md) for detailed progress tracking documentation
3. Run with `--verbose` flag for detailed logging
4. Report issues on [GitHub Issues](https://github.com/kirti676/api_tester_mcp/issues)

## 🤝 Contributing

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🐛 Issues & Support

- **NPM Package**: [@kirti676/api-tester-mcp](https://www.npmjs.com/package/@kirti676/api-tester-mcp)
- Report bugs: [GitHub Issues](https://github.com/kirti676/api_tester_mcp/issues)
- Documentation: [GitHub Wiki](https://github.com/kirti676/api_tester_mcp/wiki)
- Discussions: [GitHub Discussions](https://github.com/kirti676/api_tester_mcp/discussions)
- Interactive install page: [install.html](install.html)

## 📈 Roadmap

- [ ] GraphQL API support
- [ ] Additional authentication methods (OAuth2, JWT)
- [ ] Performance monitoring and alerting
- [ ] Integration with CI/CD pipelines
- [ ] Test data generation from examples
- [ ] API contract testing

---

**Made with ❤️ for QA/SDET engineers**

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kirti676/api_tester_mcp",
    "name": "api-tester-mcp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "mcp api-testing swagger openapi postman qa sdet testing model-context-protocol",
    "author": "API Tester MCP",
    "author_email": "api-tester@example.com",
    "download_url": "https://files.pythonhosted.org/packages/30/6f/931c11c09cd3a07ace2a263bf7a269a35070dd1c30b99f6c0e0d06117f30/api_tester_mcp-1.1.0.tar.gz",
    "platform": null,
    "description": "# API Tester MCP Server\n\n[![npm version](https://badge.fury.io/js/@kirti676/api-tester-mcp.svg)](https://badge.fury.io/js/@kirti676/api-tester-mcp)\n[![npm downloads](https://img.shields.io/npm/dt/@kirti676/api-tester-mcp.svg)](https://www.npmjs.com/package/@kirti676/api-tester-mcp)\n[![PyPI version](https://badge.fury.io/py/api-tester-mcp.svg)](https://badge.fury.io/py/api-tester-mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA comprehensive Model Context Protocol (MCP) server for QA/SDET engineers that provides API testing capabilities with Swagger/OpenAPI and Postman collection support.\n\n> \ud83c\udf89 **Now available on NPM!** Install with `npx @kirti676/api-tester-mcp@latest`\n\n## \ud83c\udd95 What's New\n\n- \u2705 **Enhanced Progress Tracking** - Real-time progress with completion percentages and ETA\n- \u2705 **Visual Progress Bars** - ASCII progress bars with milestone notifications\n- \u2705 **Performance Metrics** - Throughput calculations and execution summaries\n- \u2705 **Published on NPM** - Install instantly with NPX\n- \u2705 **VS Code Integration** - One-click installation buttons  \n- \u2705 **Simplified Setup** - No manual Python installation required\n- \u2705 **Cross-Platform** - Works on Windows, macOS, and Linux\n- \u2705 **Auto-Updates** - Always get the latest version with `@latest`\n\n## \ud83d\ude80 Getting Started\n\n### Installation\n\nThe API Tester MCP server can be used directly with npx without any installation:\n\n```bash\nnpx @kirti676/api-tester-mcp@latest\n```\n\n**Quick Install:**\n\n[![Install in VS Code](https://img.shields.io/badge/Install%20in-VS%20Code-blue?style=for-the-badge&logo=visual-studio-code)](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%7B%22name%22%3A%22api-tester%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40kirti676%2Fapi-tester-mcp%40latest%22%5D%7D) [![Install in VS Code Insiders](https://img.shields.io/badge/Install%20in-VS%20Code%20Insiders-blue?style=for-the-badge&logo=visual-studio-code)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%7B%22name%22%3A%22api-tester%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40kirti676%2Fapi-tester-mcp%40latest%22%5D%7D)\n\n### Claude Desktop\n\nFollow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user), use the standard config below:\n\n```json\n{\n  \"mcpServers\": {\n    \"api-tester\": {\n      \"command\": \"npx\",\n      \"args\": [\"@kirti676/api-tester-mcp@latest\"]\n    }\n  }\n}\n```\n\n### Other MCP Clients\n\nThe standard configuration works with most MCP clients:\n\n```json\n{\n  \"mcpServers\": {\n    \"api-tester\": {\n      \"command\": \"npx\",\n      \"args\": [\"@kirti676/api-tester-mcp@latest\"]\n    }\n  }\n}\n```\n\n**Supported Clients:**\n- [Claude Desktop](https://claude.ai/desktop)\n- [VS Code](https://code.visualstudio.com/) with MCP extension\n- [Cursor](https://cursor.sh/)\n- [Windsurf](https://codeium.com/windsurf)\n- [Goose](https://github.com/Codium-ai/goose)\n- Any other MCP-compatible client\n\n### Python Installation (Alternative)\n\n```bash\npip install api-tester-mcp\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/kirti676/api_tester_mcp.git\ncd api_tester_mcp\nnpm install\n```\n\n## \u26a1 Quick Start\n\nTry the API Tester MCP server immediately:\n\n```bash\n# Run the server\nnpx @kirti676/api-tester-mcp@latest\n\n# Check version\nnpx @kirti676/api-tester-mcp@latest --version\n\n# Get help\nnpx @kirti676/api-tester-mcp@latest --help\n```\n\nFor MCP clients like Claude Desktop, use this configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"api-tester\": {\n      \"command\": \"npx\",\n      \"args\": [\"@kirti676/api-tester-mcp@latest\"]\n    }\n  }\n}\n```\n\n## \u2728 Features\n\n- **\ud83d\udce5 Input Support**: Swagger/OpenAPI documents and Postman collections\n- **\ud83d\udd04 Test Generation**: Automatic API and Load test scenario generation\n- **\u26a1 Test Execution**: Run generated tests with detailed reporting\n- **\ud83d\udd10 Smart Auth Detection**: Automatic environment variable analysis and setup guidance\n- **\ud83d\udd10 Authentication**: Bearer token and API key support via `set_env_vars`\n- **\ud83d\udcca HTML Reports**: Beautiful, accessible reports via MCP resources\n- **\ud83d\udcc8 Real-time Progress**: Live updates with progress bars and completion percentages\n- **\u23f1\ufe0f ETA Calculations**: Estimated time to completion for all operations\n- **\ud83c\udfaf Milestone Tracking**: Special notifications at key progress milestones (25%, 50%, 75%, etc.)\n- **\ud83d\udcca Performance Metrics**: Throughput calculations and execution summaries\n- **\u2705 Schema Validation**: Request body generation from schema examples\n- **\ud83c\udfaf Assertions**: Per-endpoint status code assertions (2xx, 4xx, 5xx)\n\n## \ud83d\udcc8 Progress Tracking\n\nThe API Tester MCP includes comprehensive progress tracking for all operations:\n\n### Visual Progress Indicators\n```\n\ud83c\udfaf API Test Execution: [\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591] 50.0% (5/10) | ETA: 2.5s - GET /api/users \u2705\n```\n\n### Features:\n- **Progress Bars**: ASCII progress bars with filled/empty indicators\n- **Completion Percentages**: Real-time percentage completion\n- **ETA Calculations**: Estimated time to completion based on current performance\n- **Milestone Notifications**: Special highlighting at key progress points\n- **Performance Metrics**: Throughput and timing statistics\n- **Operation Context**: Detailed information about current step being executed\n\n### Available for:\n- Scenario generation\n- Test case generation  \n- API test execution\n- Load test execution\n- All long-running operations\n\n## \ud83d\udee0\ufe0f MCP Tools\n\nThe server provides 8 comprehensive MCP tools:\n\n1. **`ingest_spec`** - Load Swagger/OpenAPI or Postman collections with automatic environment variable analysis\n2. **`get_env_var_suggestions`** - Get detailed environment variable setup guidance (NEW!)\n3. **`set_env_vars`** - Configure authentication and environment variables\n4. **`generate_scenarios`** - Create test scenarios from specifications\n5. **`generate_test_cases`** - Convert scenarios to executable test cases\n6. **`run_api_tests`** - Execute API tests with detailed results\n7. **`run_load_tests`** - Execute performance/load tests\n8. **`get_session_status`** - Retrieve current session information\n\n## \ud83d\udcda MCP Resources\n\n- **`file://reports`** - List all available test reports\n- **`file://reports/{report_id}`** - Access individual HTML test reports\n\n## \ud83d\udca1 MCP Prompts\n\n- **`create_api_test_plan`** - Generate comprehensive API test plans\n- **`analyze_test_failures`** - Analyze test failures and provide recommendations\n\n## \ufffd Smart Environment Variable Analysis\n\nThe API Tester MCP now automatically analyzes your API specifications to detect required environment variables and provides helpful setup guidance:\n\n### Automatic Detection\n- **Authentication Schemes**: Bearer tokens, API keys, Basic auth, OAuth2\n- **Base URLs**: Extracted from specification servers/hosts\n- **Template Variables**: Postman collection variables like `{{baseUrl}}`, `{{authToken}}`\n- **Path Parameters**: Dynamic values in paths like `/users/{userId}`\n\n### Smart Suggestions\n```javascript\n// 1. Ingest specification - automatic analysis included\nconst result = await mcp.call(\"ingest_spec\", {\n  spec_type: \"openapi\",\n  content: openapi_json_string\n});\n\n// Check the setup message for immediate guidance\nconsole.log(result.setup_message);\n// \"\u26a0\ufe0f 2 required environment variable(s) detected...\"\n\n// 2. Get detailed setup instructions\nconst suggestions = await mcp.call(\"get_env_var_suggestions\");\nconsole.log(suggestions.setup_instructions);\n// Provides copy-paste ready configuration examples\n```\n\n## \ufffd\ud83d\udd27 Configuration Example\n\n```javascript\n// NEW: Get smart suggestions first\nconst suggestions = await mcp.call(\"get_env_var_suggestions\");\n\n// Set environment variables for authentication\nawait mcp.call(\"set_env_vars\", {\n  variables: {\n    \"baseUrl\": \"https://api.example.com\",\n    \"auth_bearer\": \"your-bearer-token\",\n    \"auth_apikey\": \"your-api-key\"\n  }\n});\n\n// Ingest an OpenAPI specification (now with automatic env var analysis)\nawait mcp.call(\"ingest_spec\", {\n  spec_type: \"openapi\",\n  content: openapi_json_string\n});\n\n// Generate test scenarios\nawait mcp.call(\"generate_scenarios\", {\n  include_negative_tests: true,\n  include_edge_cases: true\n});\n\n// Run API tests\nawait mcp.call(\"run_api_tests\", {\n  max_concurrent: 5\n});\n```\n\n## \ufffd Complete Workflow Example\n\nHere's a complete example of testing the Petstore API:\n\n```bash\n# 1. Start the MCP server\nnpx @kirti676/api-tester-mcp@latest\n```\n\nThen in your MCP client (like Claude Desktop):\n\n```javascript\n// 1. Load the Petstore OpenAPI spec\nawait mcp.call(\"ingest_spec\", {\n  kind: \"openapi\", \n  path_or_text: \"https://petstore.swagger.io/v2/swagger.json\"\n});\n\n// 2. Set environment variables\nawait mcp.call(\"set_env_vars\", {\n  pairs: {\n    \"baseUrl\": \"https://petstore.swagger.io/v2\",\n    \"auth_apikey\": \"special-key\"\n  }\n});\n\n// 3. Generate test cases\nconst tests = await mcp.call(\"get_generated_tests\");\n\n// 4. Run API tests\nconst result = await mcp.call(\"run_api_tests\");\n\n// 5. View results in HTML report\nconst reports = await mcp.call(\"list_resources\", {\n  uri: \"file://reports\"\n});\n```\n\n## \ufffd\ud83d\udcd6 Usage Examples\n\n### Basic API Testing Workflow\n\n1. **Ingest API Specification**\n   ```json\n   {\n     \"tool\": \"ingest_spec\",\n     \"params\": {\n       \"spec_type\": \"openapi\",\n       \"content\": \"{ ... your OpenAPI spec ... }\"\n     }\n   }\n   ```\n\n2. **Configure Authentication**\n   ```json\n   {\n     \"tool\": \"set_env_vars\", \n     \"params\": {\n       \"variables\": {\n         \"auth_bearer\": \"your-token\",\n         \"baseUrl\": \"https://api.example.com\"\n       }\n     }\n   }\n   ```\n\n3. **Generate and Run Tests**\n   ```json\n   {\n     \"tool\": \"generate_scenarios\",\n     \"params\": {\n       \"include_negative_tests\": true\n     }\n   }\n   ```\n\n4. **View Results**\n   - Access HTML reports via MCP resources\n   - Get session status and statistics\n\n### Load Testing\n\n```json\n{\n  \"tool\": \"run_load_tests\",\n  \"params\": {\n    \"users\": 10,\n    \"duration\": 60,\n    \"ramp_up\": 10\n  }\n}\n```\n\n## \ud83d\udd0d Test Generation Features\n\n- **Positive Tests**: Valid requests with expected 2xx responses\n- **Negative Tests**: Invalid authentication (401), wrong methods (405)\n- **Edge Cases**: Large payloads, boundary conditions\n- **Schema-based Bodies**: Automatic request body generation from OpenAPI schemas\n- **Comprehensive Assertions**: Status codes, response times, content validation\n\n## \ud83d\udcca HTML Reports\n\nGenerated reports include:\n- Test execution summary with pass/fail statistics\n- Detailed test results with timing information\n- Assertion breakdowns and error details\n- Response previews and debugging information\n- Mobile-friendly responsive design\n\n## \ud83d\udd12 Authentication Support\n\n- **Bearer Tokens**: `auth_bearer` environment variable\n- **API Keys**: `auth_apikey` environment variable (sent as X-API-Key header)\n- **Basic Auth**: `auth_basic` environment variable\n\n## \ud83d\udd27 Requirements\n\n- **Python**: 3.8 or higher\n- **Node.js**: 14 or higher (for npm installation)\n\n## \ud83d\udce6 Dependencies\n\n### Python Dependencies\n- fastmcp>=0.2.0\n- pydantic>=2.0.0\n- aiohttp>=3.8.0\n- jinja2>=3.1.0\n- pyyaml>=6.0\n- jsonschema>=4.0.0\n- faker>=19.0.0\n\n### Node.js Dependencies  \n- None (self-contained package)\n\n## \ud83d\udd27 Troubleshooting\n\n### Common Issues\n\n**NPX Command Not Working**\n```bash\n# If npx command fails, try:\nnpm install -g @kirti676/api-tester-mcp@latest\n\n# Or run directly:\nnode ./node_modules/@kirti676/api-tester-mcp/cli.js\n```\n\n**Python Not Found**\n```bash\n# Make sure Python 3.8+ is installed and in PATH\npython --version\n\n# Install Python dependencies manually if needed:\npip install fastmcp>=0.2.0 pydantic>=2.0.0 requests>=2.28.0\n```\n\n**MCP Client Connection Issues**\n- Ensure the MCP server is running on stdio transport (default)\n- Check that your MCP client supports the latest MCP protocol version\n- Verify the configuration JSON syntax is correct\n\n### Getting Help\n\n1. Check the [Examples](examples/) directory for working configurations\n2. See [PROGRESS_TRACKING.md](PROGRESS_TRACKING.md) for detailed progress tracking documentation\n3. Run with `--verbose` flag for detailed logging\n4. Report issues on [GitHub Issues](https://github.com/kirti676/api_tester_mcp/issues)\n\n## \ud83e\udd1d Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\udc1b Issues & Support\n\n- **NPM Package**: [@kirti676/api-tester-mcp](https://www.npmjs.com/package/@kirti676/api-tester-mcp)\n- Report bugs: [GitHub Issues](https://github.com/kirti676/api_tester_mcp/issues)\n- Documentation: [GitHub Wiki](https://github.com/kirti676/api_tester_mcp/wiki)\n- Discussions: [GitHub Discussions](https://github.com/kirti676/api_tester_mcp/discussions)\n- Interactive install page: [install.html](install.html)\n\n## \ud83d\udcc8 Roadmap\n\n- [ ] GraphQL API support\n- [ ] Additional authentication methods (OAuth2, JWT)\n- [ ] Performance monitoring and alerting\n- [ ] Integration with CI/CD pipelines\n- [ ] Test data generation from examples\n- [ ] API contract testing\n\n---\n\n**Made with \u2764\ufe0f for QA/SDET engineers**\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "MCP server for API testing with Swagger/OpenAPI and Postman collection support",
    "version": "1.1.0",
    "project_urls": {
        "Changelog": "https://github.com/kirti676/api_tester_mcp/blob/main/CHANGELOG.md",
        "Homepage": "https://github.com/kirti676/api_tester_mcp",
        "Issues": "https://github.com/kirti676/api_tester_mcp/issues",
        "Repository": "https://github.com/kirti676/api_tester_mcp.git"
    },
    "split_keywords": [
        "mcp",
        "api-testing",
        "swagger",
        "openapi",
        "postman",
        "qa",
        "sdet",
        "testing",
        "model-context-protocol"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "02276db422081fa0391c9d3bf3f709232f08f242247fba4ba71f63dbe3fba726",
                "md5": "c6fa0e0f6204e411387bbb6f0e51da86",
                "sha256": "d8dad7ff2e7c9d539e55878604f2a01015fc68d9c961e1624fbe2a57d955ec6a"
            },
            "downloads": -1,
            "filename": "api_tester_mcp-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c6fa0e0f6204e411387bbb6f0e51da86",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 34489,
            "upload_time": "2025-09-04T16:07:29",
            "upload_time_iso_8601": "2025-09-04T16:07:29.151730Z",
            "url": "https://files.pythonhosted.org/packages/02/27/6db422081fa0391c9d3bf3f709232f08f242247fba4ba71f63dbe3fba726/api_tester_mcp-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "306f931c11c09cd3a07ace2a263bf7a269a35070dd1c30b99f6c0e0d06117f30",
                "md5": "85bc4125d25924b6a8179ec911ebf4db",
                "sha256": "68e90ee7975b247aa860518f7d3ac9a8ef3e460ed4fb2d2815df8bdb14b488b4"
            },
            "downloads": -1,
            "filename": "api_tester_mcp-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "85bc4125d25924b6a8179ec911ebf4db",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 36580,
            "upload_time": "2025-09-04T16:07:30",
            "upload_time_iso_8601": "2025-09-04T16:07:30.042739Z",
            "url": "https://files.pythonhosted.org/packages/30/6f/931c11c09cd3a07ace2a263bf7a269a35070dd1c30b99f6c0e0d06117f30/api_tester_mcp-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-04 16:07:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kirti676",
    "github_project": "api_tester_mcp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "fastmcp",
            "specs": [
                [
                    ">=",
                    "0.2.0"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    ">=",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.28.0"
                ]
            ]
        },
        {
            "name": "jsonschema",
            "specs": [
                [
                    ">=",
                    "4.0.0"
                ]
            ]
        },
        {
            "name": "pyyaml",
            "specs": [
                [
                    ">=",
                    "6.0"
                ]
            ]
        },
        {
            "name": "jinja2",
            "specs": [
                [
                    ">=",
                    "3.1.0"
                ]
            ]
        },
        {
            "name": "aiofiles",
            "specs": [
                [
                    ">=",
                    "23.0.0"
                ]
            ]
        },
        {
            "name": "aiohttp",
            "specs": [
                [
                    ">=",
                    "3.8.0"
                ]
            ]
        },
        {
            "name": "faker",
            "specs": [
                [
                    ">=",
                    "19.0.0"
                ]
            ]
        }
    ],
    "lcname": "api-tester-mcp"
}
        
Elapsed time: 3.91648s