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(
83
83
if not operation_id :
84
84
continue
85
85
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
-
90
86
# Create MCP tool for this operation
91
87
create_http_tool (
92
88
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):
87
87
mcp_server ._mcp_server .create_initialization_options (),
88
88
)
89
89
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
-
94
90
# Serve tools from the FastAPI app if requested
95
91
if serve_tools :
96
92
create_mcp_tools_from_openapi (
@@ -100,6 +96,11 @@ async def handle_mcp_connection(request: Request):
100
96
describe_all_responses = describe_all_responses ,
101
97
describe_full_response_schema = describe_full_response_schema ,
102
98
)
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
+
103
104
104
105
105
106
def add_mcp_server (
You can’t perform that action at this time.
0 commit comments