An implementation of a Model Context Protocol (MCP) for internet speed testing. It allows AI models and agents to measure, analyze, and report network performance metrics through a standardized interface. ๐ฆ Available on PyPI: https://pypi.org/project/mcp-internet-speed-test/ ๐ Quick Start: The Model Context Protocol (MCP) provides a standardized way for Large Language Models (LLMs) to interact w
Add this skill
npx mdskills install inventer-dev/mcp-internet-speed-testWell-documented MCP server with comprehensive network diagnostics and CDN detection capabilities
1[](https://archestra.ai/mcp-catalog/inventer-dev__mcp-internet-speed-test)23[](https://mseep.ai/app/inventer-dev-mcp-internet-speed-test)45<a href="https://glama.ai/mcp/servers/@inventer-dev/mcp-internet-speed-test">6 <img width="380" height="200" src="https://glama.ai/mcp/servers/@inventer-dev/mcp-internet-speed-test/badge" alt="mcp-internet-speed-test MCP server" />7</a>89# MCP Internet Speed Test1011An implementation of a Model Context Protocol (MCP) for internet speed testing. It allows AI models and agents to measure, analyze, and report network performance metrics through a standardized interface.1213**๐ฆ Available on PyPI:** https://pypi.org/project/mcp-internet-speed-test/1415**๐ Quick Start:**16```bash17pip install mcp-internet-speed-test18mcp-internet-speed-test19```2021## What is MCP?2223The Model Context Protocol (MCP) provides a standardized way for Large Language Models (LLMs) to interact with external tools and data sources. Think of it as the "USB-C for AI applications" - a common interface that allows AI systems to access real-world capabilities and information.2425## Features2627- **Smart Incremental Testing**: Uses SpeedOf.Me methodology with 8-second threshold for optimal accuracy28- **Download Speed Testing**: Measures bandwidth using files from 128KB to 100MB from GitHub repository29- **Upload Speed Testing**: Tests upload bandwidth using generated data from 128KB to 100MB30- **Latency Testing**: Measures network latency using multiple samples, reports minimum value31- **Jitter Analysis**: Calculates network stability using multiple latency samples (default: 5)32- **Multi-CDN Support**: Detects and provides info for Fastly, Cloudflare, and AWS CloudFront33- **Geographic Location**: Maps POP codes to physical locations (50+ locations worldwide)34- **Cache Analysis**: Detects HIT/MISS status and cache headers35- **Server Metadata**: Extracts detailed CDN headers including `x-served-by`, `via`, `x-cache`36- **Comprehensive Testing**: Single function to run all tests with complete metrics3738## Installation3940### Prerequisites4142- Python 3.12 or higher (required for async support)43- pip or [uv](https://github.com/astral-sh/uv) package manager4445### Option 1: Install from PyPI with pip (Recommended)4647```bash48# Install the package globally49pip install mcp-internet-speed-test5051# Run the MCP server52mcp-internet-speed-test53```5455### Option 2: Install from PyPI with uv5657```bash58# Install the package globally59uv add mcp-internet-speed-test6061# Or run directly without installing62uvx mcp-internet-speed-test63```6465### Option 3: Using docker6667```bash68# Build the Docker image69docker build -t mcp-internet-speed-test .7071# Run the MCP server in a Docker container72docker run -it --rm -v $(pwd):/app -w /app mcp-internet-speed-test73```7475### Option 4: Development/Local Installation7677If you want to contribute or modify the code:7879```bash80# Clone the repository81git clone https://github.com/inventer-dev/mcp-internet-speed-test.git82cd mcp-internet-speed-test8384# Install in development mode85pip install -e .8687# Or using uv88uv sync89uv run python -m mcp_internet_speed_test.main90```9192### Dependencies9394The package automatically installs these dependencies:95- `mcp[cli]>=1.25.0`: MCP server framework with CLI integration96- `httpx>=0.27.0`: Async HTTP client for speed tests979899## Configuration100101To use this MCP server with Claude Desktop or other MCP clients, add it to your MCP configuration file.102103### Claude Desktop Configuration104105Edit your Claude Desktop MCP configuration file:106107#### Option 1: Using pip installed package (Recommended)108109```json110{111 "mcpServers": {112 "mcp-internet-speed-test": {113 "command": "mcp-internet-speed-test"114 }115 }116}117```118119#### Option 2: Using uvx120121```json122{123 "mcpServers": {124 "mcp-internet-speed-test": {125 "command": "uvx",126 "args": ["mcp-internet-speed-test"]127 }128 }129}130```131132## API Tools133134The MCP Internet Speed Test provides the following tools:135136### Testing Functions1371. `measure_download_speed`: Measures download bandwidth (in Mbps) with server location info1382. `measure_upload_speed`: Measures upload bandwidth (in Mbps) with server location info1393. `measure_latency`: Measures network latency (in ms) using samples, reports minimum value1404. `measure_jitter`: Measures network jitter by analyzing latency variations with server info1415. `get_server_info`: Get detailed CDN server information for any URL without running speed tests1426. `run_complete_test`: Comprehensive test with all metrics and server metadata143144## CDN Server Detection145146This speed test now provides detailed information about the CDN servers serving your tests:147148### What You Get149- **CDN Provider**: Identifies if you're connecting to Fastly, Cloudflare, or Amazon CloudFront150- **Geographic Location**: Shows the physical location of the server (e.g., "Mexico City, Mexico")151- **POP Code**: Three-letter code identifying the Point of Presence (e.g., "MEX", "QRO", "DFW")152- **Cache Status**: Whether content is served from cache (HIT) or fetched from origin (MISS)153- **Server Headers**: Full HTTP headers including `x-served-by`, `via`, and `x-cache`154155### Technical Implementation156157#### Smart Testing Methodology158- **Incremental Approach**: Starts with small files (128KB) and progressively increases159- **Time-Based Optimization**: Uses configurable sustain_time (1-8 seconds, default: 8) + 4-second additional buffer160- **Accuracy Focus**: Selects optimal file size that provides reliable measurements161- **Multi-Provider Support**: Tests against geographically distributed endpoints162163#### CDN Detection Capabilities164- **Fastly**: Detects POP codes and maps to 50+ global locations165- **Cloudflare**: Identifies data centers and geographic regions166- **AWS CloudFront**: Recognizes edge locations across continents167- **Header Analysis**: Parses `x-served-by`, `via`, `x-cache`, and custom CDN headers168169### Why This Matters170- **Network Diagnostics**: Understand which server is actually serving your tests171- **Performance Analysis**: Correlate speed results with server proximity172- **CDN Optimization**: Identify if your ISP's routing is optimal173- **Geographic Awareness**: Know if tests are running from your expected region174- **Troubleshooting**: Identify routing issues and CDN misconfigurations175176### Example Server Info Output177```json178{179 "cdn_provider": "Fastly",180 "pop_code": "MEX",181 "pop_location": "Mexico City, Mexico",182 "served_by": "cache-mex4329-MEX",183 "cache_status": "HIT",184 "x_cache": "HIT, HIT"185}186```187188### Technical Configuration189190#### Default Test Files Repository191```192GitHub Repository: inventer-dev/speed-test-files193Branch: main194File Sizes: 128KB, 256KB, 512KB, 1MB, 2MB, 5MB, 10MB, 20MB, 40MB, 50MB, 100MB195```196197#### Upload Endpoints Priority1981. **Cloudflare Workers** (httpi.dev) - Global distribution, highest priority1992. **HTTPBin** (httpbin.org) - AWS-based, secondary endpoint200201#### Supported CDN Locations (150+ POPs)202203**Fastly POPs**: MEX, QRO, DFW, LAX, NYC, MIA, LHR, FRA, AMS, CDG, NRT, SIN, SYD, GRU, SCL, BOG, MAD, MIL...204205**Cloudflare Centers**: DFW, LAX, SJC, SEA, ORD, MCI, IAD, ATL, MIA, YYZ, LHR, FRA, AMS, CDG, ARN, STO...206207**AWS CloudFront**: ATL, BOS, ORD, CMH, DFW, DEN, IAD, LAX, MIA, MSP, JFK, SEA, SJC, AMS, ATH, TXL...208209#### Performance Thresholds210- **Base Test Duration**: 8.0 seconds211- **Additional Buffer**: 4.0 seconds212- **Maximum File Size**: Configurable (default: 100MB)213- **Latency Samples**: 10 measurements, reports minimum (configurable)214- **Jitter Samples**: 5 measurements (configurable)215- **Sustain Time**: 1-8 seconds (configurable, default: 8)216217## Troubleshooting218219### Common Issues220221#### MCP Server Connection2221. **Path Configuration**: Ensure absolute path is used in MCP configuration2232. **Directory Permissions**: Verify read/execute permissions for the project directory2243. **Python Version**: Requires Python 3.12+ with async support2254. **Dependencies**: Install `mcp[cli]` and `httpx` packages226227#### Speed Test Issues2281. **GitHub Repository Access**: Ensure `inventer-dev/speed-test-files` is accessible2292. **Firewall/Proxy**: Check if corporate firewalls block test endpoints2303. **CDN Routing**: Some ISPs may route differently to CDNs2314. **Network Stability**: Jitter tests require stable connections232233#### Performance Considerations234- **File Size Limits**: Large files (>50MB) may timeout on slow connections235- **Upload Endpoints**: If primary endpoint fails, fallback is automatic236- **Geographic Accuracy**: POP detection depends on CDN header consistency237238## Development239240### Project Structure241```242mcp-internet-speed-test/243โโโ mcp_internet_speed_test/ # Main package directory244โ โโโ __init__.py # Package initialization245โ โโโ main.py # MCP server implementation246โโโ README.md # This documentation247โโโ Dockerfile # Container configuration248โโโ pyproject.toml # Python project configuration249```250251### Key Components252253#### Configuration Constants254- `GITHUB_RAW_URL`: Base URL for test files repository255- `UPLOAD_ENDPOINTS`: Prioritized list of upload test endpoints256- `SIZE_PROGRESSION`: Ordered list of file sizes for incremental testing257- `*_POP_LOCATIONS`: Mappings of CDN codes to geographic locations258259#### Core Functions260- `extract_server_info()`: Parses HTTP headers to identify CDN providers261- `measure_*()`: Individual test functions for different metrics262- `run_complete_test()`: Orchestrates comprehensive testing suite263264### Configuration Customization265266You can customize the following in `mcp_internet_speed_test/main.py` if you clone the repository:267```python268# GitHub repository settings269GITHUB_USERNAME = "your-username"270GITHUB_REPO = "your-speed-test-files"271GITHUB_BRANCH = "main"272273# Test duration thresholds274BASE_TEST_DURATION = 8.0 # seconds275ADDITIONAL_TEST_DURATION = 4.0 # seconds276277# Default endpoints278DEFAULT_UPLOAD_URL = "your-upload-endpoint"279DEFAULT_LATENCY_URL = "your-latency-endpoint"280```281282### Contributing283284This is an experimental project and contributions are welcome:2852861. **Issues**: Report bugs or request features2872. **Pull Requests**: Submit code improvements2883. **Documentation**: Help improve this README2894. **Testing**: Test with different network conditions and CDNs290291## License292293This project is licensed under the MIT License - see the LICENSE file for details.294295## Acknowledgments296297- MCP Framework maintainers for standardizing AI tool interactions298- The Model Context Protocol community for documentation and examples299- [SpeedOf.Me](https://speedof.me) team for their incremental testing methodology. For the official SpeedOf.Me MCP server, see [@speedofme/mcp](https://www.npmjs.com/package/@speedofme/mcp)
Full transparency โ inspect the skill content before installing.