Skip to main content
Automatic test generation uses AI to research your MCP server and automatically create test suites. Instead of manually writing dozens of test cases, you can generate them in minutes with a simple interactive wizard.

How It Works

Stage 1: MCP Introspection (Always executed)
  • Connects to your MCP server
  • Discovers all available tools, resources, and prompts
  • Analyzes tool schemas and capabilities
Stage 2: User Resources (Optional)
  • Processes documentation URLs you provide
  • Incorporates usage examples and best practices
  • Learns from your specific server context
Stage 3: Web Research (Optional)
  • Uses AI model to search for domain-specific knowledge about the MCP’s operational area

Quick Start

1

Ensure you have a configured server

Before generating tests, make sure you have at least one MCP server configured:
# List your servers
mcp-t list servers

# Or create a new server if needed
mcp-t create server
2

Run the generation wizard

Start the interactive test generation wizard:
mcp-t generate
3

Follow the interactive prompts

The wizard will guide you through:
  • Selecting which server to test
  • Optionally specifying a testing focus
  • Optionally providing documentation URLs
  • Choosing whether to enable web research
4

Run your generated tests

Once generation completes, run your new test suite:
mcp-t run <generated-suite-id> <server-id>
The suite ID will be displayed after generation completes.

Test Metadata

Each generated test includes metadata for tracking:
{
  "test_id": "fetch_url_happy_path",
  "user_message": "Can you fetch the content from https://example.com for me?",
  "success_criteria": "Agent successfully uses fetch_url tool and returns the content",
  "max_turns": 5,
  "context_persistence": true,
  "metadata": {
    "tool_name": "fetch_url",
    "test_type": "happy_path"
  }
}

Next Steps

After generating your test suite:
  1. Run the tests - Execute with mcp-t run <suite-id> <server-id>
  2. Review results - Check which tests pass and which fail
  3. Customize - Edit the generated suite to add specific test cases
  4. Iterate - Regenerate tests as your server evolves
Learn more:
I