File size: 3,945 Bytes
db500e8 30dd4bc db500e8 30dd4bc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | ---
language:
- en
license: mit
tags:
- mcp
- benchmark
- gradio
- fastmcp
- api-performance
pretty_name: MCP Server Benchmark Results
size_categories:
- n<1K
---
# 🔬 Gradio vs FastMCP Benchmark Report
**Generated:** 2026-03-04T10:26:47.242725
**Total scenarios:** 12
## Executive Summary
- **echo**: Gradio wins (151.4 vs 126.2 RPS, 1.2x difference)
- Gradio best config: concurrency_limit=1.0
- **async_sleep**: Gradio wins (126.6 vs 43.9 RPS, 2.88x difference)
- Gradio best config: concurrency_limit=1.0
## Throughput (Requests/Second)
| | ('fastmcp', 'mcp_streamable') | ('gradio', 'mcp_streamable') |
|:--------------------|--------------------------------:|-------------------------------:|
| ('async_sleep', 1) | 17.54 | 16.57 |
| ('async_sleep', 10) | 43.87 | 126.56 |
| ('echo', 1) | 126.23 | 54.28 |
| ('echo', 10) | 75.02 | 151.45 |
## Latency p50 (ms)
| | ('fastmcp', 'mcp_streamable') | ('gradio', 'mcp_streamable') |
|:--------------------|--------------------------------:|-------------------------------:|
| ('async_sleep', 1) | 62.46 | 62.939 |
| ('async_sleep', 10) | 146.304 | 78.523 |
| ('echo', 1) | 7.506 | 0 |
| ('echo', 10) | 115.045 | 62.953 |
## Gradio concurrency_limit Scaling
How does Gradio's throughput change as concurrency_limit increases?
| | 1.0 |
|:--------------------|-------:|
| ('async_sleep', 1) | 8.425 |
| ('async_sleep', 10) | 64.665 |
| ('echo', 1) | 27.14 |
| ('echo', 10) | 77.105 |
## Protocol Overhead: HTTP API vs MCP
Comparing latency of the same tool called via REST API vs MCP protocol:
| | mcp_streamable |
|:---------------------------|-----------------:|
| ('fastmcp', 'async_sleep') | 104.382 |
| ('fastmcp', 'echo') | 61.2755 |
| ('gradio', 'async_sleep') | 2104.85 |
| ('gradio', 'echo') | 1050.52 |
## Error Rates
All scenarios completed with 0% error rate. ✅
## Resource Usage
| server | ('mean', 'avg_cpu_pct') | ('mean', 'avg_memory_mb') | ('mean', 'peak_memory_mb') | ('max', 'avg_cpu_pct') | ('max', 'avg_memory_mb') | ('max', 'peak_memory_mb') |
|:---------|--------------------------:|----------------------------:|-----------------------------:|-------------------------:|---------------------------:|----------------------------:|
| fastmcp | 0 | 5.655 | 5.66 | 0 | 5.67 | 5.67 |
| gradio | 0 | 4.955 | 4.955 | 0 | 5.68 | 5.68 |
## Benchmark Charts




## Methodology
- Both servers use identical tool implementations (imported from shared_tools.py)
- Each scenario runs in an isolated server subprocess
- Warmup period excluded from measurements
- Load generated by async httpx workers (not external tools)
- MCP tests use full protocol lifecycle (initialize → call_tool)
- System metrics sampled every 1s via psutil
---
*Benchmarks generated by [mcp-server-bench](https://github.com/Mandark-droid/mcp-server-bench)*
|