testhub-mcp
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.
testhub-mcp
公共测试工具空间(Test Hub)—— 一个面向所有项目的远程测试工具 MCP。 基于 Model Context Protocol 的
streamable-http远程服务,可托管在 魔搭 ModelScope MCP 广场。
它解决什么
AI Agent 要跑测试,常常得自己装环境——费时、费流量、还常因硬件不够跑不起来。
testhub-mcp 把常用测试能力做成远程工具(Tool as a Service):Agent 只要连上这个 MCP,就能直接调用,零安装。
Related MCP server: webscout-mcp
工具(v0.1)
工具 | 作用 | 关键参数 |
| 对任意公网 URL 发 HTTP 请求(接口测试 / 连通性) |
|
| 抓取网页内容,默认转 markdown |
|
{
"ok": true,
"status": 200,
"headers": { "content-type": "application/json" },
"body": "{\"hello\":\"world\"}",
"elapsed_ms": 123.4,
"final_url": "https://api.example.com/v1/ping",
"truncated": false
}{
"ok": true,
"url": "https://example.com/",
"status": 200,
"content": "# Example Domain\n\nThis domain is for use in ...",
"start_index": 0,
"has_more": true,
"total_length": 12345,
"next_start_index": 5000
}内容过长时用
start_index分块读取(与魔搭官方fetch对齐)。
快速开始(本地)
pip install -r requirements.txt
python3 server.py # 默认监听 0.0.0.0:8000,端点 /mcp
# 或
MCP_TRANSPORT=sse PORT=8000 ./run.sh # 以 SSE 方式启动,端点为 /sse自测:
pip install -r requirements-dev.txt
pytest -q接入(客户端 / Agent)
把下面这段填进任意支持 MCP 的客户端(Cherry Studio / Claude Code / 自研 Agent 等):
{
"mcpServers": {
"testhub": {
"type": "streamable_http",
"url": "https://mcp.api-inference.modelscope.net/<YOUR-DEPLOY-ID>/mcp"
}
}
}详见 examples/:mcp.remote.json(远程)· mcp.local.json(本地)。
部署到魔搭(托管)
把本仓库推到 GitHub;
打开 https://modelscope.cn/mcp → 右上 「创建MCP」 → 「GitHub 快速创建」;
托管类型选 「可托管部署」,填入本仓库地址
https://github.com/tethila/testhub-mcp;服务配置 config 填(⚠️ 这就是平台的「启动命令」,必须带
command):{"mcpServers":{"testhub-mcp":{"command":"python","args":["-m","server"]}}}(拼起来即
python -m server;平台会拉取本仓库并用pyproject.toml安装依赖)提交后平台自动完成「拉代码 → uv 装依赖 → 部署到函数计算 → 生成 URL」,得到 长期 URL,填回客户端即可。
⚠️ 魔搭托管要求
streamable-http或sse,且服务需监听平台注入的PORT环境变量(本仓库已适配)。 若用uvx方式,可写:{"mcpServers":{"testhub-mcp":{"command":"uvx","args":["--from","git+https://github.com/tethila/testhub-mcp","testhub-mcp"]}}}
安全(重要)
作为公共工具,内置 SSRF 防护(见 security.py):
仅允许
http/https;域名解析出的任一 IP 落在内网/保留网段即拒绝;
覆盖 云元数据地址
169.254.169.254、回环、私有段、链路本地、组播等;单次响应体上限 512 KB,请求超时可控;
不保存任何数据、不硬编码凭证、无状态。
部署到公网前,请根据你的环境再复核一遍策略与限流。
目录结构
testhub-mcp/
├── server.py # MCP 服务入口(工具定义)
├── security.py # SSRF 防护
├── core.py # 纯函数:HTML→Markdown、截断
├── run.sh # 启动脚本(托管入口)
├── requirements.txt
├── requirements-dev.txt
├── examples/ # 客户端接入配置
└── tests/ # 单测(离线可跑)路线图
v0.1
http_request·fetch_pagev0.2
check_url(DNS/端口/证书/重定向)·assert_json·regex_extractv0.3 重测试(
run_pytest/ 浏览器冒烟)—— 需独立算力节点
许可
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Reliable web access for AI agents: smart HTTP, rotating proxies, and full-browser rendering.
Prompt-injection scanning and safe webpage fetching for AI agents reading untrusted content.
Web tools for AI agents: URL to clean Markdown, site crawl, screenshots, PDF/Office to text, OCR.
Pay-per-use agent tools: schedule HTTP calls, extract pages, PDFs, OG images, QR codes, short links.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables LLMs to make HTTP requests with OAuth2, session cookies, retry logic, and cURL command generation, while providing security features like SSRF protection and TLS enforcement.1MIT
- AlicenseAqualityBmaintenanceEnables AI agents to perform web searches, fetch and extract page content, and crawl sites with caching, rate limiting, and robots.txt compliance, all without needing API keys.152,001 PyPI2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to perform API testing and security validation through a permission-gated, SSRF-protected, audited MCP tool layer.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to validate AI infrastructure claims, check endpoint availability, solve CAPTCHA challenges, convert web pages to Markdown, search the web, extract structured JSON, and fetch bot-protected HTML through native tool calls.MIT