tianruci commited on
Commit
2ca81a5
·
verified ·
1 Parent(s): d9dd395

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -93,11 +93,8 @@ async def fetch_github_trending() -> List[Dict]:
93
  detail="Failed to fetch trending repositories"
94
  )
95
 
96
- # 初始化 MCP 服务器
97
- mcp_server = FastMCP(
98
- name="GitHubTrendingAPI",
99
- description="Access GitHub trending repositories"
100
- )
101
 
102
  @mcp_server.tool()
103
  async def get_trending_repos(num: int = 10) -> dict:
@@ -147,7 +144,7 @@ async def stream_trending(interval: int = 60, client_id: str = None):
147
 
148
  data = {
149
  "trending": cached_trending[:10],
150
- "last_updated": last_updated.isoformat(),
151
  "client_id": client_id,
152
  "next_update": (datetime.now() + timedelta(seconds=interval)).isoformat()
153
  }
 
93
  detail="Failed to fetch trending repositories"
94
  )
95
 
96
+ # 初始化 MCP 服务器 - 移除了 description 参数
97
+ mcp_server = FastMCP(name="GitHubTrendingAPI")
 
 
 
98
 
99
  @mcp_server.tool()
100
  async def get_trending_repos(num: int = 10) -> dict:
 
144
 
145
  data = {
146
  "trending": cached_trending[:10],
147
+ "last_updated": last_updated.isoformat() if last_updated else None,
148
  "client_id": client_id,
149
  "next_update": (datetime.now() + timedelta(seconds=interval)).isoformat()
150
  }