GitHub Explorer MCP server

Integrates with GitHub's API to enable repository exploration, code collaboration, and user profile analysis through authenticated data retrieval functions.
Back to servers
Setup instructions
Provider
Divyansh Kushwaha
Release date
Mar 18, 2025
Language
Python

This MCP server allows you to interact with GitHub's REST API using the Model Context Protocol framework. It provides functionalities to fetch user information, repository details, and authenticated user data through a structured command interface.

Installation

Prerequisites

  • Python 3.10 or higher
  • GitHub personal access token
  • A virtual environment manager (venv or conda)

Step-by-Step Setup

  1. Clone the repository

    git clone https://github.com/DivyanshKushwaha/GitHub-MCP-Server-Claude.git
    cd GitHub-MCP-Server-Claude
    
  2. Create a Python virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies

    pip install -r requirements.txt
    
  4. Set up environment variables

    Create a .env file in the project root directory with your GitHub token:

    GITHUB_TOKEN=your_personal_access_token
    

Configuration for Claude Desktop

To use this MCP server with the Claude Desktop application, you need to create a configuration file:

  1. Create the Claude Desktop configuration file

    Create a file named claude_desktop_config.json in the following location:

    • Windows: C:\Users\your_username\AppData\Roaming\Claude\
  2. Add the following configuration

    {
        "mcpServers": {
            "MCP_Server": {
                "command": "my_env/Scripts/uv",
                "args": [
                    "run",
                    "D:/MCP_Project/main.py"
                ]
            }
        }
    }
    

    Note: Update the paths in this configuration to match your environment:

    • Replace my_env/Scripts/uv with the path to your Python environment
    • Replace D:/MCP_Project/main.py with the actual path to the main.py file

Usage

Launching the Server

  1. Start the Claude Desktop application

    When you launch the Claude Desktop application, it will automatically use the MCP server as configured in your claude_desktop_config.json file.

Available Commands

The MCP server provides various GitHub-related functionalities:

  • Fetch GitHub user information by username
  • Retrieve details about specific repositories
  • Get authenticated user details using your GitHub personal access token

These commands will be available through the Claude interface once the server is properly configured and running.

Example Interactions

You can ask Claude questions like:

  • "Can you show me information about the GitHub user 'octocat'?"
  • "What are the details of the repository 'tensorflow/tensorflow'?"
  • "Show me my GitHub profile information" (requires authentication)

The MCP server will process these requests through the GitHub API and return the relevant information.

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 "MCP_Server" '{"command":"my_env/Scripts/uv","args":["run","D:/MCP_Project/main.py"]}'

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": {
        "MCP_Server": {
            "command": "my_env/Scripts/uv",
            "args": [
                "run",
                "D:/MCP_Project/main.py"
            ]
        }
    }
}

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": {
        "MCP_Server": {
            "command": "my_env/Scripts/uv",
            "args": [
                "run",
                "D:/MCP_Project/main.py"
            ]
        }
    }
}

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