VuNet MCP HTTP Server
Connects AI assistants to live VuNet observability data, allowing querying metrics, browsing data models, and checking connection status.
README
VuNet MCP HTTP Server
A Model Context Protocol (MCP) server for VuNet vuSmartMaps using the Streamable HTTP transport. Connects AI assistants (VS Code Copilot, ChatGPT, Claude Desktop, etc.) directly to live VuNet observability data.
Features
- HTTP-based MCP — works with any MCP client that supports Streamable HTTP (VS Code, ChatGPT, Claude)
- Multi-environment — run one server process per VuNet tenant (UAT, production, sandbox) each on its own port
- Auto-authentication — logs in to VuNet automatically, caches session for 1 hour
- HTTPS-ready — pass cert/key in config for direct TLS, or put NGINX in front
Tools Exposed
| Tool | Description |
|---|---|
vunet_get_status |
Check connection status and VuNet tenant info |
vunet_query_metric |
Query any VuNet data model/metric with time range and filters |
vunet_fetch_datamodels |
Browse/search available signals (Metric, Event, Log) from the live tenant |
vunet_list_data_models |
Static reference list of common signal categories |
Prerequisites
- Node.js 18+ — download
- A running VuNet vuSmartMaps instance with API access
- (For HTTPS) A valid TLS certificate for your domain
Quick Start
1. Get the package
Option A — Clone the repo:
git clone https://github.com/mithung-vunet/vunet-mcp-http.git
cd vunet-mcp-http
npm install
Option B — Extract the release zip:
unzip vunet-mcp-deploy.zip
cd vunet-mcp-deploy
npm install
2. Configure environments
Copy the example config and fill in your VuNet credentials:
cp config.example.json config.json
Edit config.json:
{
"environments": {
"production": {
"label": "VuNet Production",
"tenant_url": "https://your-vunet-host.example.com",
"username": "your-username",
"password": "your-password",
"bu_id": "1",
"verify_ssl": true,
"port": 3001,
"ssl_cert": "",
"ssl_key": ""
},
"uat": {
"label": "VuNet UAT",
"tenant_url": "https://your-vunet-uat-host.example.com",
"username": "your-username",
"password": "your-password",
"bu_id": "1",
"verify_ssl": true,
"port": 3002,
"ssl_cert": "",
"ssl_key": ""
}
}
}
Note:
config.jsonis git-ignored — never commit real credentials.
3. Start the server
Single environment:
VUNET_ENV=production node index.js
# Windows:
set VUNET_ENV=production && node index.js
All environments at once (one process per env):
node start-all.js
Output:
[Vunet MCP] VuNet Production
[Vunet MCP] Listening on http://127.0.0.1:3001/mcp
[Vunet MCP] Tenant: https://your-vunet-host.example.com
[Vunet MCP] Mode: HTTP (no TLS)
Configuration Options
config.json fields
| Field | Required | Description |
|---|---|---|
label |
No | Human-readable name shown in logs |
tenant_url |
Yes | Base URL of your VuNet vuSmartMaps instance |
username |
Yes | VuNet login username |
password |
Yes | VuNet login password |
bu_id |
No | Business Unit ID (default: "1") |
verify_ssl |
No | Set false to skip SSL verification for self-signed certs |
port |
No | Port to listen on (default: 3000) |
ssl_cert |
No | Path to TLS certificate (enables HTTPS if set with ssl_key) |
ssl_key |
No | Path to TLS private key |
Environment variable overrides
All settings can be overridden via environment variables (useful for Docker/CI):
| Variable | Override |
|---|---|
VUNET_ENV |
Which environment block to load from config.json |
VUNET_TENANT_URL |
tenant_url |
VUNET_USERNAME |
username |
VUNET_PASSWORD |
password |
VUNET_BU_ID |
bu_id |
VUNET_VERIFY_SSL |
verify_ssl (false to disable) |
VUNET_BIND_HOST |
Bind address (default 127.0.0.1, use 0.0.0.0 for external) |
VUNET_CONFIG |
Path to a custom config file |
PORT |
Override port |
Pure env-var mode (no config.json):
VUNET_TENANT_URL=https://vunet.example.com \
VUNET_USERNAME=admin \
VUNET_PASSWORD=secret \
VUNET_BIND_HOST=0.0.0.0 \
node index.js
Production Deployment (Linux + NGINX)
Run as a background service
# Start all environments in background
VUNET_ENV=production VUNET_BIND_HOST=0.0.0.0 nohup node index.js > prod.log 2>&1 &
VUNET_ENV=uat VUNET_BIND_HOST=0.0.0.0 nohup node index.js > uat.log 2>&1 &
NGINX reverse proxy with HTTPS
Install NGINX and configure it to terminate TLS and proxy to Node:
server {
listen 443 ssl;
server_name mcp.your-domain.com;
ssl_certificate /path/to/fullchain.crt; # leaf + intermediate concatenated
ssl_certificate_key /path/to/server.key;
# Route /production/ → Node port 3001
location /production/ {
proxy_pass http://127.0.0.1:3001/mcp;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_buffering off;
}
# Route /uat/ → Node port 3002
location /uat/ {
proxy_pass http://127.0.0.1:3002/mcp;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_buffering off;
}
}
Important: Include the full certificate chain (leaf + intermediate) in your
ssl_certificatefile. Missing intermediates will cause ChatGPT and other clients to reject the TLS connection.Concatenate them:
cat server.crt intermediate.crt > fullchain.crt
Enable and reload:
sudo ln -s /etc/nginx/sites-available/mcp /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
MCP Client Configuration
VS Code (GitHub Copilot)
Add to your workspace .vscode/mcp.json:
{
"servers": {
"vunet-production": {
"type": "http",
"url": "https://mcp.your-domain.com/production/"
},
"vunet-uat": {
"type": "http",
"url": "https://mcp.your-domain.com/uat/"
}
}
}
Then use Ctrl+Shift+P → MCP: List Servers to connect.
ChatGPT
- Go to chatgpt.com → Apps (beta) → New App
- Set MCP Server URL to
https://mcp.your-domain.com/uat/ - Set Authentication to
No Auth - Check the acknowledgment and click Create
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"vunet": {
"type": "http",
"url": "https://mcp.your-domain.com/production/"
}
}
}
Verify the Server
Test the MCP handshake with curl:
curl https://mcp.your-domain.com/uat/ \
-H "Accept: application/json, text/event-stream" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}},"id":1}'
Expected response:
event: message
data: {"result":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"serverInfo":{"name":"vunet-mcp-server","version":"1.0.0"}},"jsonrpc":"2.0","id":1}
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
Not Acceptable: Client must accept text/event-stream |
Missing Accept header |
Normal in browser — MCP clients send the right headers automatically |
Already connected to a transport |
Old server version | Upgrade to v1.1+ which creates a fresh Server per connection |
Error creating connector (ChatGPT) |
Certificate chain incomplete | Concatenate leaf + intermediate into fullchain.crt |
502 Bad Gateway |
Server can't reach VuNet tenant | Check tenant_url, network, and verify_ssl setting |
Verify return code: 21 |
Missing intermediate cert | Download and concatenate the CA intermediate cert |
Unable to verify certificate |
Self-signed cert | Set "verify_ssl": false in config |
Security Notes
config.jsonis git-ignored — never commit it- Use environment variables instead of config files in containerized deployments
- Restrict
VUNET_BIND_HOSTto127.0.0.1when running behind NGINX (don't expose Node directly) - Use a reverse proxy (NGINX) to handle TLS — avoid putting private keys in app config where possible
License
MIT — © VuNet Systems
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。