SuperAPIAI Directory

mcp-internet-speed-test

github.com · AI developer platforms

Internet speed testing: download and upload speed, latency, jitter, and CDN server detection with geographic mapping.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Purpose

mcp-internet-speed-test is a dedicated Model Context Protocol (MCP) server implementation for internet speed testing. It enables AI models and agents to measure, analyze, and report network performance metrics through a standardized interface. MCP is described as "the USB-C of AI applications," that is, providing a universal interface for large language models (LLMs) to interact with external tools and data sources.

Main Capabilities

  • Smart incremental testing: Uses the SpeedOf.Me methodology, with an 8-second threshold, pursuing optimal accuracy.
  • Download speed test: Measures bandwidth using files from 128KB to 128MB from a GitHub repository (Git LFS).
  • Upload speed test: Tests upload bandwidth using streamed data from 128KB to 128MB.
  • Latency test: Measures network latency using multiple samples and reports the minimum value.
  • Jitter analysis: Calculates network stability using multiple latency samples (5 by default).
  • Multi-CDN support: Detects and provides information for Fastly, Cloudflare, and AWS CloudFront.
  • Geolocation: Maps POP codes to physical locations (more than 50 locations worldwide).
  • Cache analysis: Detects HIT/MISS status and cache headers.
  • Server metadata: Extracts detailed CDN headers, including x-served-by, via, and x-cache.
  • Comprehensive test: Runs all tests through a single function and obtains complete metrics.

Usage

The environment requirements are Python 3.12 or later (required for asynchronous support), as well as the pip or uv package manager. Installation methods include: installing from PyPI with pip (recommended), installing from PyPI with uv, using Docker, or a development/local installation for contributing/modifying code.

This MCP server provides the following tools:

Test functions:

  • measure_download_speed: Measures download bandwidth (Mbps), including server location information.
  • measure_upload_speed: Measures upload bandwidth (Mbps), including server location information.
  • measure_latency: Measures network latency (ms) using samples and reports the minimum value.
  • measure_jitter: Measures by analyzing latency variationNetwork jitter, including server information.
  • get_server_info: Get detailed CDN server information for any URL without running a speed test.
  • run_complete_test: A comprehensive test including all metrics and server metadata.

To use this MCP server in Claude Desktop or other MCP clients, add it to the MCP configuration file (for example, edit Claude Desktop's MCP configuration file).

For the specific installation commands, configuration examples, and code snippets included in the project, please refer to the original text on the project page.

Use Cases

  • Network diagnostics: Understand which server is actually serving the test.
  • Performance analysis: Correlate speed results with server geographic distance.
  • CDN optimization: Identify whether the ISP's routing is optimal.
  • Geographic awareness: Understand whether the test is running in the expected region.
  • Troubleshooting: Identify routing issues and CDN configuration errors.

Limitations and Technical Details

  • Test duration threshold: 8.0 seconds (stop when a sample exceeds this value).
  • Maximum file size: configurable (default 128MB).
  • Latency samples: 10 measurements, reporting the minimum (configurable).
  • Jitter samples: 5 measurements (configurable).
  • sustain_time: 1-8 seconds (configurable, default 8).

Technically, an incremental approach is used: start with a small 128KB file and gradually increase by powers of 2; use a time-based threshold (configurable sustain_time 1-8 seconds, default 8), and stop when a sample exceeds the threshold; the final measured speed is taken from the last sample whose duration is >= 8 seconds. CDN provider detection includes Fastly, Cloudflare, and AWS CloudFront, analyzed by parsing x-served-by, via, x-cache, and custom CDN headers. Test endpoints include Cloudflare Workers (httpi.dev) as the highest priority, and HTTPBin (httpbin.org) as the secondary AWS-based endpoint.

Common troubleshooting tips: ensure absolute paths are used in the MCP configuration; verify read/execute permissions for the project directory; Python 3.12+ and async support are required; install mcp[cli] and httpx; ensure the GitHub repository inventer-dev/speed-test-files is accessible; check whether corporate firewalls/proxies are blocking the test endpoints; routing from some ISPs to CDNs may differ; jitter testing requires a stable connection; large files (>50MB) may time out on slow connections; automatic fallback occurs when the primary upload endpoint fails; POP detection depends on the consistency of CDN headers.

This project is experimental and uses the MIT license.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools