G

GitHub趋势MCP

@hetaoBackend/mcp-github-trending
Hosted
8 Stars 2.2k 次浏览 hetaoBackend 更新于 2026-08-23

一个MCP服务器,通过简单的API接口提供对GitHub热门仓库和开发者数据的访问。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "mcp-github-trending": {
      "args": [
        "mcp-github-trending"
      ],
      "command": "uvx"
    }
  }
}

该服务需要配置环境变量:UV_PUBLISH_PASSWORD、UV_PUBLISH_TOKEN、UV_PUBLISH_USERNAME

可用工具 (2 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

get_github_trending_repositories 3 个参数

Get trending repositories on github

该工具无需必填参数,直接调用即可

get_github_trending_developers 3 个参数

Get trending developers on github

该工具无需必填参数,直接调用即可

服务介绍

mcp-github-trending MCP Server

一个通过简单API接口提供GitHub热门仓库和开发者数据的MCP服务器。

smithery badge

功能

  • 访问GitHub热门仓库和开发者数据
  • 按编程语言筛选
  • 按时间周期(每日、每周、每月)筛选
  • 按自然语言筛选
  • 返回格式良好的JSON响应

工具

该服务器实现了以下工具:

从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"
    }
  }
]

安装

前提条件

  • Python 3.12

安装步骤

安装包:

pip install mcp-github-trending

Claude Desktop 配置

在MacOS上:

~/Library/Application\ Support/Claude/claude_desktop_config.json

在Windows上:

%APPDATA%/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "mcp-github-trending": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-github-trending",
        "run",
        "mcp-github-trending"
      ]
    }
  }
}
{
  "mcpServers": {
    "mcp-github-trending": {
      "command": "uvx",
      "args": [
        "mcp-github-trending"
      ]
    }
  }
}

开发

构建和发布

  1. 同步依赖并更新锁文件:
uv sync
  1. 构建包分发:
uv build
  1. 发布到PyPI:
uv publish

注意:通过环境变量或命令标志设置PyPI凭据:

  • Token: --tokenUV_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,您可以在浏览器中访问它以开始调试。

许可证

本项目根据MIT许可证许可 - 详情请参阅LICENSE文件。

相关 MCP 服务