Skip to main content
Glama
mcp-internet-speed-test

mcp-internet-speed-test

MCP 互联网速度测试

⚠️ 实验版本

这是用于互联网速度测试的模型上下文协议 (MCP) 服务器的实验性实现。它允许 AI 模型和代理通过标准化接口测量、分析和报告网络性能指标。

Related MCP server: Test MCP Feb4 MCP Server

什么是 MCP?

模型上下文协议 (MCP) 为大型语言模型 (LLM) 与外部工具和数据源交互提供了一种标准化的方式。您可以将其视为“AI 应用的 USB-C”——一个允许 AI 系统访问现实世界功能和信息的通用接口。

特征

  • 下载速度测试:测量下载带宽

  • 上传速度测试:使用可配置文件大小测量上传带宽

  • 延迟测试:测量各种服务器的网络延迟

  • 抖动分析:通过分析延迟变化来计算网络抖动

  • 综合报告:提供详细的 JSON 格式报告

安装

先决条件

  • Python 3.12 或更高版本

  • uv包管理器(推荐)

选项 1:使用 uvx(推荐)

uvx命令是一种无需明确安装即可直接运行 Python 包的便捷方法:

# Run the MCP server directly
uvx /path/to/mcp-internet-speed-test

选项 2:使用 docker

# Build the Docker image
docker build -t mcp-internet-speed-test .

# Run the MCP server in a Docker container
docker run -it --rm -v $(pwd):/app -w /app mcp-internet-speed-test

配置

要将此 MCP 服务器与 Claude Desktop 或其他 MCP 客户端一起使用,请将其添加到您的 MCP 配置文件中。

Claude桌面配置

编辑您的 Claude Desktop MCP 配置文件:

{
    "mcpServers": {
        "mcp-internet-speed-test": {
            "command": "uv",
            "args": [
                "--directory",
                "/ABSOLUTE/PATH/TO/mcp-internet-speed-test",
                "run",
                "main.py"
            ]
        }
    }
}

API 工具

MCP 互联网速度测试提供以下工具:

  1. measure_download_speed :测量下载带宽(以 Mbps 为单位)

  2. measure_upload_speed :测量上传带宽(以 Mbps 为单位)

  3. measure_latency :测量网络延迟(以毫秒为单位)

  4. measure_jitter网络抖动:通过分析延迟变化来测量网络抖动

  5. run_complete_test :运行所有测试并提供综合报告

故障排除

如果您在连接 MCP 服务器时遇到问题:

  1. 确保 MCP 配置中的路径正确

  2. 检查您是否具有该目录所需的权限

  3. 验证 Python 3.12+ 是否已安装并位于您的 PATH 中

  4. 确保已安装mcp[cli]和requests包

发展

这是一个实验项目,欢迎贡献。贡献方式:

  1. 打开问题或提交拉取请求

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

致谢

  • MCP 框架维护者负责标准化 AI 工具交互

  • 模型上下文协议社区提供文档和示例

Available Tools

6 tools
get_server_infoA
Get server information for any URL without performing speed tests.

Args:
    url_download: URL to download data from
    url_upload: URL to upload data to
    url_latency: URL to measure latency to

Returns:
    Dictionary with servers information including POP location, CDN info, etc.

Inputs: url_download, url_upload, url_latency.

measure_download_speedB
Measure download speed using incremental file sizes.

Args:
    size_limit: Maximum file size to test (default: 128MB)
    sustain_time: Duration in seconds for each test (1-8, default: 8)

Returns:
    Dictionary with download speed results

Inputs: size_limit, sustain_time.

measure_jitterD

Jitter is the variation in latency, so we need multiple measurements.

Inputs: url, samples.

measure_latencyB

Measure the latency using multiple samples and report the minimum.

Takes a number of samples and reports the lowest
value for the most accurate representation of network latency.

Args:
    url (str): The URL to measure latency to
    samples (int): Number of samples to take (default: 10)

Returns:
    Dictionary with latency result (minimum of all samples)

Inputs: url, samples.

measure_upload_speedB
Measure upload speed using incremental file sizes.

Args:
    url_upload: URL to upload data to
    size_limit: Maximum file size to test (default: 128MB)
    sustain_time: Duration in seconds for each test (1-8, default: 8)

Returns:
    Dictionary with upload speed results

Inputs: url_upload, size_limit, sustain_time.

run_complete_testA
Run a complete speed test returning all metrics in a single call.

This test uses the smart incremental approach inspired by SpeedOf.Me:
- First measures download speed with gradually increasing file sizes
- Then measures upload speed with gradually increasing data sizes
- Measures latency and jitter
- Returns comprehensive results with real-time data

Args:
    max_size: Maximum file size to test (default: 128MB)
    url_upload: URL for upload testing
    url_latency: URL for latency testing
    sustain_time: Duration in seconds for each test (1-8, default: 8)

Returns:
    Complete test results including download, upload, latency and jitter metrics

Inputs: max_size, url_upload, url_latency, sustain_time.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: server info, download speed, jitter, latency, upload speed, and a combined test. No overlap or ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern (get_, measure_, run_). Even though 'measure' appears multiple times, the nouns are distinct.

    Tool Count5/5

    6 tools is ideal for an internet speed test server, covering all key metrics plus a combined test and server info without bloat.

    Completeness5/5

    The set covers all standard speed test metrics: download, upload, latency, jitter, and server info. A combined test is also provided. No obvious gaps.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that allows users to ping other hosts to check network connectivity and diagnostic information. It enables LLMs to perform network latency tests and host availability checks through a standardized interface.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that provides standardized tools for AI agents to interact with the Test MCP Feb4 API. It enables LLMs to access API endpoints through asynchronous operations and standardized Model Context Protocol tools.
      -