Fix: MCP list_mcp_tools + config Routes auf Bearer-Auth umstellen
Check Cross-Plugin Imports / check (push) Has been cancelled

This commit is contained in:
Agent Zero
2026-08-03 14:12:44 +02:00
parent 4efdc8e036
commit ff975ca0a6
+10 -4
View File
@@ -44,9 +44,12 @@ async def _get_mcp_context(
@router.get("/tools", response_model=McpToolListResponse)
async def list_mcp_tools(
current_user: dict[str, Any] = Depends(require_permission("mcp:read")),
current_user: dict[str, Any] = Depends(get_current_user_or_bearer),
) -> McpToolListResponse:
"""List all available MCP tools with their schemas."""
"""List all available MCP tools with their schemas.
Accepts session cookie OR Bearer token.
"""
return McpToolListResponse(
tools=TOOL_DEFINITIONS,
count=len(TOOL_DEFINITIONS),
@@ -132,9 +135,12 @@ async def execute_mcp_tool(
@router.get("/config", response_model=McpServerConfig)
async def get_mcp_config(
current_user: dict[str, Any] = Depends(require_permission("mcp:read")),
current_user: dict[str, Any] = Depends(get_current_user_or_bearer),
) -> McpServerConfig:
"""Get MCP server configuration for external clients."""
"""Get MCP server configuration for external clients.
Accepts session cookie OR Bearer token.
"""
return McpServerConfig(
server_name="LeoCRM",
server_version="1.0.0",