Files
mirror-3x-ui/docs/content/docs/en/reference/api/mcp.mdx
T
Sepehr Radmard ac31455d99 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).
2026-11-25 00:32:22 +03:30

39 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: MCP
description: Model Context Protocol endpoint for AI agents (Claude, Cursor, VS
Code). Point an MCP client at this URL with an admin Bearer token; restricted
token scopes are refused.
full: true
_openapi:
preload:
- ./public/openapi.json
toc:
- depth: 2
title: 'Stateless streamable-HTTP MCP endpoint (JSON-RPC 2.0). Exposes panel
tools for inbounds, clients, server, Xray, nodes, hosts and settings;
each tool call runs the matching /panel/api route with the caller’s
credentials. Off by default: answers 404 until the MCP server is enabled
under Settings → Security → API Token.'
url: '#stateless-streamable-http-mcp-endpoint-json-rpc-20-exposes-panel-tools-for-inbounds-clients-server-xray-nodes-hosts-and-settings-each-tool-call-runs-the-matching-panelapi-route-with-the-callers-credentials-off-by-default-answers-404-until-the-mcp-server-is-enabled-under-settings--security--api-token'
structuredData:
headings:
- content: 'Stateless streamable-HTTP MCP endpoint (JSON-RPC 2.0). Exposes panel
tools for inbounds, clients, server, Xray, nodes, hosts and settings;
each tool call runs the matching /panel/api route with the caller’s
credentials. Off by default: answers 404 until the MCP server is
enabled under Settings → Security → API Token.'
id: stateless-streamable-http-mcp-endpoint-json-rpc-20-exposes-panel-tools-for-inbounds-clients-server-xray-nodes-hosts-and-settings-each-tool-call-runs-the-matching-panelapi-route-with-the-callers-credentials-off-by-default-answers-404-until-the-mcp-server-is-enabled-under-settings--security--api-token
contents: []
---
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
export default function Layout(props) {
const { OpenAPIPage } = props.components ?? {};
return (
<>
{props.children}
<OpenAPIPage document="./public/openapi.json" webhooks={[]} operations={[{"path":"/panel/api/mcp","method":"post"}]} showTitle />
</>
);
}