mirror of
https://github.com/Sun-ZhenXing/mcp-template-python.git
synced 2026-02-04 10:13:31 +00:00
feat: use click
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import contextlib
|
||||
|
||||
from fastapi import FastAPI
|
||||
from fastapi import FastAPI, Response
|
||||
|
||||
from .__about__ import __version__
|
||||
from .app import MCP_MAP
|
||||
@@ -27,10 +27,7 @@ app = FastAPI(
|
||||
@app.get("/")
|
||||
async def root():
|
||||
"""Root endpoint."""
|
||||
return {
|
||||
"message": "Welcome!",
|
||||
"tools": list(MCP_MAP.keys()),
|
||||
}
|
||||
return Response("<script>location.href='/docs'</script>")
|
||||
|
||||
|
||||
@app.get("/health")
|
||||
|
||||
Reference in New Issue
Block a user