MCP-Eval: An Evaluation Framework for MCP Servers
MCP-Eval is a developer-first testing framework for Model Context Protocol (MCP) servers, built on the mcp-agent library. It enables you to write clear, concise, and powerful tests to evaluate the performance, reliability, and correctness of your AI agents and the MCP servers they connect to.
Core Features
- Task-Based Testing: Define tests as async functions where an agent performs a task.
- Automatic Metrics: Automatically collect detailed metrics on latency, token usage, cost, and tool calls for every test run.
- Rich Assertions: A powerful set of assertions designed for AI testing, including:
contains(): Checks for substrings in responses.tool_was_called(): Verifies that a specific tool was used.tool_arguments_match(): Checks if a tool was called with the correct arguments.cost_under(): Asserts that a test run stays within a defined cost budget.number_of_steps_under(): Ensures an agent completes a task efficiently.objective_succeeded(): Uses an LLM to verify if the agent's response achieved the overall goal.plan_is_efficient(): Uses an LLM to check for redundant or inefficient steps in the agent's execution path.
- Tool Coverage Reporting: Automatically calculates the percentage of a server's tools that are exercised by your test suite.
- Automated Test Generation: A CLI tool to automatically generate a baseline test suite for any MCP server.
- Detailed Reports: Get immediate feedback from rich console reports and generate detailed JSON reports for CI/CD or further analysis.
Getting Started
1. Installation
Install mcp_eval and its dependencies. Make sure mcp-agent is also installed in your environment.
pip install "typer[all]" rich pydantic jinja2
Release files for pytest-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest_mcp-0.1.0.tar.gz | 60.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 114.0 kB
Release files / pytest_mcp-0.1.0.tar.gz
| Download URL | pytest_mcp-0.1.0.tar.gz |
|---|---|
| Size | 60.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2d7731da391c3af369df67474f223a47e5ec7bcf5ba2da92d39a030dbe038b4
|
|
BLAKE2b-256 checksum How to use checksums |
652e95ba25c73ce2f8b727e2fd91a7a7fd8abec72b47bfb1b4bd08b4e7a6745a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.11
|
Release files / pytest_mcp-0.1.0-py3-none-any.whl
| Download URL | pytest_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 53.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5b3f6e534a3d4bb2fb5e9096e8da4ba7fe00ccd9113755ceff56cacc030f6d6
|
|
BLAKE2b-256 checksum How to use checksums |
512d0d5d1042af581ab49b3edbba3f437c32b166bb9b1755121f580d139d829e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.11
|