Skip to main content
Glama

github-mcp

一个极简的自托管 MCP 服务器,将 GitHub 写入权限以工具形式暴露出来,让已连接的 Claude 账号无需每次人工手动执行 git push 即可推送代码。

功能

工具

功能说明

get_repo

获取默认分支、私有标志、最近推送时间

list_branches

列出分支

list_directory

列出指定路径下的文件/文件夹

get_file

获取文件解码后的内容 + blob sha

commit_files

在单个提交中原子化地创建/更新一个或多个文件(Git Data API:blobs → tree → commit → ref update)—— 用它一次性推送整个文件夹

Related MCP server: GitHub MCP Server

安全 — 部署前请阅读

GITHUB_TOKEN 必须作为环境变量,直接写入 Docker 仪表盘(或 Render)的环境变量 UI 中——绝不要粘贴到与 AI 助手的对话中,绝不要提交到本仓库,绝不要作为工具参数传递。服务器只会从 process.env 中读取它。如果某个 token 曾被粘贴到对话中,请把它视为已泄露并立即撤销——直接在仪表盘中生成一个新的并设置好。

建议的 token 范围:细粒度 PAT,Contents: Read & write,且限定在需要使用的具体仓库。避免使用 classic / 全仓库 token。

环境变量

  • GITHUB_TOKEN — 细粒度 PAT,Contents: Read & write,限定于目标仓库

  • PORT — 默认 8080

本地运行

npm install
npm start
curl localhost:8080/api/health

部署

将此仓库推送到 GitHub(第一次推送必须手动完成——这是自举问题,本服务器无法把自己推送到克 MS),然后:

Manufact:deploy  (point at the repo)

Manufact 会自动根据 Dockerfile 构建。部署后在 Manufact 的环境变量 UI 中设置 GITHUB_TOKEN,然后重新生成服务。

将 Claude 账号连接到本服务器

添加一个自定义连接器,指向 https://<your-manufact-domain>/mcp

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Connects Claude Desktop to GitHub repositories, enabling users to perform git operations and GitHub API interactions through natural conversation.
    452
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Connects Claude Desktop directly to GitHub repositories and git commands, enabling users to clone repos, check status, commit changes, push code, create repositories, and manage GitHub resources through natural conversation.
    452
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables to interact with GitHub repositories directly from Claude, supporting actions like viewing repos, checking status, committing and pushing changes, and managing pull requests.

View all related MCP servers

Related MCP Connectors

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

  • Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…

  • AI code review for GitHub PRs with an MCP autofix loop for Claude Code and Cursor

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jayhunsu-ai/github-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server