This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |