Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -96,4 +96,15 @@ async def root():
|
|
| 96 |
async def get_trending(num: int = 10):
|
| 97 |
if not cached_trending:
|
| 98 |
await fetch_github_trending()
|
| 99 |
-
return {"trending": cached_trending[:num]}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
async def get_trending(num: int = 10):
|
| 97 |
if not cached_trending:
|
| 98 |
await fetch_github_trending()
|
| 99 |
+
return {"trending": cached_trending[:num]}
|
| 100 |
+
|
| 101 |
+
# 在app.py中添加
|
| 102 |
+
@app.get("/mcp/")
|
| 103 |
+
async def mcp_root():
|
| 104 |
+
return {
|
| 105 |
+
"message": "MCP API root",
|
| 106 |
+
"endpoints": {
|
| 107 |
+
"tools": "/mcp/tool",
|
| 108 |
+
"schema": "/mcp/schema"
|
| 109 |
+
}
|
| 110 |
+
}
|