mirror of
https://github.com/Sun-ZhenXing/mcp-template-python.git
synced 2026-02-04 10:13:31 +00:00
chore: update deps
This commit is contained in:
@@ -2,7 +2,7 @@ from operator import add, mul, sub, truediv
|
||||
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
from ..config import settings
|
||||
from mcp_template_python.config import settings
|
||||
|
||||
mcp = FastMCP("math", instructions=settings.instructions)
|
||||
|
||||
|
||||
@@ -40,9 +40,6 @@ class Settings(BaseSettings):
|
||||
enable_streamable_http: bool = True
|
||||
"""Enable streamable HTTP for the MCP server."""
|
||||
|
||||
enable_websocket: bool = False
|
||||
"""Enable WebSocket for the MCP server."""
|
||||
|
||||
websocket_path: str = "/ws"
|
||||
"""Path for the WebSocket endpoint."""
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
from ..app import MCP_MAP
|
||||
from ..models.helpers import ArgumentsRequest
|
||||
from mcp_template_python.app import MCP_MAP
|
||||
from mcp_template_python.models.helpers import ArgumentsRequest
|
||||
|
||||
router = APIRouter(prefix="/v1", tags=["helpers"])
|
||||
|
||||
|
||||
@@ -49,7 +49,3 @@ for name, mcp in MCP_MAP.items():
|
||||
app.mount(f"/{name}/compatible", mcp.sse_app())
|
||||
if settings.enable_streamable_http:
|
||||
app.mount(f"/{name}", mcp.streamable_http_app())
|
||||
if settings.enable_websocket:
|
||||
raise NotImplementedError(
|
||||
"To use WebSocket, you need to switch to the `feat-ws` branch."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user