名称: github-search 描述: 通过MCP搜索GitHub代码、仓库、问题和拉取请求 允许工具: [Bash, Read]
GitHub搜索技能
何时使用
- 跨仓库搜索代码
- 查找问题或拉取请求
- 查看仓库信息
指令
uv run python -m runtime.harness scripts/mcp/github_search.py \
--type "code" \
--query "your search query"
参数
--type: 搜索类型 -code,repos,issues,prs--query: 搜索查询(支持GitHub搜索语法)--owner: (可选)按仓库所有者过滤--repo: (可选)按仓库名称过滤
示例
# 搜索代码
uv run python -m runtime.harness scripts/mcp/github_search.py \
--type "code" \
--query "authentication language:python"
# 搜索问题
uv run python -m runtime.harness scripts/mcp/github_search.py \
--type "issues" \
--query "bug label:critical" \
--owner "anthropics"
所需MCP服务器
需要在mcp_config.json中配置github服务器,并提供GITHUB_PERSONAL_ACCESS_TOKEN。