File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,6 @@ def create_mcp_tools_from_openapi(
8383 if not operation_id :
8484 continue
8585
86- # Skip MCP's internal tool that doesn't follow the same patterns
87- if operation_id == "handle_mcp_connection_mcp_get" :
88- continue
89-
9086 # Create MCP tool for this operation
9187 create_http_tool (
9288 mcp_server = mcp_server ,
Original file line number Diff line number Diff line change @@ -87,10 +87,6 @@ async def handle_mcp_connection(request: Request):
8787 mcp_server ._mcp_server .create_initialization_options (),
8888 )
8989
90- # Mount the MCP connection handler
91- app .get (mount_path )(handle_mcp_connection )
92- app .mount (f"{ mount_path } /messages/" , app = sse_transport .handle_post_message )
93-
9490 # Serve tools from the FastAPI app if requested
9591 if serve_tools :
9692 create_mcp_tools_from_openapi (
@@ -100,6 +96,11 @@ async def handle_mcp_connection(request: Request):
10096 describe_all_responses = describe_all_responses ,
10197 describe_full_response_schema = describe_full_response_schema ,
10298 )
99+
100+ # Mount the MCP connection handler
101+ app .get (mount_path )(handle_mcp_connection )
102+ app .mount (f"{ mount_path } /messages/" , app = sse_transport .handle_post_message )
103+
103104
104105
105106def add_mcp_server (
You can’t perform that action at this time.
0 commit comments