Quick overview
This workflow exposes a webhook that benchmarks multiple MCP server targets, sends probe results to external HTTP endpoints for analysis, optionally validates and stores the report, and returns a ranked performance and cost intelligence package to the caller.
How it works
- Receives a POST request via an n8n webhook containing MCP server targets, tool names to exercise, and load parameters like concurrency and duration.
- Validates and normalizes the request payload, builds a benchmark plan and cost-model context, and immediately returns a 400 error response if validation fails.
- Waits briefly and then calls an external HTTP endpoint to execute benchmark probes against the provided servers and tools.
- Waits briefly and calls an external HTTP endpoint to analyze the collected metrics for performance bottlenecks and cost optimization recommendations.
- Waits briefly and calls external HTTP endpoints to validate/enrich the scoring and store the benchmark report.
- Assembles a final intelligence package including server ranking, bottlenecks, cost estimates (if enabled), and an optimization plan, then returns it in the webhook response.
Setup
- Copy the webhook URL for the POST /mcp-benchmark endpoint and configure your client or upstream system to send benchmark requests to it.
- Replace the demo httpbin.org URLs with your real endpoints for running probes, performing AI analysis, validating/enriching results, and storing reports.
- Add any required authentication (credentials or headers) for your MCP servers, analysis service, validation service, and metrics store in the corresponding HTTP requests.
- Ensure your request payload includes at least one server in the servers (or targets) array and at least one tool name in tools (or toolsToProbe).