{"id":26326582,"url":"https://github.com/cyanheads/github-mcp-server","last_synced_at":"2026-04-13T12:01:38.306Z","repository":{"id":282500437,"uuid":"948799666","full_name":"cyanheads/github-mcp-server","owner":"cyanheads","description":"A Model Context Protocol (MCP) server built in TypeScript that integrates with GitHub's API, enabling AI assistants to manage repositories, issues, pull requests, and code while providing a structured interface for LLM agents to perform GitHub operations.","archived":false,"fork":false,"pushed_at":"2025-07-22T16:53:04.000Z","size":104,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T18:26:24.300Z","etag":null,"topics":["ai-assistant","github","llm","llm-agent","mcp","model-context-protocol","modelcontextprotocol","typescript","version-control"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyanheads.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-15T01:39:50.000Z","updated_at":"2025-07-22T16:53:08.000Z","dependencies_parsed_at":"2025-07-22T18:25:11.288Z","dependency_job_id":null,"html_url":"https://github.com/cyanheads/github-mcp-server","commit_stats":null,"previous_names":["cyanheads/github-mcp-server"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cyanheads/github-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanheads%2Fgithub-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanheads%2Fgithub-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanheads%2Fgithub-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanheads%2Fgithub-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyanheads","download_url":"https://codeload.github.com/cyanheads/github-mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanheads%2Fgithub-mcp-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31751705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-assistant","github","llm","llm-agent","mcp","model-context-protocol","modelcontextprotocol","typescript","version-control"],"created_at":"2025-03-15T19:49:39.471Z","updated_at":"2026-04-13T12:01:38.283Z","avatar_url":"https://github.com/cyanheads.png","language":"TypeScript","readme":"# 🚨 This repository is deprecated. 🚨\n\n**Please use the official GitHub MCP server instead: [https://github.com/github/github-mcp-server](https://github.com/github/github-mcp-server?tab=readme-ov-file#remote-github-mcp-server)**\n\n# 🚨 This repository is deprecated. 🚨\n\n---\n\n# GitHub MCP Server\n\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.8-blue.svg)](https://www.typescriptlang.org/)\n[![Model Context Protocol](https://img.shields.io/badge/MCP-1.7.0-green.svg)](https://github.com/anthropics/modelcontextprotocol)\n[![Version](https://img.shields.io/badge/Version-1.0.2-blue.svg)]()\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Status](https://img.shields.io/badge/Status-Deprecated-red.svg)]()\n[![GitHub](https://img.shields.io/github/stars/cyanheads/github-mcp-server?style=social)](https://github.com/cyanheads/github-mcp-server)\n\nA Model Context Protocol (MCP) server that provides tools for interacting with the GitHub API. This server allows LLM agents manage GitHub repositories, issues, pull requests, branches, files, and releases through a standardized interface.\n\n## Table of Contents\n\n- [Overview](#overview)\n  - [Architecture \u0026 Components](#architecture--components)\n- [Features](#features)\n  - [Repository Management](#repository-management)\n  - [Branch Management](#branch-management)\n  - [Issue Management](#issue-management)\n  - [Pull Request Management](#pull-request-management)\n  - [File Management](#file-management)\n  - [Release Management](#release-management)\n- [Installation](#installation)\n  - [Prerequisites](#prerequisites)\n  - [Setup](#setup)\n- [Configuration](#configuration)\n- [Project Structure](#project-structure)\n- [Tools](#tools)\n  - [Repository Management Tools](#repository-management-tools)\n  - [Branch Management Tools](#branch-management-tools)\n  - [Issue Management Tools](#issue-management-tools)\n  - [Pull Request Management Tools](#pull-request-management-tools)\n  - [File Management Tools](#file-management-tools)\n  - [Release Management Tools](#release-management-tools)\n- [Development](#development)\n  - [Project Structure](#project-structure-1)\n  - [Scripts](#scripts)\n- [Error Handling](#error-handling)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Overview\n\ngithub-mcp-server implements the Model Context Protocol (MCP), enabling standardized communication between LLMs and external systems through:\n\n- **Clients**: Claude Desktop, IDEs, and other MCP-compatible clients\n- **Servers**: Tools and resources for project management and collaboration\n- **LLM Agents**: AI models that leverage the ability to perform GitHub operations programmatically.\n\nIt acts as a bridge between AI models and the GitHub API, offering a set of well-defined tools that follow consistent patterns and handle authentication, validation, error handling, and rate limiting.\n\nKey capabilities:\n\n- **GitHub API Integration**: Secure and seamless integration with GitHub's REST API\n- **Comprehensive GitHub Features**: Complete management of repos, branches, issues, PRs, and more\n- **Atomic Feature Architecture**: Well-organized modular code structure for maintainability\n- **Input Validation**: Robust validation with Zod schemas for all operations\n- **Error Handling**: Consistent error categorization and reporting\n- **Rate Limiting**: Built-in GitHub API rate limit handling\n- **Performance Focus**: Optimized operations and response formatting\n\n### Architecture \u0026 Components\n\nCore system architecture:\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand Mermaid diagram\u003c/summary\u003e\n\n```mermaid\nflowchart TB\n    subgraph API[\"API Layer\"]\n        direction LR\n        MCP[\"MCP Protocol\"]\n        Val[\"Validation\"]\n        Rate[\"Rate Limiting\"]\n\n        MCP --\u003e Val --\u003e Rate\n    end\n\n    subgraph Features[\"Feature Modules\"]\n        direction LR\n        Repo[\"Repository Management\"]\n        Branch[\"Branch Management\"]\n        Issue[\"Issue Management\"]\n        PR[\"Pull Request Management\"]\n        File[\"File Management\"]\n        Release[\"Release Management\"]\n\n        Repo \u003c--\u003e Branch\n        Repo \u003c--\u003e Issue\n        Repo \u003c--\u003e PR\n        Repo \u003c--\u003e File\n        Branch \u003c--\u003e PR\n    end\n\n    subgraph Services[\"Services Layer\"]\n        direction LR\n        GitHub[\"GitHub Service\"]\n        Mapper[\"Response Mapper\"]\n        RateLimiter[\"Rate Limiter\"]\n\n        GitHub \u003c--\u003e RateLimiter\n        GitHub \u003c--\u003e Mapper\n    end\n\n    Rate --\u003e Repo\n    Rate --\u003e Branch\n    Rate --\u003e Issue\n    Rate --\u003e PR\n    Rate --\u003e File\n    Rate --\u003e Release\n\n    Repo --\u003e GitHub\n    Branch --\u003e GitHub\n    Issue --\u003e GitHub\n    PR --\u003e GitHub\n    File --\u003e GitHub\n    Release --\u003e GitHub\n\n    classDef layer fill:#2d3748,stroke:#4299e1,stroke-width:3px,rx:5,color:#fff\n    classDef component fill:#1a202c,stroke:#a0aec0,stroke-width:2px,rx:3,color:#fff\n    classDef api fill:#3182ce,stroke:#90cdf4,stroke-width:2px,rx:3,color:#fff\n    classDef features fill:#319795,stroke:#81e6d9,stroke-width:2px,rx:3,color:#fff\n    classDef services fill:#2f855a,stroke:#9ae6b4,stroke-width:2px,rx:3,color:#fff\n\n    class API,Features,Services layer\n    class MCP,Val,Rate api\n    class Repo,Branch,Issue,PR,File,Release features\n    class GitHub,Mapper,RateLimiter services\n```\n\n\u003c/details\u003e\n\nCore Components:\n\n- **MCP Protocol Layer**: Handles communication with AI assistants\n- **Validation Layer**: Ensures data integrity through schema validation\n- **GitHub Service**: Core integration with GitHub REST API\n- **Rate Limiter**: Prevents API rate limit exhaustion\n- **Feature Modules**: Domain-specific GitHub operations\n- **Error Handling**: Comprehensive error handling and logging system\n\n## Features\n\n### Repository Management\n\n- **Create, List, Get**: Create new repositories, list user repositories, and get detailed repository information\n- **Validation \u0026 Configuration**: Validate repository settings and manage configuration options\n\n### Branch Management\n\n- **Create, Delete, List**: Complete branch lifecycle management with secure validation\n- **Protected Branch Support**: Filtering and operations for protected branches\n\n### Issue Management\n\n- **Create \u0026 List**: Create detailed issues with labels and list issues with filtering options\n- **Status Tracking**: Filter by issue state (open, closed, all)\n\n### Pull Request Management\n\n- **Create, Update, Merge, List**: Full pull request lifecycle management\n- **Review \u0026 Comment Integration**: Add reviews and comments to pull requests\n- **Merge Options**: Support for different merge strategies (merge, squash, rebase)\n\n### File Management\n\n- **Create \u0026 Update Files**: Add and modify repository content with commit messages\n- **Base64 Encoding Support**: Handle both text and binary file content\n\n### Release Management\n\n- **Create Releases**: Create tagged releases with customizable options\n- **Draft \u0026 Prerelease Support**: Support for draft and prerelease workflows\n\n## Installation\n\n### Prerequisites\n\n- Node.js (v16 or newer)\n- A GitHub personal access token with appropriate permissions\n\n### Setup\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/cyanheads/github-mcp-server.git\n   cd github-mcp-server\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n3. Create a `.env` file in the project root with your GitHub token:\n\n   ```\n   GITHUB_TOKEN=your_github_personal_access_token\n   LOG_LEVEL=info\n   SERVER_NAME=github-mcp-server\n   ```\n\n4. Build the project:\n\n   ```bash\n   npm run build\n   ```\n\n5. Start the server:\n   ```bash\n   node build/index.js\n   ```\n\n## Configuration\n\nThe server can be configured through environment variables:\n\n| Environment Variable            | Description                                     | Default           |\n| ------------------------------- | ----------------------------------------------- | ----------------- |\n| `GITHUB_TOKEN`                  | GitHub personal access token (required)         | -                 |\n| `LOG_LEVEL`                     | Logging level (debug, info, warn, error, fatal) | info              |\n| `SERVER_NAME`                   | MCP server name                                 | github-mcp-server |\n| `SERVER_VERSION`                | MCP server version                              | 0.1.0             |\n| `API_TIMEOUT_MS`                | Timeout for API calls in milliseconds           | 10000             |\n| `RATE_LIMITING_ENABLED`         | Whether rate limiting is enabled                | true              |\n| `RATE_LIMITING_MIN_REMAINING`   | Minimum remaining requests before throttling    | 100               |\n| `RATE_LIMITING_RESET_BUFFER_MS` | Time buffer to add to rate limit reset time     | 5000              |\n\n### MCP Client Settings\n\nAdd to your MCP client settings:\n\n```json\n{\n  \"mcpServers\": {\n    \"github\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/github-mcp-server/build/index.js\"],\n      \"env\": {\n        \"GITHUB_TOKEN\": \"your_github_personal_access_token\",\n        \"LOG_LEVEL\": \"info\",\n        \"SERVER_NAME\": \"github-mcp-server\"\n      }\n    }\n  }\n}\n```\n\n## Project Structure\n\nThis project follows an atomic feature-oriented architecture pattern:\n\n```\n/src\n  /configuration             // Application configuration\n  /dependencyInjection       // Tool registry and DI container\n  /features                  // Feature modules organized by domain\n    /repositoryManagement\n      /resources             // Read operations\n      /modifications         // Write operations\n    /branchManagement\n    /issueManagement\n    /pullRequestManagement\n    /fileManagement\n    /releaseManagement\n  /services                  // External service integrations\n    /githubAccess            // GitHub API client and utilities\n  /types                     // Core type definitions\n  /utilities                 // Helper functions and utilities\n```\n\nEach feature domain is split into:\n\n- **Resources**: Read operations that don't modify data\n- **Modifications**: Write operations that create, update, or delete data\n\nEach operation is contained in its own directory with:\n\n- Operation implementation file\n- Type definitions file\n- Export index file\n\n## Tools\n\nGitHub MCP Server provides a comprehensive suite of tools for interacting with GitHub:\n\n### Repository Management Tools\n\n| Tool                | Description                                                                                          |\n| ------------------- | ---------------------------------------------------------------------------------------------------- |\n| `get_repository`    | Get detailed information about a specific repository\u003cbr\u003eParameters: `owner`, `repo`                  |\n| `list_repositories` | List repositories for the authenticated user\u003cbr\u003eParameters: `type` (optional), `sort` (optional)     |\n| `create_repository` | Create a new GitHub repository\u003cbr\u003eParameters: `name`, `description` (optional), `private` (optional) |\n\n### Branch Management Tools\n\n| Tool            | Description                                                                                                 |\n| --------------- | ----------------------------------------------------------------------------------------------------------- |\n| `list_branches` | List branches in a repository\u003cbr\u003eParameters: `owner`, `repo`, `protected` (optional), `per_page` (optional) |\n| `create_branch` | Create a new branch\u003cbr\u003eParameters: `owner`, `repo`, `branch`, `sha`                                         |\n| `delete_branch` | Delete a branch\u003cbr\u003eParameters: `owner`, `repo`, `branch`                                                    |\n\n### Issue Management Tools\n\n| Tool           | Description                                                                                                        |\n| -------------- | ------------------------------------------------------------------------------------------------------------------ |\n| `create_issue` | Create a new issue in a repository\u003cbr\u003eParameters: `owner`, `repo`, `title`, `body` (optional), `labels` (optional) |\n| `list_issues`  | List issues in a repository\u003cbr\u003eParameters: `owner`, `repo`, `state` (optional), `labels` (optional)                |\n\n### Pull Request Management Tools\n\n| Tool                  | Description                                                                                                                                                                                     |\n| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `create_pull_request` | Create a new pull request\u003cbr\u003eParameters: `owner`, `repo`, `title`, `head`, `base`, `body` (optional)                                                                                            |\n| `merge_pull_request`  | Merge a pull request\u003cbr\u003eParameters: `owner`, `repo`, `pull_number`, `commit_title` (optional), `commit_message` (optional), `merge_method` (optional)                                           |\n| `update_pull_request` | Update an existing pull request\u003cbr\u003eParameters: `owner`, `repo`, `pull_number`, `title` (optional), `body` (optional), `state` (optional), `base` (optional), `maintainer_can_modify` (optional) |\n| `list_pull_requests`  | List pull requests in a repository\u003cbr\u003eParameters: `owner`, `repo`, `state` (optional), `head` (optional), `base` (optional), `sort` (optional), `direction` (optional)                          |\n\n### File Management Tools\n\n| Tool          | Description                                                                                                                                 |\n| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |\n| `update_file` | Create or update a file in a repository\u003cbr\u003eParameters: `owner`, `repo`, `path`, `message`, `content`, `sha` (optional), `branch` (optional) |\n\n### Release Management Tools\n\n| Tool             | Description                                                                                                                                        |\n| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `create_release` | Create a new release\u003cbr\u003eParameters: `owner`, `repo`, `tag_name`, `name` (optional), `body` (optional), `draft` (optional), `prerelease` (optional) |\n\n## Development\n\n### Project Structure\n\nThe project follows strict naming conventions and directory structure:\n\n- File naming: `action.entity.type.ts` (e.g., `create.repository.operation.ts`)\n- Each module has a clearly defined purpose\n- Types are co-located with their implementation\n- All exports are centralized through index files\n\n### Scripts\n\n- `npm run build` - Build the project\n- `npm run watch` - Watch for changes and rebuild\n- `npm run inspector` - Run the MCP inspector tool\n- `npm run clean` - Clean build artifacts\n- `npm run rebuild` - Clean and rebuild the project\n- `npm run tree` - Generate a directory tree representation\n\n## Error Handling\n\nThe server implements a comprehensive error handling strategy:\n\n- **Standardized Error Objects**: Consistent error format with categorization\n- **Input Validation**: Pre-validation using Zod schemas\n- **Rate Limiting Protection**: Automatic handling of GitHub API rate limits\n- **Error Categories**:\n  - Network errors (connectivity issues)\n  - Authentication errors (token problems)\n  - Validation errors (invalid input)\n  - GitHub API errors (API-specific issues)\n  - System errors (unexpected failures)\n- **Detailed Logging**: Structured logging for all operations and errors\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\n[Apache License 2.0](LICENSE)\n\n---\n\n\u003cdiv align=\"center\"\u003e\nBuilt with the Model Context Protocol\n\u003c/div\u003e\n","funding_links":[],"categories":["🤖 AI/ML"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyanheads%2Fgithub-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyanheads%2Fgithub-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyanheads%2Fgithub-mcp-server/lists"}