github-repo-manager-mcp

github-repo-manager-mcp

This MCP server lets an AI client manage GitHub repositories through the GitHub REST and GraphQL APIs, enabling repository CRUD, topic/label management, and file operations.

Category
访问服务器

README

GitHub Repo Manager MCP

This MCP server lets an AI client manage GitHub repositories through the GitHub REST and GraphQL APIs.

What This MCP Tool Can Do

  • Create new repositories
  • Update repo details, including description, homepage, topics/tags, and visibility
  • Delete repositories
  • Add topics/labels to repos for organization
  • List all repos with filters
  • Rename repositories
  • Archive old repos
  • Pin repositories via the GitHub GraphQL API
  • Read file contents from repositories
  • Create or update files in repositories, such as README.md

Security Note

Never hard-code a GitHub token in source files. Set it as an environment variable named GITHUB_TOKEN.

If you pasted a real token into chat or committed it anywhere, revoke it in GitHub and create a new token.

Setup

npm install

Create a .env file in this project folder:

GITHUB_TOKEN=github_pat_your_token_here

The token needs permissions for the operations you want to use. For fine-grained personal access tokens, grant repository administration, contents, and metadata access for the target repositories.

Classic PAT notes:

  • Deleting repositories requires the delete_repo scope.
  • Updating repository files requires repo contents write access.
  • Pinning repositories uses GitHub GraphQL addPinnedItem; use a token that can access the target repository and update the authenticated user's pinned items.

Run

npm start

Install From npm

After this package is published, users can run it without cloning the repo:

npx github-repo-manager-mcp

Or install it globally:

npm install -g github-repo-manager-mcp
github-repo-manager-mcp

Set GITHUB_TOKEN in your MCP client environment. If you clone this repository locally, the server can also load GITHUB_TOKEN from a .env file in the project folder.

MCP Client Config

Example client config using npx:

{
  "mcpServers": {
    "github-repo-manager": {
      "command": "npx",
      "args": ["-y", "github-repo-manager-mcp"],
      "env": {
        "GITHUB_TOKEN": "github_pat_your_token_here"
      }
    }
  }
}

Example local development config:

{
  "mcpServers": {
    "github-repo-manager": {
      "command": "C:/PROGRA~1/nodejs/node.exe",
      "args": ["C:/Users/msaad/OneDrive/Documents/github_organized/src/server.js"],
      "env": {
        "GITHUB_TOKEN": "github_pat_your_token_here"
      }
    }
  }
}

The server also loads GITHUB_TOKEN from the local .env file automatically, so the env block is optional if .env is present.

Publish to npm

Before publishing, make sure you are logged in:

npm login

Then publish:

npm publish --access public

The package publishes only src, README.md, LICENSE, and run-mcp.cmd.

MCP Inspector on Windows

Use these settings in MCP Inspector:

Transport Type

STDIO

Command

C:\PROGRA~1\nodejs\node.exe

Arguments

C:/Users/msaad/OneDrive/Documents/github_organized/src/server.js

Use the short Node path to avoid the space in Program Files. Use forward slashes in the server path because MCP Inspector can strip backslashes from Windows paths in the Arguments field.

Available Tools

  • create_repository: Create a repository for the authenticated user or an organization. Supports description, homepage, privacy, auto-init, .gitignore, license, and topics.
  • update_repository: Update description, homepage, visibility/privacy, feature flags, default branch, archived state, and topics.
  • delete_repository: Delete a repository. Requires confirm=true.
  • add_repository_topics: Add topics without removing existing topics.
  • add_repository_labels: Create labels, or update existing labels if they already exist.
  • list_repositories: List repositories visible to the authenticated user, an owner, or an organization with filters for visibility, archived state, topic, name, sort, and direction.
  • rename_repository: Rename a repository.
  • archive_repository: Archive a repository.
  • pin_repository: Pin a repository to the authenticated user's GitHub profile via GraphQL.
  • get_file_content: Read a file from a repository, defaulting to README.md.
  • update_file_content: Create or update a file in a repository, defaulting to README.md; it auto-fetches the current SHA when updating an existing file.

Tool Inputs

Most tools accept an optional owner. If omitted, the server uses the authenticated GitHub user's login.

get_file_content inputs:

{
  "owner": "optional-owner",
  "repo": "repo-name",
  "path": "README.md",
  "branch": "optional-branch"
}

update_file_content inputs:

{
  "owner": "optional-owner",
  "repo": "repo-name",
  "path": "README.md",
  "content": "# New content",
  "message": "Update README via MCP",
  "branch": "optional-branch"
}

To update an existing file, sha is optional because the server attempts to fetch it automatically.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选