malek-messaoudii commited on
Commit
f186b6f
·
1 Parent(s): 3677973

Update mcp_service.py

Browse files
Files changed (1) hide show
  1. services/mcp_service.py +2 -2
services/mcp_service.py CHANGED
@@ -132,8 +132,8 @@ def init_mcp_server(app: FastAPI) -> None: # Retiré les quotes : FastAPI est m
132
  # Monter l'app MCP sur FastAPI (via Starlette Mount, compatible FastAPI)
133
  from starlette.routing import Mount
134
 
135
- # Créer l'app MCP streamable
136
- mcp_app = mcp_server.streamable_http_app(streamable_http_path="/mcp") # Chemin racine /mcp
137
 
138
  # Monter directement sur l'app FastAPI (app.mount pour sub-app)
139
  app.mount("/api/v1/mcp", mcp_app) # Monte à /api/v1/mcp - gère /tools, /call, etc.
 
132
  # Monter l'app MCP sur FastAPI (via Starlette Mount, compatible FastAPI)
133
  from starlette.routing import Mount
134
 
135
+ # Créer l'app MCP streamable (CORRIGÉ : Sans l'argument streamable_http_path invalide)
136
+ mcp_app = mcp_server.streamable_http_app() # Pas de paramètre supplémentaire - le mounting gère le path
137
 
138
  # Monter directement sur l'app FastAPI (app.mount pour sub-app)
139
  app.mount("/api/v1/mcp", mcp_app) # Monte à /api/v1/mcp - gère /tools, /call, etc.