jackkuo commited on
Commit
fbee949
·
verified ·
1 Parent(s): fb66aaf

Create server.py

Browse files
Files changed (1) hide show
  1. server.py +11 -0
server.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+
3
+ app = FastAPI()
4
+
5
+ @app.get("/ping")
6
+ def ping():
7
+ return {"msg": "MCP server running on Hugging Face Space!"}
8
+
9
+ @app.post("/tools/add")
10
+ def add(a: int, b: int):
11
+ return {"result": a + b}