Skip to main content
Glama
amedmohmed925

GitHub MCP Server

GitHub MCP Server šŸš€

A custom Model Context Protocol (MCP) server built with Node.js and TypeScript. This server allows any MCP-compatible AI Assistant (like Gemini Code Assist, Claude Desktop, Roo Code, etc.) to interact directly with your GitHub account.

✨ Features (Available Tools)

This server exposes 7 powerful tools to your AI assistant:

  1. create_repository: Create a new public or private repository.

  2. get_my_repositories: List the authenticated user's most recently updated repositories.

  3. get_repository: Fetch details of a specific repository.

  4. get_file_content: Read the exact content of any file inside a repository for code analysis.

  5. search_code: Search for functions, keywords, or syntax across repositories.

  6. create_issue: Open a new issue in a specific repository.

  7. list_issues: View open issues for a repository.


šŸ› ļø Installation & Setup

  1. Clone the repository:

    git clone [https://github.com/YOUR_USERNAME/mcp-github-server.git](https://github.com/YOUR_USERNAME/mcp-github-server.git)
    cd mcp-github-server
    Install dependencies:

Bash npm install Build the project:

Bash npm run build

šŸ”‘ How to Get Your GitHub Token

To allow this server to act on your behalf, you need a Personal Access Token (PAT) from GitHub.

Go to your GitHub account settings.

Navigate to Developer settings (at the bottom of the left sidebar).

Click on Personal access tokens -> Tokens (classic).

Click Generate new token (classic).

Give your token a note (e.g., "MCP Server").

Required Scopes:

Check the repo box (This grants full control of private repositories, which is required to create repos, read files, and manage issues).

Scroll down and click Generate token.

Copy the token immediately (it starts with ghp_...).

Setting up the Environment Create a .env file in the root directory of this project:

Bash touch .env Add your token to the .env file:

مقتطف الرمز GITHUB_TOKEN=your_generated_token_here šŸ”Œ Connecting to Your IDE / AI Client To use this server with an MCP-supported IDE or extension, you need to configure your client's MCP settings (usually a mcp.json or mcp_config.json file) to point to the built index.js file.

Example configuration:

JSON { "mcpServers": { "github-mcp": { "command": "node", "args": [ "--no-warnings", "ABSOLUTE_PATH_TO_YOUR_PROJECT/dist/index.js" ], "env": { "GITHUB_TOKEN": "your_generated_token_here" } } } }

Note: Make sure to replace ABSOLUTE_PATH_TO_YOUR_PROJECT with the actual path on your machine.

šŸ¤ Contributing This is a small educational project! If you'd like to add more tools (like pull request management, or commit reading), feel free to fork the repository and submit a Pull Request.

-
license - not tested
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 Connectors

  • An MCP server that gives your AI access to the source code and docs of all public github repos

  • Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.

  • An MCP server that integrates with Discord to provide AI-powered features.

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/amedmohmed925/MCP-Server-to-Github'

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