Skip to content

Instantly share code, notes, and snippets.

View zekka-lotushealth's full-sized avatar

Zekka zekka-lotushealth

View GitHub Profile
@zekka-lotushealth
zekka-lotushealth / server.py
Last active August 17, 2025 03:26
fastapi_mcp -- multiserver support
from contextlib import asynccontextmanager
import json
import traceback
from urllib.parse import quote
import anyio
import httpx
from typing import AsyncGenerator, Dict, Optional, Any, List, Union
from fastapi import FastAPI, Request, APIRouter
from fastapi.openapi.utils import get_openapi
from mcp import ErrorData, JSONRPCError, JSONRPCRequest