MM

missionsquad/mcp-github

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

10 stars 6 forks Качество 75 Тренд 12MIT

Github MCP Server

Обзор

MCP Server for the GitHub API, enabling file operations, repository management, search functionality, and more. - github pat is now dynamic per request and does not have to be included via environment variables, but still falls back to environment variables. - name: mcp-github - : When creating/updating files or pushing changes, branches are automatically created if they don't exist - : Clear error messages for common issues - : Operations maintain proper Git history without force pushing - : Support for both single-file and multi-file operations - : Support for searching code, issues/PRs, and users 1.

README

Показан фрагмент оригинального README. Открыть оригинал.

GitHub MCP Server

MCP Server for the GitHub API, enabling file operations, repository management, search functionality, and more.

Mission Squad modifications

  • github pat is now dynamic per request and does not have to be included via environment variables, but still falls back to environment variables.
  • name: mcp-github

Features

  • Automatic Branch Creation: When creating/updating files or pushing changes, branches are automatically created if they don’t exist
  • Comprehensive Error Handling: Clear error messages for common issues
  • Git History Preservation: Operations maintain proper Git history without force pushing
  • Batch Operations: Support for both single-file and multi-file operations
  • Advanced Search: Support for searching code, issues/PRs, and users

Tools

  1. create_or_update_file

    • Create or update a single file in a repository
    • Inputs:
      • owner (string): Repository owner (username or organization)
      • repo (string): Repository name
      • path (string): Path where to create/update the file
      • content (string): Content of the file
      • message (string): Commit message
      • branch (string): Branch to create/update the file in
      • sha (optional string): SHA of file being replaced (for updates)
    • Returns: File content and commit details
  2. push_files

    • Push multiple files in a single commit
    • Inputs:
      • owner (string): Repository owner
      • repo (string): Repository name
      • branch (string): Branch to push to
      • files (array): Files to push, each with path and content
      • message (string): Commit message
    • Returns: Updated branch reference
  3. search_repositories

    • Search for GitHub repositories
    • Inputs:
      • query (string): Search query
      • page (optional number): Page number for pagination
      • perPage (optional number): Results per page (max 100)
    • Returns: Repository search results
  4. create_repository

    • Create a new GitHub repository
    • Inputs:
      • name (string): Repository name
      • description (optional string): Repository description
      • private (optional boolean): Whether repo should be private
      • autoInit (optional boolean): Initialize with README
    • Returns: Created repository details
  5. get_file_contents

    • Get contents of a file or directory
    • Inputs:
      • owner (string): Repository owner
      • repo (string): Repository name
      • path (string): Path to file/directory
      • branch (optional string): Branch to get contents from
    • Returns: File/directory contents
  6. create_issue

    • Create a new issue
    • Inputs:
      • owner (string): Repository owner
      • repo (string): Repository name
      • title (string): Issue title
      • body (optional string): Issue description
      • assignees (optional string[]): Usernames to assign
      • labels (optional string[]): Labels to add
Открыть полный README на GitHub

Установка

docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN mcp/github
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "mcp/github" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>" } } } }