一个通过简单API接口提供访问GitHub热门仓库和开发者数据的MCP服务器。
该服务器实现了以下工具:
从GitHub获取热门仓库,参数如下:
language(可选):用于筛选仓库的编程语言(例如:"python","javascript")since(可选):用于筛选仓库的时间段("daily","weekly","monthly")。默认为"daily"spoken_language(可选):用于筛选仓库的口语语言示例响应:
[
{
"name": "repository-name",
"fullname": "owner/repository-name",
"url": "https://github.com/owner/repository-name",
"description": "Repository description",
"language": "Python",
"stars": 1000,
"forks": 100,
"current_period_stars": 50
}
]
从GitHub获取热门开发者,参数如下:
language(可选):用于筛选的编程语言(例如:"python","javascript")since(可选):用于筛选的时间段("daily","weekly","monthly")。默认为"daily"示例响应:
[
{
"username": "developer",
"name": "Developer Name",
"url": "https://github.com/developer",
"avatar": "https://avatars.githubusercontent.com/u/123456",
"repo": {
"name": "repository-name",
"description": "Repository description",
"url": "https://github.com/developer/repository-name"
}
}
]
安装包:
pip install mcp-github-trending
在MacOS上:
~/Library/Application\ Support/Claude/claude_desktop_config.json
在Windows上:
%APPDATA%/Claude/claude_desktop_config.json
<details>
<summary>开发/未发布服务器配置</summary>
{
"mcpServers": {
"mcp-github-trending": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-github-trending",
"run",
"mcp-github-trending"
]
}
}
}
</details>
<details>
<summary>已发布服务器配置</summary>
{
"mcpServers": {
"mcp-github-trending": {
"command": "uvx",
"args": [
"mcp-github-trending"
]
}
}
}
</details>
uv sync
uv build
uv publish
注意:通过环境变量或命令标志设置PyPI凭证:
--token 或 UV_PUBLISH_TOKEN--username/UV_PUBLISH_USERNAME 和 --password/UV_PUBLISH_PASSWORD为了获得最佳调试体验,请使用MCP Inspector。
通过npm启动MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-github-trending run mcp-github-trending
Inspector会显示一个URL,您可以在浏览器中访问该URL开始调试。
本项目根据MIT许可证授权 - 查看LICENSE文件以获取详细信息。 </中文翻译>