跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 GitHub,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
通过 GitHub 官方 MCP 服务器,在 Claude、ChatGPT 或 Copilot 中使用 GitHub:读取代码和提交、搜索仓库、分拣 issue、创建和审查 pull request。
试试这样问
GitHub 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → GitHub、粘贴凭证、生成 MCP API key — 完成。无 Docker、无
git clone、无本地服务器。
GitHub + Meta Muse
通过 GitHub 官方 MCP 服务器,在 Claude、ChatGPT 或 Copilot 中使用 GitHub:读取代码和提交、搜索仓库、分拣 issue、创建和审查 pull request。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
GITHUB_PAT
步骤 1 — 获取凭证
AnythingMCP 使用 personal access token 连接 GitHub 官方的远程 MCP 服务器 (https://api.githubcopilot.com/mcp/)。工具由 GitHub 的服务器提供:安装时 AnythingMCP 会读取当前的工具列表,每个工具都带有前缀 github_。GitHub 新增工具后,打开连接器并点击 Discover tools 即可获取。
- 在 GitHub 打开 Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token(直达链接)。选择 resource owner(你的账号或某个组织)、有效期,并在 Only select repositories 中只选 AI 需要访问的仓库。
- 在 Repository permissions 中把 Contents、Issues 和 Pull requests 设为 Read-only;如果 AI 需要创建分支、提交代码或创建 issue 和 pull request,则设为 Read and write。Metadata(只读)会自动加入。要使用
github_get_teams和github_get_team_members,还需添加组织权限 Members: Read-only。 - 如果 owner 是组织,可能需要组织所有者先批准该令牌(组织的 Settings → Personal access tokens → Pending requests)。启用了 SAML 单点登录的组织还需要为 SSO 授权该令牌。
- 把令牌粘贴到
GITHUB_PAT并安装。经典令牌(ghp_…,scoperepo,团队相关再加read:org)也可以用,但它能访问你有权限的所有仓库,所以 fine-grained 令牌更安全。
组织策略:在 Copilot Business 或 Copilot Enterprise 下,组织必须启用 MCP servers in Copilot 策略。组织可以限制 personal access token,使用 Enterprise Managed Users 的企业可能完全禁用了它。对于启用数据驻留的 GitHub Enterprise Cloud,请把连接器的基础 URL 改为 https://copilot-api.<your-subdomain>.ghe.com/mcp。GitHub Enterprise Server 没有托管的 MCP 服务器。
工具集和只读模式:GitHub 默认提供 context、repos、issues、pull_requests 和 users 工具集。要更改,请在连接器编辑器中添加请求头 X-MCP-Toolsets(例如 repos,issues,pull_requests,actions,或 all);添加 X-MCP-Readonly: true 则只公开读取类工具。然后点击 Discover tools。
安装时默认关闭:github_merge_pull_request、github_push_files、github_create_or_update_file 和 github_delete_file。之后通过工具集请求头新增的工具(例如删除仓库)同样默认关闭。你可以在连接器中逐个开启。所有操作都以令牌所有者的身份执行;公开仓库中 issue 和 pull request 的文字属于不可信输入(X-MCP-Lockdown: true 会隐藏没有 push 权限的作者的内容)。
第一次调用:先用 github_get_me 确认令牌属于谁,再使用 github_search_repositories、github_get_file_contents、github_list_issues 和 github_pull_request_read。401 表示令牌错误、过期或已被撤销;403 表示缺少权限、组织审批或 SSO 授权尚未完成,或受策略限制;私有仓库返回 404 通常说明令牌未包含该仓库。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Muse 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Muse 以自定义连接器的形式添加远程 MCP 服务器,并通过 OAuth 登录。
- 在 Muse 中打开 Settings → Connectors,选择 Add custom connector。
- 粘贴 MCP 服务器 URL
https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。 - Muse 会打开 AnythingMCP 的登录页面:登录并批准访问。
- 在聊天中,向 Muse 提出需要用到
GitHub的工具的请求。
你也可以在聊天中完成设置,适用于网页版、iOS 和 Android 应用以及 WhatsApp。给 Muse 发送这条消息:
Create a Custom Connector for a new remote MCP server, then connect to it:
Name: AnythingMCP
Transport: remote streamable HTTP
URL: https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID
Auth: OAuth
自托管?请用你实例的公网 HTTPS 地址替换 https://cloud.anythingmcp.com。Muse 从 Meta 的云端连接,因此 localhost 无法使用。
可用工具
| Tool | What it does |
|---|---|
github_add_comment_to_pending_review | Add review comment to the requester's latest pending pull request review |
github_add_issue_comment | Add a comment and/or reaction to a specific issue or issue comment in a GitHub repository |
github_add_reply_to_pull_request_comment | Add a reply and/or reaction to an existing pull request comment |
github_create_branch | Create a new branch in a GitHub repository, starting from from_branch or, when it is omitted, from the repository's default branch |
github_create_or_update_file | Create or update a single file in a GitHub repository |
github_create_pull_request | Create a new pull request in a GitHub repository from the head branch into the base branch, optionally as a draft and with reviewers… |
github_create_repository | Create a new GitHub repository in your account or specified organization |
github_delete_file | Delete a file from a GitHub repository by committing its removal to the given branch with a commit message |
github_fork_repository | Fork a GitHub repository to your account or specified organization |
github_get_commit | Get details for a commit from a GitHub repository: message, author and, depending on detail, the stats or the full patch of the changed… |
github_get_file_contents | Get the contents of a file or directory from a GitHub repository |
github_get_label | Get a specific label from a repository by its name, with its color and description |
github_get_latest_release | Get the latest release in a GitHub repository, with its tag, name, release notes and assets |
github_get_me | Get details of the authenticated GitHub user |
github_get_release_by_tag | Get a specific release by its tag name in a GitHub repository |
github_get_tag | Get details about a specific git tag in a GitHub repository, including the object the tag points to |
github_get_team_members | Get member usernames of a specific team in an organization |
github_get_teams | Get details of the teams the user is a member of |
github_issue_read | Get information about a specific issue in a GitHub repository |
github_issue_write | Create a new or update an existing issue in a GitHub repository |
github_list_branches | List branches in a GitHub repository with the commit each one points to; paginated with page and perPage |
github_list_commits | Get list of commits of a branch in a GitHub repository |
github_list_issue_fields | List issue fields for a repository or organization |
github_list_issue_types | List supported issue types for a repository or its owner organization |
github_list_issues | List issues in a GitHub repository |
github_list_pull_requests | List pull requests in a GitHub repository |
github_list_releases | List releases in a GitHub repository with their tags, names and release notes; paginated with page and perPage |
github_list_repository_collaborators | List collaborators of a GitHub repository |
github_list_tags | List git tags in a GitHub repository with the commit each tag points to; paginated with page and perPage |
github_merge_pull_request | Merge a pull request in a GitHub repository with the merge, squash or rebase method, optionally only while its head is still expectedHeadSha |
(showing 30 of 46 tools — install the connector to see them all)
FAQ
Muse 在哪些地区可用? Meta 目前在美国和加拿大提供 Muse,可在网页版、iOS 和 Android 应用以及 WhatsApp 中使用。
Meta 会审核这个连接器吗? 不会。Meta 不审核自定义连接器。Muse 只能看到你在 AnythingMCP 中为此 MCP 服务器启用的工具,你也可以随时在 Settings → Connectors 中断开它。
下一步
这份指南对你有帮助吗?