-
Notifications
You must be signed in to change notification settings - Fork 243
Description
🐞 Bug Summary
Tool validation fails when registering GitHub MCP Server due to overly strict description validation that rejects legitimate words. As a result, the entire Gateway Registration fails.
🧩 Affected Component
Select the area of the project impacted:
-
mcpgateway
- API -
mcpgateway
- UI (admin panel)
🔁 Steps to Reproduce
- Set up MCP Context Forge Gateway locally with authentication and Admin UI enabled
- Attempt to register GitHub MCP Server using the Admin UI or API:
url: https://api.githubcopilot.com/mcp/
transport: STREAMABLEHTTP
auth_type: bearer
auth_token: GitHub Personal access Token - Gateway successfully connects to the MCP server but fails during tool validation phase
- Registration fails with HTTP 502 Bad Gateway error
🤔 Expected Behavior
The gateway should successfully register the GitHub MCP Server and import all valid tools, allowing legitimate words in tool descriptions.
📓 Logs / Error Output
(some logs were generated by adding additional print/log statement)
ERROR [mcpgateway.services.gateway_service] GatewayConnectionError in group: (GatewayConnectionError('Failed to initialize gateway at https://api.githubcopilot.com/mcp/: unhandled errors in a TaskGroup (1 sub-exception)'),)
INFO: 127.0.0.1:38564 - "POST /admin/gateways HTTP/1.1" 502 Bad Gateway
StreamableHTTP server tool validation error on tool 1: get_workflow_run_logs: 1 validation error for ToolCreate
description
Value error, Description contains script patterns that may cause display issues [type=value_error, input_value='Download logs for a spec... debugging failed jobs)', input_type=str]
For further information visit https://errors.pydantic.dev/2.11/v/value_error
Tool description: Download logs for a specific workflow run (EXPENSIVE: downloads ALL logs as ZIP. Consider using get_job_logs with failed_only=true for debugging failed jobs)
🧠 Environment Info
You can retrieve most of this from the /version
endpoint.
Version or commit: main branch
Runtime: Python 3.12, Uvicorn dev server
Platform / OS: Linux
Container: none
🧩 Additional Context (optional)
Workaround: Temporarily modify the validation to skip tools with validation errors rather than failing the entire gateway registration.