MCP Connection Test Server
云端 MCP Server 连接测试工具
这是一个只使用 Streamable HTTP 的云端 MCP Server。公网入口为:
https://你的域名/mcp上游能够发现并调用 mcp_connection_test,调用后固定返回
MCP连接成功。工具不调用模型,也不需要 API Key。
部署结构
上游 MCP 客户端 -> 已有 HTTPS 服务 443 -> 127.0.0.1:18080 -> MCP 容器 8000项目不再启动 Caddy,也不占用 80、443。MCP 只绑定服务器本机回环地址, 由现有 Nginx、Apache 或 Caddy 使用已有证书反向代理。
Related MCP server: MCP MCPO Demo Server
一、准备服务器和域名
云服务器安装 Docker Engine 和 Docker Compose 插件。
准备已有证书覆盖的域名,例如
mcp.example.com。确认现有 HTTPS 服务能够修改反向代理配置。
MCP_DOMAIN 只填写域名,不要包含 https:// 或路径。
二、上传项目
在本地 Mac 执行,将 SERVER_USER 和 SERVER_IP 换成真实值。这里明确排除
本地 .env 和虚拟环境,避免把旧 API Key 或无关文件上传到服务器:
rsync -av \
--exclude='.env' \
--exclude='.venv' \
--exclude='__pycache__' \
"/Users/clarence/Desktop/项目/兴先达/MCPtest/" \
SERVER_USER@SERVER_IP:~/mcp-connection-test/登录服务器:
ssh SERVER_USER@SERVER_IP
cd ~/mcp-connection-test三、填写域名并启动
cp deploy.env.example deploy.env编辑 deploy.env:
MCP_DOMAIN=mcp.example.com
MCP_LOCAL_PORT=18080如果 18080 已被占用,可以改成其他未使用的高位端口,例如 18081。检查端口:
sudo ss -ltnp | grep ':18080'构建并后台启动:
docker compose --env-file deploy.env up -d --build如果之前启动过旧版 Caddy 编排,使用下面的命令同时清理已经移除的 Caddy 容器;不会影响服务器上其他项目的容器:
docker compose --env-file deploy.env up -d --build --remove-orphans查看运行状态和日志:
docker compose --env-file deploy.env ps
docker compose --env-file deploy.env logs --tail=100四、接入现有 HTTPS 服务
如果使用 Nginx,将 nginx-mcp-location.conf.example 中的 location /mcp
配置加入已有证书域名对应的 server { ... } 中。确认反向代理端口与
MCP_LOCAL_PORT 一致,然后执行:
sudo nginx -t
sudo systemctl reload nginxNginx 的 proxy_pass 应指向:
http://127.0.0.1:18080最终公网 MCP 地址仍然是:
https://mcp.example.com/mcp五、验证工具发现和调用
在本地 Mac 执行,验证公网链路:
/opt/homebrew/Caskroom/miniconda/base/bin/python \
"/Users/clarence/Desktop/项目/兴先达/MCPtest/verify_remote.py" \
https://mcp.example.com/mcp成功时会显示:
发现工具:mcp_connection_test
调用返回:MCP连接成功这一步会真实执行 MCP 初始化、tools/list 和 tools/call,比普通的端口或
HTTP 检查更准确。
六、上游配置
将上游 MCP 客户端的服务器 URL 配置为:
https://mcp.example.com/mcp工具名称:
mcp_connection_test调用参数可以是空对象:
{}也可以传入探测内容:
{
"probe": "upstream-health-check"
}更新与停止
更新代码后重新部署:
docker compose --env-file deploy.env up -d --build停止服务:
docker compose --env-file deploy.env down常见问题
返回
421 Invalid Host header:deploy.env中的域名与访问域名不一致。出现
Connection refused:检查MCP_LOCAL_PORT、容器状态及反向代理端口是否一致。查看 MCP 服务日志:
docker compose --env-file deploy.env logs mcp-server。HTTPS 相关问题继续查看服务器现有 Nginx、Apache 或 Caddy 日志。
当前服务没有身份认证,因为它只有一个无副作用的连接测试工具。如果以后添加 真实业务工具,应增加 MCP 鉴权,或者在云安全组中只允许上游固定 IP 访问。
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityNot gradedmaintenanceA minimal reference implementation of an MCP server that responds with "Hello, World" via Streamable HTTP. Serves as a baseline for integration testing and MCP client development with production-ready features including health checks, metrics, and containerized deployment.320,480
- AlicenseNot gradedqualityDmaintenanceA demonstration MCP server that provides basic utility tools including hello world functionality and string reversal operations. Shows how to build and deploy MCP tools using the MCPO orchestrator framework.GPL 3.0
- FlicenseNot gradedqualityDmaintenanceA simple demonstration MCP server that provides an echo tool and resource for learning how to build MCP servers. Serves as a starting point and template for creating custom MCP server implementations.
- FlicenseNot gradedqualityBmaintenanceA simple HTTP server to validate MCP infrastructure for the Wazza MCP client, exposing endpoints for tool discovery and calling.
Related MCP Connectors
An authenticated remote MCP server for user-owned devices and one-shot capability invocation.
A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready
A paid remote MCP for hosted MCP server, built to return verdicts, receipts, usage logs, and audit-r
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/clarencez1011/mcpservertest'
If you have feedback or need assistance with the MCP directory API, please join our Discord server