feat(mcp): add a built-in MCP server at /panel/api/mcp (#6956)

AI agents (Claude, Cursor, VS Code) can manage the panel through a stateless streamable-HTTP MCP endpoint. Every tool re-enters the router with the caller's credentials, so authentication, token scopes, CSRF and runtime.Runtime dispatch apply exactly as for the REST API; a restricted token scope is refused, log text is fenced as untrusted data, and each tool call is written to the panel log.

The endpoint hands an API token's whole reach to the agent that holds it, so it is off by default: a panel answers 404 until the MCP server is enabled under Settings -> Security -> API Token (the mcpEnable setting).
This commit is contained in:
Sepehr Radmard
2026-11-25 00:32:22 +03:30
committed by GitHub
parent 3f2a2195a8
commit ac31455d99
45 changed files with 2702 additions and 4 deletions
+2
View File
@@ -39,6 +39,7 @@ export const EXAMPLES: Record<string, unknown> = {
"ldapUserAttr": "",
"ldapUserFilter": "",
"ldapVlessField": "",
"mcpEnable": false,
"networkTrafficInterface": "eth0",
"networkTrafficMode": "legacy",
"nodeDownThreshold": 1,
@@ -250,6 +251,7 @@ export const EXAMPLES: Record<string, unknown> = {
"ldapUserAttr": "",
"ldapUserFilter": "",
"ldapVlessField": "",
"mcpEnable": false,
"networkTrafficInterface": "eth0",
"networkTrafficMode": "legacy",
"nodeDownThreshold": 1,