14 lines
292 B
Python
14 lines
292 B
Python
import uvicorn
|
|
from fastapi import FastAPI
|
|
from fastmcp import FastMCP
|
|
|
|
mcp = FastMCP("Scratch")
|
|
@mcp.tool()
|
|
def test_tool() -> str:
|
|
return "test"
|
|
|
|
app = FastAPI()
|
|
app.mount("/", mcp.http_app(transport="sse"))
|
|
|
|
if __name__ == "__main__":
|
|
uvicorn.run(app, host="127.0.0.1", port=9001)
|