Spaces:
Sleeping
Sleeping
import os | |
import uvicorn | |
from fastapi import FastAPI | |
# Import the FastMCP instances from numpy_server and scipy_server | |
from numpy_server import mcp as numpy_mcp | |
from scipy_server import mcp as scipy_mcp | |
# Main FastAPI instance | |
app = FastAPI() | |
# Mount the sub-applications on different paths | |
app.mount("/numpy", numpy_mcp.app) | |
app.mount("/scipy", scipy_mcp.app) | |
if __name__ == "__main__": | |
port = int(os.environ.get("PORT", 7860)) | |
uvicorn.run("main:app", host="0.0.0.0", port=port, reload=True) |