Skip to main content

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

Metadata

Release files for eval-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eval-mcp 0.1.1
File Size Uploaded
eval_mcp-0.1.1.tar.gz 298.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eval-mcp 0.1.1
File Interpreter ABI Platform
eval_mcp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 591.4 kB

Release files / eval_mcp-0.1.1.tar.gz

Download URL eval_mcp-0.1.1.tar.gz
Size 298.8 kB
Tags Source
SHA-256 checksum
How to use checksums
83fc56f91e4291db02bcdfd34dafdfef77c42b67782a2cb11033144b7f47881c
BLAKE2b-256 checksum
How to use checksums
6ea7d3cdd355195e1f291a6e8e381216346fe76f720dc072f82b90bd9d262bd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.5

Release files / eval_mcp-0.1.1-py3-none-any.whl

Download URL eval_mcp-0.1.1-py3-none-any.whl
Size 292.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
822cfbb56d88dfd212755b036605091fcc973982be6b7706f7886933589db46b
BLAKE2b-256 checksum
How to use checksums
88124fd65a03e06aaf0a36b7839b2b6d9fb0f88cd62683635d584e5e757e75e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page