mirror of
https://github.com/hansjone/netx.git
synced 2026-10-18 04:00:47 +08:00
MCP: serve tools from the API process over Streamable HTTP at /mcp
- netx_api/mcp_remote: ops / topology / bizMonitor tools, Bearer auth, per-tool RBAC filtering, ?groups= filter, readOnlyHint and group meta. - Mount the official MCP Streamable HTTP app at /mcp (stateless); AuthAuditMiddleware is pure ASGI and skips /mcp. - Let uvicorn chunk MCP responses; some Windows LSPs rewrite Content-Length replies on */mcp* paths into broken chunked framing. - NETX_MCP_ALLOWED_HOSTS opts into DNS-rebinding checks (off by default so LAN and reverse-proxy hosts work; Bearer is the gate). - Remove the three stdio Python MCP packages; tests moved to /mcp, including real-TCP framing regressions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
918ece86c3
commit
52679a7cfc
150 changed files with 2367 additions and 2812 deletions
36
mcp.all.json
36
mcp.all.json
|
|
@ -1,33 +1,27 @@
|
|||
{
|
||||
"mcpServers": {
|
||||
"netx": {
|
||||
"command": "python",
|
||||
"args": ["-m", "netx_mcp"],
|
||||
"env": {
|
||||
"NETX_API_URL": "http://127.0.0.1:8890",
|
||||
"NETX_LANG": "zh",
|
||||
"PYTHONIOENCODING": "utf-8",
|
||||
"PYTHONUTF8": "1"
|
||||
"url": "http://127.0.0.1:8890/mcp",
|
||||
"headers": {
|
||||
"Authorization": "Bearer ${NETX_API_TOKEN}"
|
||||
}
|
||||
},
|
||||
"netx-ops": {
|
||||
"url": "http://127.0.0.1:8890/mcp?groups=ops",
|
||||
"headers": {
|
||||
"Authorization": "Bearer ${NETX_API_TOKEN}"
|
||||
}
|
||||
},
|
||||
"netx-topology": {
|
||||
"command": "python",
|
||||
"args": ["-m", "netx_topology_mcp"],
|
||||
"env": {
|
||||
"NETX_API_URL": "http://127.0.0.1:8890",
|
||||
"NETX_LANG": "zh",
|
||||
"PYTHONIOENCODING": "utf-8",
|
||||
"PYTHONUTF8": "1"
|
||||
"url": "http://127.0.0.1:8890/mcp?groups=topology",
|
||||
"headers": {
|
||||
"Authorization": "Bearer ${NETX_API_TOKEN}"
|
||||
}
|
||||
},
|
||||
"netx-bizmonitor": {
|
||||
"command": "python",
|
||||
"args": ["-m", "netx_bizmonitor_mcp"],
|
||||
"env": {
|
||||
"NETX_API_URL": "http://127.0.0.1:8890",
|
||||
"NETX_LANG": "zh",
|
||||
"PYTHONIOENCODING": "utf-8",
|
||||
"PYTHONUTF8": "1"
|
||||
"url": "http://127.0.0.1:8890/mcp?groups=bizMonitor",
|
||||
"headers": {
|
||||
"Authorization": "Bearer ${NETX_API_TOKEN}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue