Multi-API Benchmark MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Multi-API Benchmark MCP Server
A production-ready MCP server for benchmarking multiple model APIs concurrently, with a focus on free vision-capable models.
Author: Eduardo J. Barrios (GitHub: @edujbarrios)
Overview
The Multi-API Benchmark MCP Server is a comprehensive benchmarking solution designed to test and compare vision-capable AI models across multiple providers simultaneously. Built with a focus on free and free-tier APIs, it enables developers and researchers to evaluate multimodal AI performance without incurring costs.
Key Features
๐ Concurrent Benchmarking: Run tests across multiple providers and models in parallel
๐ผ๏ธ Vision Support: Full support for image inputs (URLs, local files, base64)
๐ Free-Tier Focus: MVP built around genuinely free APIs (llm7.io, Moondream)
๐ Comprehensive Metrics: Track latency, tokens, costs, success rates, and responses
๐พ Persistent Storage: SQLite-based storage for benchmark runs and results
๐ค Multiple Export Formats: Export results as JSON, CSV, or Markdown
๐ง MCP Integration: Native Model Context Protocol support for Claude Desktop and Cursor
โก Production-Ready: Robust error handling, retries, timeouts, and logging
Related MCP server: mcp-vision-server
Supported Providers (MVP)
The initial release focuses on free vision-capable APIs:
Provider | Vision Support | Status | Notes |
llm7.io | โ Yes | Available | Free access to vision models including GPT-4o-mini, Claude 3.5 Sonnet |
Moondream | โ Yes | Available | Specialized open vision model, free to use |
Future Expansion: The architecture supports easy addition of new providers. Paid APIs (OpenAI, Anthropic, Google, etc.) can be added later without code restructuring.
Installation
Prerequisites
Python 3.10 or higher
pip or uv package manager
Setup
Clone the repository:
git clone https://github.com/edujbarrios/multi-api-bench-mcp.git cd multi-api-bench-mcpInstall dependencies:
pip install -e . # OR with uv: uv pip install -e .Configure environment:
cp .env.example .envEdit
.envand add your API credentials:LLM7_API_KEY=your_llm7_api_key_here MOONDREAM_API_KEY=your_moondream_key_if_neededVerify installation:
python -m pytest tests/
Quick Start
Running the MCP Server
python -m src.server.serverThe server will start and communicate via stdio, ready to accept MCP tool calls.
Basic Benchmark Example
Using the MCP run_benchmark tool:
{
"prompt": "What objects are visible in this image?",
"image_urls": ["https://example.com/sample.jpg"],
"providers": [
{"provider": "llm7", "model": "gpt-4o-mini"},
{"provider": "moondream", "model": "moondream-2"}
],
"concurrency": 2,
"timeout": 30
}Vision Benchmark Use Cases
OCR Testing: Compare text extraction from receipts, documents, screenshots
Chart Analysis: Test visual reasoning on graphs and data visualizations
UI Understanding: Evaluate model comprehension of user interfaces
Receipt Processing: Compare structured data extraction capabilities
Photo Description: Test general image understanding and captioning
MCP Tools
The server exposes 11 powerful tools via the Model Context Protocol:
1. run_benchmark
Run a benchmark with custom prompts and images against multiple providers.
Parameters:
prompt(required): Text prompt to sendsystem_prompt(optional): System-level instructionsimage_urls(optional): Array of image URLsimage_paths(optional): Array of local file pathsproviders(required): Array of provider configs (provider, model, temperature, max_tokens)concurrency(optional): Concurrent request limit (default: 5)timeout(optional): Timeout per request in seconds (default: 30)retries(optional): Retry attempts (default: 2)name(optional): Name for this runtags(optional): Tags for categorization
Returns: Run ID and summary with latency, success rates, and responses
2. run_benchmark_suite
Execute a saved benchmark suite.
Parameters:
suite_id(required): ID or name of the suite
Returns: Run summary with results across all cases
3. list_providers
List all configured providers and their availability status.
Returns: Provider names, status, vision support, API key configuration
4. list_models
List available models for a specific provider.
Parameters:
provider(required): Provider name
Returns: Array of model identifiers
5. save_benchmark_suite
Save a reusable benchmark suite for repeated testing.
Parameters:
name(required): Suite namedescription(optional): Descriptioncases(required): Array of benchmark cases (prompt, images, tags)providers(required): Array of provider configurations
Returns: Suite ID
6. list_benchmark_suites
List all saved benchmark suites.
Returns: Array of suite summaries with IDs, names, and update times
7. get_benchmark_run
Retrieve detailed results from a previous benchmark run.
Parameters:
run_id(required): Run identifier
Returns: Complete run data including all results, timings, and metadata
8. list_benchmark_runs
List recent benchmark runs with summaries.
Parameters:
limit(optional): Maximum runs to return (default: 20)
Returns: Array of run summaries
9. compare_runs
Compare multiple benchmark runs side by side.
Parameters:
run_ids(required): Array of run IDs to compare
Returns: Comparison analysis with best performers and provider statistics
10. export_run
Export a benchmark run to a file.
Parameters:
run_id(required): Run IDformat(required): Export format ('json', 'csv', 'markdown')filename(optional): Output filename
Returns: File path of exported data
11. test_provider
Test connectivity and configuration for a provider.
Parameters:
provider(required): Provider namemodel(optional): Specific model to test
Returns: Connection test results
Configuration
Environment Variables
See .env.example for all configuration options:
# Provider API Keys
LLM7_API_KEY=your_key_here
MOONDREAM_API_KEY=your_key_here
# Benchmark Defaults
DEFAULT_CONCURRENCY=5
DEFAULT_TIMEOUT=30
DEFAULT_RETRIES=2
# Storage
DATABASE_PATH=./benchmark_data.db
# Logging
LOG_LEVEL=INFO
LOG_FILE=./mcp-benchmark.log
# Export
EXPORT_DIR=./exportsClaude Desktop Integration
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"multi-api-bench": {
"command": "python",
"args": [
"-m",
"src.server.server"
],
"cwd": "/absolute/path/to/multi-api-bench-mcp",
"env": {
"LLM7_API_KEY": "your_key_here",
"MOONDREAM_API_KEY": "your_key_here"
}
}
}
}Restart Claude Desktop and the benchmark tools will be available.
Cursor Integration
Add to your Cursor MCP settings (.cursor/mcp.json):
{
"mcpServers": {
"multi-api-bench": {
"command": "python",
"args": ["-m", "src.server.server"],
"cwd": "${workspaceFolder}/multi-api-bench-mcp",
"env": {
"LLM7_API_KEY": "${env:LLM7_API_KEY}",
"MOONDREAM_API_KEY": "${env:MOONDREAM_API_KEY}"
}
}
}
}Architecture
The project follows a modular, layered architecture:
src/
โโโ server/ # MCP server implementation
โโโ providers/ # Provider abstraction layer
โ โโโ base.py # BaseProvider interface
โ โโโ llm7.py # LLM7.io adapter
โ โโโ moondream.py # Moondream adapter
โ โโโ registry.py # Provider registry
โโโ benchmarks/ # Benchmark orchestration
โ โโโ executor.py # Concurrent execution logic
โโโ storage/ # SQLite persistence
โ โโโ database.py # Database operations
โโโ schemas/ # Pydantic models
โ โโโ benchmark.py # Benchmark data models
โ โโโ provider.py # Provider schemas
โโโ exports/ # Export and reporting
โ โโโ exporters.py # JSON/CSV/Markdown exporters
โ โโโ reports.py # Comparison and analysis
โโโ config/ # Configuration management
โ โโโ settings.py # Settings with env loading
โโโ utils/ # Utility functions
โโโ helpers.py # Common helpersKey Design Principles
Provider Abstraction: All providers implement
BaseProvider, enabling easy addition of new APIsAsync-First: Full asyncio support with concurrency control
Normalized Results: Provider-specific responses normalized to common schema
Graceful Degradation: Partial failures don't break entire benchmark runs
Type Safety: Comprehensive Pydantic models for validation
Adding New Providers
The architecture makes adding new providers straightforward:
Create provider file in
src/providers/Inherit from
BaseProviderImplement required methods:
name,supports_vision,supports_system_prompt,default_modellist_models(),_make_request()
Register in
registry.pyAdd configuration to
settings.py
See src/providers/llm7.py or src/providers/moondream.py for examples.
Example Benchmark Suite
Save this as benchmark_suites/vision_ocr_suite.json:
{
"name": "OCR and Document Vision Suite",
"description": "Test vision models on text extraction and document understanding",
"cases": [
{
"prompt": "Extract all visible text from this image",
"image_urls": ["https://example.com/receipt.jpg"],
"tags": ["ocr", "receipt"]
},
{
"prompt": "What type of chart is this and what data does it show?",
"image_urls": ["https://example.com/chart.png"],
"tags": ["chart", "reasoning"]
},
{
"prompt": "Describe the UI elements and layout of this screenshot",
"image_urls": ["https://example.com/ui_screenshot.png"],
"tags": ["ui", "layout"]
}
],
"providers": [
{"provider": "llm7", "model": "gpt-4o-mini"},
{"provider": "moondream", "model": "moondream-2"}
]
}Troubleshooting
Provider Authentication Errors
Issue: Provider authentication failed
Solution:
Verify API keys in
.envfileCheck provider status with
test_providertoolEnsure no extra whitespace in API key values
Image Loading Failures
Issue: Invalid image file
Solution:
Verify file exists and path is correct
Check image format (PNG, JPG, JPEG, WebP supported)
Ensure file is not corrupted (try opening manually)
Timeout Errors
Issue: Requests timing out
Solution:
Increase timeout in configuration
Check internet connectivity
Verify provider service is operational
Database Locked
Issue: database is locked
Solution:
Close any other processes accessing the database
Check file permissions
Consider using a different database path
Security Considerations
API Keys: Never commit
.envfile or expose credentialsLogging: API keys are automatically masked in logs
Local Storage: Benchmark data stored locally in SQLite
Network: All provider requests use HTTPS
Input Validation: Pydantic models validate all inputs
Performance Tips
Concurrency: Adjust
DEFAULT_CONCURRENCYbased on provider rate limitsTimeouts: Set reasonable timeouts for vision models (30-60s recommended)
Batching: Use benchmark suites for efficient repeated testing
Storage: Periodically archive old benchmark data
Exports: Export large runs to files rather than keeping in memory
Roadmap
v0.2.0 (Planned)
Add more free-tier providers (Replicate free models, HuggingFace Inference API)
Web UI for visualizing benchmark results
Streaming response support
Advanced comparison analytics
v0.3.0 (Planned)
Paid provider support (OpenAI, Anthropic, Google)
Cost optimization recommendations
Automated provider health checks
Benchmark scheduling
Contributing
Contributions are welcome! Areas of interest:
New free provider implementations
Enhanced reporting and visualization
Performance optimizations
Test coverage improvements
Documentation enhancements
Please open an issue before starting major changes.
License
MIT License - see LICENSE file for details.
Acknowledgments
Built with Model Context Protocol (MCP)
Inspired by the need for comprehensive multimodal AI benchmarking
Thanks to providers offering free API access for research and development
Contact
Eduardo J. Barrios
GitHub: @edujbarrios
Project: multi-api-bench-mcp
For questions, issues, or contributions, please use GitHub Issues.
Happy Benchmarking! ๐
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Free OpenAI-compatible inference with signed provenance receipts and 3 focused MCP tools.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Chat, image, video, and audio models from many vendors behind one remote MCP server and one key.
Generate images from Claude, ChatGPT, Cursor and Codex with 12 top AI image models and 10 tools: up to 4 images per call, SVG vectorization, editing and more. Remote MCP with OAuth, no API keys. Pay per image, no subscription.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceBridges text-only models like DeepSeek to 6 free multimodal vision APIs via MCP, enabling image understanding and analysis through automatic fallback and caching.4MIT
- FlicenseAqualityDmaintenanceOpenAI-compatible vision MCP server with 14 provider presets that enables MCP clients to analyze images, including screenshots, text, and UI mockups, via a single analyze_image tool.2-
- AlicenseNot gradedqualityDmaintenanceMCP server for analyzing images using multiple vision LLM providers (OpenCode, OpenAI, Anthropic, Google, and custom OpenAI-compatible endpoints). Provides tools to analyze single or multiple images, list providers, and test vision capabilities.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that gives DeepSeek and other clients vision capabilities by routing images to open-source multimodal models, returning structured specifications or answers. Supports CLI and MCP tools for design analysis and general image Q&A.MIT