File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1616
1717load_dotenv ()
1818
19- mcp = FastMCP ("SerpApi MCP Server" , stateless_http = True , json_response = True )
19+ mcp = FastMCP ("SerpApi MCP Server" )
2020logger = logging .getLogger (__name__ )
2121
2222
@@ -210,14 +210,16 @@ def main():
210210 allow_headers = ["*" ],
211211 ),
212212 ]
213- starlette_app = mcp .http_app (middleware = middleware )
213+ starlette_app = mcp .http_app (
214+ middleware = middleware , stateless_http = True , json_response = True
215+ )
214216
215217 starlette_app .add_route ("/healthcheck" , healthcheck_handler , methods = ["GET" ])
216218
217219 host = os .getenv ("MCP_HOST" , "0.0.0.0" )
218220 port = int (os .getenv ("MCP_PORT" , "8000" ))
219221
220- uvicorn .run (starlette_app , host = host , port = port )
222+ uvicorn .run (starlette_app , host = host , port = port , ws = "none" )
221223
222224
223225if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments