tianruci commited on
Commit
5628e2c
·
verified ·
1 Parent(s): 794a4b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -61,6 +61,7 @@ async def fetch_github_trending():
61
 
62
  # 定义MCP服务器和工具
63
  mcp_server = FastMCP(name="GithubTrending", stateless_http=True)
 
64
 
65
  @mcp_server.tool()
66
  def get_trending_repos(num: int = 10) -> dict:
@@ -69,8 +70,7 @@ def get_trending_repos(num: int = 10) -> dict:
69
  fetch_github_trending()
70
  return {"trending": cached_trending[:num]}
71
 
72
- #app.mount("/mcp", mcp_server.http_app())
73
- app.mount("/mcp", mcp_server.streamable_http_app())
74
 
75
  async def trending_generator():
76
  """SSE 事件生成器"""
 
61
 
62
  # 定义MCP服务器和工具
63
  mcp_server = FastMCP(name="GithubTrending", stateless_http=True)
64
+ app.mount("/mcp", mcp_server.http_app())
65
 
66
  @mcp_server.tool()
67
  def get_trending_repos(num: int = 10) -> dict:
 
70
  fetch_github_trending()
71
  return {"trending": cached_trending[:num]}
72
 
73
+ #app.mount("/mcp", mcp_server.streamable_http_app())
 
74
 
75
  async def trending_generator():
76
  """SSE 事件生成器"""