run-benchmark

Run an MCP evaluation using mcpbr on SWE-bench or other datasets.

Best use case

run-benchmark is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Run an MCP evaluation using mcpbr on SWE-bench or other datasets.

Teams using run-benchmark should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/mcpbr-eval/SKILL.md --create-dirs "https://raw.githubusercontent.com/supermodeltools/mcpbr/main/.claude-plugin/skills/mcpbr-eval/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/mcpbr-eval/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How run-benchmark Compares

Feature / Agentrun-benchmarkStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Run an MCP evaluation using mcpbr on SWE-bench or other datasets.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Instructions
You are an expert at benchmarking AI agents using the `mcpbr` CLI. Your goal is to run valid, reproducible evaluations.

## Critical Constraints (DO NOT IGNORE)

1. **Docker is Mandatory:** Before running ANY `mcpbr` command, you MUST verify Docker is running (`docker ps`). If not, tell the user to start it.

2. **Config is Required:** `mcpbr run` FAILS without a config file. Never guess flags.
   - IF no config exists: Run `mcpbr init` first to generate a template.
   - IF config exists: Read it (`cat mcpbr.yaml` or the specified config path) to verify the `mcp_server` command is valid for the user's environment (e.g., check if `npx` or `uvx` is installed).

3. **Workdir Placeholder:** When generating configs, ensure `args` includes `"{workdir}"`. Do not resolve this path yourself; `mcpbr` handles it.

4. **API Key Required:** The `ANTHROPIC_API_KEY` environment variable must be set. Check for it before running evaluations.

## Common Pitfalls to Avoid

- **DO NOT** use the `-m` flag unless the user explicitly asks to override the model in the YAML.
- **DO NOT** hallucinate dataset names. Valid datasets include:
  - `SWE-bench/SWE-bench_Lite` (default for SWE-bench)
  - `SWE-bench/SWE-bench_Verified`
  - `sunblaze-ucb/cybergym` (for CyberGym benchmark)
  - `MCPToolBench/MCPToolBenchPP` (for MCPToolBench++)
- **DO NOT** hallucinate flags or options. Only use documented CLI flags.
- **DO NOT** forget to specify the config file with `-c` or `--config`.

## Supported Benchmarks

mcpbr supports three benchmarks:
1. **SWE-bench** (default): Real GitHub issues requiring bug fixes
   - Dataset: `SWE-bench/SWE-bench_Lite` or `SWE-bench/SWE-bench_Verified`
   - Use: `mcpbr run -c config.yaml` or `--benchmark swe-bench`

2. **CyberGym**: Security vulnerabilities requiring PoC exploits
   - Dataset: `sunblaze-ucb/cybergym`
   - Use: `mcpbr run -c config.yaml --benchmark cybergym --level [0-3]`

3. **MCPToolBench++**: Large-scale tool use evaluation
   - Dataset: `MCPToolBench/MCPToolBenchPP`
   - Use: `mcpbr run -c config.yaml --benchmark mcptoolbench`

## Execution Steps

Follow these steps in order:

1. **Verify Prerequisites:**
   ```bash
   # Check Docker is running
   docker ps

   # Verify API key is set
   echo $ANTHROPIC_API_KEY
   ```

2. **Check for Config File:**
   - If `mcpbr.yaml` (or user-specified config) does NOT exist: Run `mcpbr init` to generate it.
   - If config exists: Read it to understand the configuration.

3. **Validate Config:**
   - Ensure `mcp_server.command` is valid (e.g., `npx`, `uvx`, `python` are installed).
   - Ensure `mcp_server.args` includes `"{workdir}"` placeholder.
   - Verify `model`, `dataset`, and other parameters are correctly set.

4. **Construct the Command:**
   - Base command: `mcpbr run --config <path-to-config>`
   - Add flags as needed based on user request:
     - `-n <number>` or `--sample <number>`: Override sample size
     - `-v` or `-vv`: Verbose output
     - `-o <path>`: Save JSON results
     - `-r <path>`: Save Markdown report
     - `--log-dir <path>`: Save per-instance logs
     - `-M`: MCP-only evaluation (skip baseline)
     - `-B`: Baseline-only evaluation (skip MCP)
     - `--benchmark <name>`: Override benchmark
     - `--level <0-3>`: Set CyberGym difficulty level

5. **Run the Command:**
   Execute the constructed command and monitor the output.

6. **Handle Results:**
   - If the run completes successfully, inform the user about the results.
   - If errors occur, diagnose and provide actionable feedback.

## Example Commands

```bash
# Full evaluation with 5 tasks
mcpbr run -c config.yaml -n 5 -v

# MCP-only evaluation
mcpbr run -c config.yaml -M -n 10

# Save results and report
mcpbr run -c config.yaml -o results.json -r report.md

# Run CyberGym at level 2
mcpbr run -c config.yaml --benchmark cybergym --level 2 -n 5

# Run specific tasks
mcpbr run -c config.yaml -t astropy__astropy-12907 -t django__django-11099
```

## Troubleshooting

If you encounter errors:

1. **Docker not running:** Remind user to start Docker Desktop or Docker daemon.
2. **API key missing:** Ask user to set `export ANTHROPIC_API_KEY="sk-ant-..."`
3. **Config file invalid:** Re-generate with `mcpbr init` or fix the YAML syntax.
4. **MCP server fails to start:** Test the server command independently.
5. **Timeout issues:** Suggest increasing `timeout_seconds` in config.

## Important Reminders

- Always read the config file before making assumptions about what's configured.
- Never modify the config file without explicit user permission.
- Use the `mcpbr models` command to check available models if needed.
- Use the `mcpbr benchmarks` command to list available benchmarks.

Related Skills

generate-config

8
from supermodeltools/mcpbr

Generate and validate mcpbr configuration files for MCP server benchmarking.

swe-bench-lite

8
from supermodeltools/mcpbr

Quick-start command to run SWE-bench Lite evaluation with sensible defaults.

performing-kubernetes-cis-benchmark-with-kube-bench

16
from plurigrid/asi

Audit Kubernetes cluster security posture against CIS benchmarks using kube-bench with automated checks for control plane, worker nodes, and RBAC.

hardening-windows-endpoint-with-cis-benchmark

16
from plurigrid/asi

Hardens Windows endpoints using CIS (Center for Internet Security) Benchmark recommendations to reduce attack surface, enforce security baselines, and meet compliance requirements. Use when deploying new Windows workstations or servers, remediating audit findings, or establishing organization-wide security baselines. Activates for requests involving Windows hardening, CIS benchmarks, GPO security baselines, or endpoint configuration compliance.

hardening-linux-endpoint-with-cis-benchmark

16
from plurigrid/asi

Hardens Linux endpoints using CIS Benchmark recommendations for Ubuntu, RHEL, and CentOS to reduce attack surface, enforce security baselines, and meet compliance requirements. Use when deploying new Linux servers, remediating audit findings, or establishing security baselines for Linux infrastructure. Activates for requests involving Linux hardening, CIS benchmarks for Linux, server security baselines, or Linux configuration compliance.

auditing-cloud-with-cis-benchmarks

16
from plurigrid/asi

This skill details how to conduct cloud security audits using Center for Internet Security benchmarks for AWS, Azure, and GCP. It covers interpreting CIS Foundations Benchmark controls, running automated assessments with tools like Prowler and ScoutSuite, remediating failed controls, and maintaining continuous compliance monitoring against CIS v5 for AWS, v4 for Azure, and v4 for GCP.

golang-benchmark

15
from sushichan044/dotfiles

Golang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go benchmarks, profiling hot paths with pprof, interpreting CPU/memory/trace profiles, analyzing results with benchstat, setting up CI benchmark regression detection, or investigating production performance with Prometheus runtime metrics. Also use when the developer needs deep analysis on a specific performance indicator - this skill provides the measurement methodology, while golang-performance provides the optimization patterns.

infrastructure-benchmark

13
from docxology/template

Deterministic benchmark harnesses for public template exemplars. Use when scoring generated project outputs against benchmark manifests, refreshing the default template smoke manifest, checking publication-readiness rubrics, or adding bounded no-network readiness checks for public template outputs.

benchmark

12
from PeterBooker/veloria

Run Go benchmarks and compare results to detect performance regressions. Use before and after performance-related changes.

benchmark-email-automation

11
from EricGrill/agents-skills-plugins

Automate Benchmark Email tasks via Rube MCP (Composio). Always search tools first for current schemas.

conducting-benchmarking-analysis

11
from CaseMark/skills

Structures financial and operational benchmarking against industry peers with gap identification. Use when benchmarking performance, comparing to industry metrics, or identifying improvement opportunities.

benchmarking-portfolio-performance

11
from CaseMark/skills

Conducts portfolio performance measurement with benchmark comparison, attribution, and risk-adjusted metrics. Use when measuring portfolio performance, calculating Sharpe/Sortino ratios, or conducting performance attribution.