⚙️ Configure with confidence! This comprehensive guide covers every configuration option, from basic setup to advanced customization. You’ll learn exactly how to tune mcp-eval for your specific needs.
Quick configuration finder
What do you need to configure?Basic Setup
Essential settings to get started
Servers
MCP server connections
Agents
Agent behavior and models
Providers
LLM providers and API keys
Testing
Test execution settings
Reporting
Output formats and locations
Configuration overview
mcp-eval uses a layered configuration system that gives you flexibility and control:File precedence (later overrides earlier)
mcp-agent.config.yaml
- Base configuration for servers and providersmcp-agent.secrets.yaml
- Secure API keys and credentialsmcpeval.yaml
- mcp-eval specific settingsmcpeval.secrets.yaml
- mcp-eval specific secrets- Environment variables - Runtime overrides
- Programmatic configuration - Code-level settings
File discovery
mcp-eval searches for configuration files in this order:Basic configuration
Let’s start with a complete, working configuration:Complete mcpeval.yaml example
Minimal configuration
If you just want to get started quickly:Server configuration
Configure your MCP servers for testing:Basic server setup
Advanced server options
Importing servers from other sources
Agent configuration
Define agents for different testing scenarios:Agent specifications
Agent selection strategies
Provider configuration
Configure LLM providers and authentication:Anthropic configuration
OpenAI configuration
Environment variable overrides
Test execution configuration
Fine-tune how tests are executed:Execution strategies
Performance optimization
Reporting configuration
Control how results are reported:Output formats and locations
Custom report templates
Judge configuration
Configure LLM judges for quality evaluation:Environment-specific configuration
Different settings for different environments:Development configuration
CI/CD configuration
Production configuration
Programmatic configuration
Configure mcp-eval from code:Basic programmatic setup
Advanced programmatic control
Environment variable reference
Complete list of environment variables:Configuration validation
Ensure your configuration is correct:Using the validate command
Programmatic validation
Schema validation
Best practices
Follow these guidelines for maintainable configuration:Keep secrets separate
Never commit API keys. Use
.secrets.yaml
files and add to .gitignore
Use environment layers
Create dev, staging, and prod configs that extend a base configuration
Document settings
Add comments explaining non-obvious configuration choices
Validate regularly
Run
mcp-eval validate
in CI to catch configuration issues earlyVersion control configs
Track configuration changes except for secrets files
Use defaults wisely
Set sensible defaults but allow overrides for flexibility
Troubleshooting configuration
Common configuration issues and solutions:Issue | Solution |
---|---|
Config not found | Check file name and location, use --config flag |
Invalid YAML | Validate syntax with yamllint or online validator |
Server won’t start | Check command path, permissions, and dependencies |
API key errors | Verify key in secrets file or environment variable |
Wrong model used | Check precedence: code > env > config file |
Timeout too short | Increase execution.timeout_seconds |
Configuration examples
Minimal testing setup
Comprehensive testing suite
See the complete example at the beginning of this guide.Multi-environment setup
You’re now a configuration expert! With this knowledge, you can tune mcp-eval to work perfectly for your specific testing needs. Remember: start simple and add complexity as needed! 🎯