Skip to main content

Model Context Protocol server for TestIO Customer API integration

Project description

TestIO MCP Server

AI-first Model Context Protocol server for TestIO Customer API

Python 3.12+ FastMCP Code style: ruff Type checked: mypy License: Proprietary

Query TestIO test status, bugs, and activity metrics through AI tools like Claude and Cursorโ€”no UI required.

โš ๏ธ Disclaimer: This software is provided "AS IS" with no warranty or support obligations. See License & Disclaimer for details.


What Is This?

TestIO MCP Server is a Model Context Protocol (MCP) server that provides read-only access to the TestIO Customer API. It enables non-developer stakeholders (CSMs, PMs, QA leads) to query test information using natural language through AI assistants like Claude Desktop or Cursor.

Key Features:

  • ๐Ÿ” 8 MCP Tools - Health check, test status, bug reporting, database management, sync monitoring
  • ๐Ÿ’พ Local Data Store - SQLite-based persistent cache with incremental sync, background refresh, and query interface
  • ๐Ÿ—๏ธ Service Layer Architecture - Framework-agnostic business logic, reusable across transports
  • ๐Ÿ”’ Security-First - Token sanitization, strict input validation, comprehensive secret scanning
  • โšก Performance - Local queries (~10ms), incremental sync, WAL mode for concurrent reads
  • ๐Ÿ“Š Strict Type Safety - mypy --strict enforced, Pydantic v2 validation throughout

Use Cases:

  • CSMs: "What's the status of test 109363?" โ†’ Get comprehensive test details in seconds
  • TLs: "Show me critical functional bugs for test 109363" โ†’ Filter bugs by type, severity, status
  • CSMs: "Generate a status report for tests 109363, 109364" โ†’ Export markdown/text/json summaries

Quick Start

Installation

# 1. Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# 2. Run interactive setup
uvx testio-mcp setup

# 3. Start server (config auto-loads from ~/.testio-mcp.env)
uvx testio-mcp serve --transport http

Setup command features:

  • Interactive prompts for:
    • TestIO subdomain and API token
    • Customer ID (default: 1)
    • Log format (text/JSON) and level (INFO/DEBUG/WARNING)
    • Optional product filtering (reduce sync scope)
  • API token validation with retry/force-save options
  • Automatic backup of existing configuration
  • Secure file permissions (user read/write only)
  • Clear next steps after completion

๐Ÿ“ Configuration Auto-Loading:

  • Production/Users: ~/.testio-mcp.env (created by setup, auto-loaded)
  • Development: .env in repo root (for testing, local dev)
  • Custom: Use --env-file /path/to/custom.env to override

No --env-file flag needed for normal usage!

Access your data three ways:

  • MCP Protocol: http://localhost:8080/mcp (Claude, Cursor)
  • REST API: http://localhost:8080/api/* (curl, web apps)
  • Swagger Docs: http://localhost:8080/docs (interactive API explorer)

See .env.example for configuration options.

Alternative: stdio mode (Single Client)

For using only one MCP client at a time:

# Add to Claude Code
claude mcp add testio-mcp -- uvx testio-mcp

See MCP_SETUP.md for detailed client configuration.


API Access

TestIO MCP Server provides three ways to access your data:

1. MCP Protocol (AI Clients)

Connect Claude Code, Cursor, or other MCP clients to http://localhost:8080/mcp

Best for: Natural language queries through AI assistants

2. REST API (Web Apps, curl)

Standard REST endpoints at http://localhost:8080/api/*:

  • GET /api/tests/{test_id} - Get test details
  • GET /api/tests?product_id=123 - List tests
  • GET /api/products - List products
  • POST /api/reports/ebr - Generate executive bug reports

Best for: Web applications, scripts, integrations

3. Interactive Swagger Docs

Open http://localhost:8080/docs in your browser to:

  • Browse all available endpoints
  • Test API calls interactively
  • View request/response schemas
  • Generate client code

Best for: API exploration, testing, documentation

Recommended: Run in hybrid mode (--api-mode hybrid) to enable all three access methods simultaneously.


CLI Usage

Basic commands:

# Show version
uvx testio-mcp --version

# Start HTTP mode (supports multiple clients)
uvx testio-mcp serve --transport http

# Check database sync status
uvx testio-mcp sync --status

See CLAUDE.md for complete CLI reference and advanced usage.

Database Sync

Automatic Sync:

  • Initial sync on server startup (non-blocking, server remains available)
  • Background refresh every 15 minutes (configurable via TESTIO_REFRESH_INTERVAL_SECONDS)
  • Incremental updates - Only fetches new and mutable tests (status not "archived")

Manual Control:

# Check sync status
uvx testio-mcp sync --status

# Sync recent data
uvx testio-mcp sync --since yesterday

# Force full refresh
uvx testio-mcp sync --force

See CLAUDE.md for advanced sync patterns and troubleshooting.

MCP Client Configuration

stdio mode (Single Client):

claude mcp add testio-mcp -- uvx testio-mcp

HTTP mode (Multiple Clients):

{
  "mcpServers": {
    "testio-mcp": {
      "url": "http://127.0.0.1:8080/mcp"
    }
  }
}

For REST API usage: Open http://localhost:8080/docs for interactive Swagger documentation.

See MCP_SETUP.md for detailed client configuration.


Features

  • Hybrid MCP + REST API - Access via MCP protocol, REST endpoints, or interactive Swagger docs
  • SQLite Local Cache - Fast local queries (~10ms), automatic sync, incremental updates
  • 8 MCP Tools - Also available via REST API (see /docs for complete list)
  • Type-Safe - mypy --strict, Pydantic v2 validation throughout
  • HTTP Transport - Multi-client support, background sync, health monitoring

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  MCP Tools / REST Endpoints             โ”‚
โ”‚  (Transport Layer)                      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Transformers (Anti-Corruption Layer)   โ”‚
โ”‚  - Converts service dicts to API models โ”‚
โ”‚  - Maps 'id' โ†’ 'test_id' (semantic)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Service Layer (Business Logic)         โ”‚
โ”‚  - TestService, ProductService, etc.    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Infrastructure (HTTP & SQLite)         โ”‚
โ”‚  - TestIOClient, PersistentCache        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

See docs/architecture/ARCHITECTURE.md for details.


Documentation


Configuration

See .env.example for all configuration options including:

  • API credentials
  • Database settings (path, refresh interval, date filtering)
  • HTTP & concurrency limits
  • Logging configuration
  • Tool enable/disable

License

Proprietary License - See LICENSE for terms.

This software is provided "AS IS" without warranty. Free to use, no modification/redistribution permitted.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

testio_mcp-0.2.0.tar.gz (126.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

testio_mcp-0.2.0-py3-none-any.whl (146.7 kB view details)

Uploaded Python 3

File details

Details for the file testio_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: testio_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 126.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for testio_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 132669444df2b035d3455c42cb083a7b25e78b76608ba3fc89e13989cab2afe4
MD5 3c48eb1ba1a690fe03c023bdc859f79a
BLAKE2b-256 8610e358c9e25bf08e7da0053e70968f6d364cae8089e2f3638e726ee69e9efa

See more details on using hashes here.

File details

Details for the file testio_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: testio_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 146.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for testio_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6dfc836fd838418e987e63bab8f21254d469d2fcb4cf40457c8b8050ca234ac1
MD5 f36159c4c942837a90344cc516ffc45b
BLAKE2b-256 30abc55fdfe0e10a1a11931f71388630e0095dc3a797b95cf26457688bb75bf0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page