Jofthomas commited on
Commit
378930b
·
verified ·
1 Parent(s): a26d1ad

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +6 -6
server.py CHANGED
@@ -3,8 +3,8 @@ from fastapi import FastAPI, Request
3
  from fastapi.responses import HTMLResponse, FileResponse
4
  from fastapi.staticfiles import StaticFiles
5
  from fastapi.templating import Jinja2Templates
6
- from echo_server import mcp as echo_mcp
7
- from math_server import mcp as math_mcp
8
  import os
9
 
10
 
@@ -12,8 +12,8 @@ import os
12
  @contextlib.asynccontextmanager
13
  async def lifespan(app: FastAPI):
14
  async with contextlib.AsyncExitStack() as stack:
15
- await stack.enter_async_context(echo_mcp.session_manager.run())
16
- await stack.enter_async_context(math_mcp.session_manager.run())
17
  yield
18
 
19
 
@@ -39,8 +39,8 @@ async def index(request: Request):
39
  return templates.TemplateResponse("index.html", {"request": request, "base_url": base_url})
40
 
41
 
42
- app.mount("/echo", echo_mcp.streamable_http_app())
43
- app.mount("/math", math_mcp.streamable_http_app())
44
 
45
  PORT = int(os.environ.get("PORT", "10000"))
46
 
 
3
  from fastapi.responses import HTMLResponse, FileResponse
4
  from fastapi.staticfiles import StaticFiles
5
  from fastapi.templating import Jinja2Templates
6
+ from pokemon.pokemon_server import mcp as pokemon_mcp
7
+ from geogussr_server import mcp as geogussr_mcp
8
  import os
9
 
10
 
 
12
  @contextlib.asynccontextmanager
13
  async def lifespan(app: FastAPI):
14
  async with contextlib.AsyncExitStack() as stack:
15
+ await stack.enter_async_context(pokemon_mcp.session_manager.run())
16
+ await stack.enter_async_context(geogussr_mcp.session_manager.run())
17
  yield
18
 
19
 
 
39
  return templates.TemplateResponse("index.html", {"request": request, "base_url": base_url})
40
 
41
 
42
+ app.mount("/geoguessr", geogussr_mcp.streamable_http_app())
43
+ app.mount("/Pokemon", pokemon_mcp.streamable_http_app())
44
 
45
  PORT = int(os.environ.get("PORT", "10000"))
46