Metadata-Version: 2.4
Name: opentest-mcp
Version: 0.1.0
Summary: OpenTest MCP Server — API testing tools for AI agents
License: MIT
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp[cli]>=1.0.0
Requires-Dist: pyyaml>=6.0
Description-Content-Type: text/markdown

# opentest-mcp

MCP server for API testing — test your APIs directly from Claude Desktop, Cursor, or any MCP-compatible AI agent.

## Install

```bash
pip install opentest-mcp
```

Or run directly with [uvx](https://docs.astral.sh/uv/):

```bash
uvx opentest-mcp
```

## Configure with Claude Desktop / Cursor

Add to your MCP configuration:

```json
{
  "mcpServers": {
    "opentest": {
      "command": "uvx",
      "args": ["opentest-mcp", "--project-dir", "./"]
    }
  }
}
```

To sync results to the [OpenTest dashboard](https://opentest.live), add your API key:

```json
{
  "mcpServers": {
    "opentest": {
      "command": "uvx",
      "args": ["opentest-mcp", "--project-dir", "./", "--api-key", "YOUR_API_KEY"]
    }
  }
}
```

## Tools

| Tool | Description |
|------|-------------|
| `auto_test` | One-call: discover endpoints from your project, extract schemas, and run tests |
| `test_api` | Execute a single HTTP request with assertions and variable extraction |
| `import_api_spec` | Import an OpenAPI 3.x, Swagger 2.0, or Postman Collection spec |
| `run_api_tests` | Batch test all imported endpoints |
| `get_test_results` | Retrieve accumulated test results from the current session |

## CLI Options

```
opentest-mcp                                    # stdio transport (default)
opentest-mcp --transport sse --port 8080        # SSE transport
opentest-mcp --project-dir ./my-app             # auto-discover endpoints
opentest-mcp --api-key ot_live_xxx              # sync to dashboard
opentest-mcp --backend-url https://custom.host  # custom backend
```

## Supported Frameworks (auto-discovery)

- Express.js / Node.js
- NestJS
- FastAPI / Starlette
- Flask / Quart
- Go (Gin, Echo, Chi, net/http)
- Ruby on Rails
- OpenAPI spec files

## License

MIT
