GitHub Repos Manager MCP server

Integrates with GitHub's REST API to provide repository management, issue tracking, pull request handling, file operations, security management, and analytics with intelligent caching for performance optimization.
Back to servers
Setup instructions
Provider
Sergey Kurdin
Release date
Jun 03, 2025
Language
Rust
Stats
6 stars

GitHub Repos Manager MCP is a comprehensive Model Context Protocol server that enables direct interaction with GitHub repositories using only a personal access token. It provides 89 tools for repository management, issue tracking, collaboration, and more through direct API integration.

Installation

Prerequisites

  1. Node.js (version 18 or higher)
  2. GitHub Personal Access Token (PAT)
    • Go to GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic) or Fine-grained tokens.
    • Generate a new token with these recommended scopes:
      • repo (Full control of private repositories)
      • user:read or user:email (to read user profile data)
      • read:org (if you need to access organization information)

Installation Methods

Using npx (Simplest - No Installation Required)

npx -y github-repos-manager-mcp

Clone and Install Locally

git clone https://github.com/kurdin/github-repos-manager.git
cd github-repos-manager
npm install

MCP Client Configuration

Using npx (macOS/Linux)

{
  "mcpServers": {
    "github-repos-manager": {
      "command": "npx",
      "args": [
        "-y",
        "github-repos-manager-mcp"
      ],
      "env": {
        "GH_TOKEN": "ghp_YOUR_ACTUAL_TOKEN_HERE"
      }
    }
  }
}

Using npx (Windows)

{
  "mcpServers": {
    "github-repos-manager": {
      "command": "npx.cmd",
      "args": [
        "-y",
        "github-repos-manager-mcp"
      ],
      "env": {
        "GH_TOKEN": "ghp_YOUR_ACTUAL_TOKEN_HERE"
      }
    }
  }
}

Using Local Installation

{
  "mcpServers": {
    "github-repos-manager": {
      "command": "node",
      "args": ["/full/path/to/your/project/github-repos-manager-mcp/server.cjs"],
      "env": {
        "GH_TOKEN": "ghp_YOUR_ACTUAL_TOKEN_HERE"
      }
    }
  }
}

Example File Locations for Claude Desktop claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Configuration Options

Default Repository Setting

You can set a default repository to streamline your workflow:

Environment Variables (Recommended)

{
  "mcpServers": {
    "github-repos-manager": {
      "command": "npx",
      "args": ["-y", "github-repos-manager-mcp"],
      "env": {
        "GH_TOKEN": "ghp_YOUR_ACTUAL_TOKEN_HERE",
        "GH_DEFAULT_OWNER": "octocat",
        "GH_DEFAULT_REPO": "Hello-World"
      }
    }
  }
}

Command Line Arguments

node server.cjs --default-owner octocat --default-repo Hello-World

Runtime Tool Call

Use the set_default_repo tool during your conversation:

  • "Set default repository to microsoft/vscode"

Repository Access Control

Restrict which repositories the server can access:

{
  "mcpServers": {
    "github-repos-manager": {
      "command": "node",
      "args": ["/path/to/server.cjs"],
      "env": {
        "GH_TOKEN": "ghp_YOUR_TOKEN",
        "GH_ALLOWED_REPOS": "owner1/repo1,owner2/repo2,owner3"
      }
    }
  }
}

Tool Access Control

{
  "mcpServers": {
    "github-repos-manager": {
      "command": "npx",
      "args": ["-y", "github-repos-manager-mcp"],
      "env": {
        "GH_TOKEN": "ghp_YOUR_ACTUAL_TOKEN_HERE",
        "GH_ALLOWED_TOOLS": "list_issues,create_issue,list_prs,get_repo_info"
      }
    }
  }
}

Usage Examples

Repository Management

  • "List my GitHub repositories, sort by creation date and show only private repos."
  • "Set default repository to octocat/Spoon-Knife for easier workflow."
  • "Get detailed information about the microsoft/vscode repository."
  • "Show me the contents of the src/main.js file in microsoft/vscode on the develop branch."

Issue Management

  • "Create an issue in my-org/my-repo with title 'Urgent: UI Bug' and body 'The login button is broken on mobile.' Assign it to user1 and user2 and add the bug label."
  • "Edit issue #15: change title to 'Feature Request: Dark Mode', add the enhancement label, and close it."
  • "Lock issue #23 with reason 'resolved' to prevent further discussion."
  • "List all comments on issue #7 from the last week."

Pull Requests & Branches

  • "List all open pull requests for microsoft/vscode."
  • "List all branches in my-org/my-repo and show their protection status."
  • "Create a new feature branch called feature/dark-mode from the develop branch."
  • "Compare the main branch with feature/new-ui to see what's different."

Troubleshooting

Authentication Issues

  1. Token Problems:

    • Check that the GH_TOKEN value is correct
    • Verify token validity using curl:
      export TEMP_TOKEN="ghp_YOUR_TOKEN_TO_TEST"
      curl -H "Authorization: token $TEMP_TOKEN" https://api.github.com/user
      unset TEMP_TOKEN
      
  2. Permission Issues:

    • Ensure your token has the required scopes

Performance & Rate Limiting

  • GitHub API allows 5,000 requests per hour for authenticated users
  • The server includes built-in rate limit error handling

Security Best Practices

  • Never commit your GH_TOKEN to version control
  • Use tokens with only the minimum required permissions
  • Regularly rotate your GitHub tokens
  • Store tokens securely using your system's credential management

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "github-repos-manager" '{"command":"npx","args":["-y","github-repos-manager-mcp"],"env":{"GH_TOKEN":"ghp_YOUR_ACTUAL_TOKEN_HERE"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "github-repos-manager": {
            "command": "npx",
            "args": [
                "-y",
                "github-repos-manager-mcp"
            ],
            "env": {
                "GH_TOKEN": "ghp_YOUR_ACTUAL_TOKEN_HERE"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "github-repos-manager": {
            "command": "npx",
            "args": [
                "-y",
                "github-repos-manager-mcp"
            ],
            "env": {
                "GH_TOKEN": "ghp_YOUR_ACTUAL_TOKEN_HERE"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later