See llms.txt for all machine-readable content.

Back to Templates

Benchmark MCP server performance and cost via webhook and HTTP services

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

  1. Receives a POST request via an n8n webhook containing MCP server targets, tool names to exercise, and load parameters like concurrency and duration.
  2. Validates and normalizes the request payload, builds a benchmark plan and cost-model context, and immediately returns a 400 error response if validation fails.
  3. Waits briefly and then calls an external HTTP endpoint to execute benchmark probes against the provided servers and tools.
  4. Waits briefly and calls an external HTTP endpoint to analyze the collected metrics for performance bottlenecks and cost optimization recommendations.
  5. Waits briefly and calls external HTTP endpoints to validate/enrich the scoring and store the benchmark report.
  6. 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

  1. Copy the webhook URL for the POST /mcp-benchmark endpoint and configure your client or upstream system to send benchmark requests to it.
  2. Replace the demo httpbin.org URLs with your real endpoints for running probes, performing AI analysis, validating/enriching results, and storing reports.
  3. Add any required authentication (credentials or headers) for your MCP servers, analysis service, validation service, and metrics store in the corresponding HTTP requests.
  4. 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).