Run LLM Evaluations and Experiments
Run LLM evaluations, batch scoring, and experiments via the Patronus AI SDK - hallucination checks, custom evaluators, and more.
Maintainer of this project? Claim this page to edit the listing.
1.0.0Add to Favorites
Why it matters
Standardize and automate the evaluation, optimization, and experimentation of LLM systems. This MCP server provides a robust interface for running detailed analyses on model outputs.
Outcomes
What it gets done
Initialize Patronus with API key and project settings
Run individual and batch evaluations with customizable evaluators
Execute experiments using datasets and custom evaluator functions
Retrieve and manage evaluator and criteria information
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-patronus-ai | bash Capabilities
Tools your agent gets
Initialize Patronus with API key and project settings
Run individual evaluations with customizable evaluators
Run batch evaluations with multiple evaluators
Run experiments with datasets
Get a complete overview of all available evaluators and their criteria
Create new evaluator criteria in the Patronus API
Evaluate task outputs using a custom evaluator function
Overview
Patronus AI MCP Server
Patronus AI MCP Server exposes the Patronus SDK for LLM evaluation - single and batch evaluations, dataset experiments, custom evaluator functions, and evaluator criteria management - through a standardized MCP interface. Use it when systematically evaluating LLM outputs for hallucinations, conciseness, or custom criteria. Requires a PATRONUS_API_KEY to authenticate.
What it does
Patronus AI MCP Server exposes the Patronus SDK through a standardized MCP interface, letting an AI assistant run evaluations, batch scoring, and experiments against LLM system outputs - checking for hallucinations, conciseness, and other custom-defined criteria.
When to use - and when NOT to
Use it when you want to evaluate LLM outputs systematically - running a single evaluation with a configurable evaluator, batch-evaluating multiple outputs with several evaluators at once, running experiments against a dataset, or defining custom evaluator functions with the @evaluator decorator. It's useful for LLM QA workflows like checking whether a model's output hallucinates, or scoring response brevity against custom criteria. Do not use it without a PATRONUS_API_KEY - it's required to authenticate with the Patronus service and can be supplied via command line or environment variable.
Capabilities
initialize: initialize Patronus with an API key and project settings.evaluate: run a single evaluation with a configurable evaluator.batch_evaluate: run batch evaluations with multiple evaluators.run_experiment: run experiments against datasets.list_evaluator_info: get a full overview of all available evaluators and their associated criteria.create_criteria: create new evaluator criteria in the Patronus API.custom_evaluate: evaluate task outputs using a custom evaluator function decorated with@evaluator.
How to install
git clone https://github.com/yourusername/patronus-mcp-server.git
cd patronus-mcp-server
python -m venv .venv
source .venv/bin/activate
uv pip install -e .
uv pip install -e ".[dev]"
Run with an API key via command line:
python src/patronus_mcp/server.py --api-key your_api_key_here
Or via environment variable:
export PATRONUS_API_KEY=your_api_key_here
python src/patronus_mcp/server.py
Who it's for
LLM developers and evaluation/QA teams who want to run systematic evaluations, batch scoring, and dataset-driven experiments against model outputs - including custom evaluator logic - through a standardized MCP interface.
Source README
An MCP server implementation for the Patronus SDK, providing a standardized interface for running powerful optimizations, evaluations, and experiments with LLM systems.
Installation
From Source
git clone https://github.com/yourusername/patronus-mcp-server.git
cd patronus-mcp-server
python -m venv .venv
source .venv/bin/activate
uv pip install -e .
uv pip install -e ".[dev]"
Command Line
python src/patronus_mcp/server.py --api-key your_api_key_here
Environment Variable
export PATRONUS_API_KEY=your_api_key_here
python src/patronus_mcp/server.py
Available Tools
| Tool | Description |
|---|---|
initialize |
Initialize Patronus with API key and project settings |
evaluate |
Run individual evaluations with customizable evaluators |
batch_evaluate |
Run batch evaluations with multiple evaluators |
run_experiment |
Run experiments with datasets |
list_evaluator_info |
Get a complete overview of all available evaluators and their associated criteria |
create_criteria |
Create new evaluator criteria in the Patronus API |
custom_evaluate |
Evaluate task outputs using a custom evaluator function decorated with @evaluator |
Capabilities
- Initialize Patronus with API key and project settings
- Run individual evaluations with customizable evaluators
- Run batch evaluations with multiple evaluators
- Run experiments with datasets
- Custom evaluator functions with @evaluator decorator
- Interactive testing capabilities
- Complete evaluator and criteria information
Environment Variables
Required
PATRONUS_API_KEY- API key for authentication with the Patronus service
Usage Examples
Evaluate whether model outputs contain hallucinations
Run batch evaluations to check answer conciseness
Create experiments for testing model outputs with datasets
List all available evaluators and their criteria
Create custom evaluation criteria for specific use cases
Resources
Notes
The server supports both command-line API key input and environment variable configuration. Includes an interactive testing script and comprehensive development guidelines for adding new features.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.