Cover image
Try Now
2025-01-19

具有增强文件管理功能的GitHub MCP服务器

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

GitHub MCP Server

A Model Context Protocol (MCP) server providing GitHub integration capabilities. This server enables interaction with GitHub repositories through MCP tools, supporting operations like repository management, file operations, and commit handling.

Features

  • Account management and authentication
  • Repository creation and management
  • File operations (read, write, push, pull)
  • Commit operations
  • Directory synchronization
  • Repository comparison and diffing

Installation

ash npm install @modelcontextprotocol/server-github

Configuration

Add the server to your MCP settings file (cline_mcp_settings.json):

json { "mcpServers": { "github": { "command": "node", "args": ["/path/to/github-mcp-server/dist/index.js"], "env": { "GITHUB_TOKEN_1": "your-github-token", "GITHUB_OWNER_1": "your-github-username" }, "disabled": false, "alwaysAllow": [] } } }

Available Tools

Account Management

list_accounts

List available GitHub accounts configured in the server.

select_account

Select a GitHub account to use for subsequent operations.

Repository Management

create_repository

Create a new GitHub repository.

ypescript { owner?: string; // Repository owner (optional if account selected) name: string; // Repository name description: string; // Repository description private?: boolean; // Whether repository is private }

clone_repository

Clone a GitHub repository to a local directory.

ypescript { owner?: string; // Repository owner repo: string; // Repository name branch?: string; // Branch name (default: main) outputDir: string; // Local directory to clone into }

rename_repository

Rename an existing GitHub repository.

ypescript { owner?: string; // Repository owner repo: string; // Current repository name new_name: string; // New repository name }

File Operations

push_file

Push a file to a GitHub repository.

ypescript { owner?: string; // Repository owner repo: string; // Repository name path: string; // Target path in repository message: string; // Commit message sourcePath: string; // Local file to push }

pull_file

Pull a file from a GitHub repository.

ypescript { owner?: string; // Repository owner repo: string; // Repository name path: string; // File path in repository outputPath: string; // Local path to save file }

sync_directory

Two-way sync between local and remote directories.

ypescript { owner?: string; // Repository owner repo: string; // Repository name path: string; // Directory path in repository localPath: string; // Local directory path }

Commit Operations

create_commit

Create a commit with multiple file changes.

ypescript { owner?: string; // Repository owner repo: string; // Repository name branch: string; // Branch name message: string; // Commit message changes: Array<{ path: string; // File path in repository sourcePath: string; // Local file path (for add/modify) operation: 'add' | 'modify' | 'delete'; }>; }

list_commits

List commits for a repository.

ypescript { owner?: string; // Repository owner repo: string; // Repository name branch?: string; // Branch name author?: string; // Filter by author since?: string; // ISO 8601 date - commits after until?: string; // ISO 8601 date - commits before }

Development

To build the server:

ash npm install npm run build

Environment Variables

  • GITHUB_TOKEN_<N>: GitHub personal access token
  • GITHUB_OWNER_<N>: GitHub username for the token
  • DEFAULT_OWNER: Default GitHub account to use

Multiple accounts can be configured by incrementing N (1, 2, etc.).

License

MIT

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Andris Teikmanis
  • Latvian GPT assistant for developing GPT applications

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • https://cantaspinar.com
  • Summarizes videos and answers related questions.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • https://hashrateventures.xyz
  • Crafts custom instructions for new GPTs

  • Jan Meindl
  • Builds new GPTs

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

    Reviews

    3 (1)
    Avatar
    user_JPewBbSM
    2025-04-15

    As a dedicated user of the Roblox Studio MCP server, I am thoroughly impressed with its efficiency and user-friendliness. Created by dmae97, this server has significantly enhanced my experience by providing stable and robust support for my projects. The seamless integration and excellent performance make it an essential tool for any Roblox developer. Highly recommend!