github-mcp-server-bash

Shaamam/github-mcp-server-bash

3.2

If you are the rightful owner of github-mcp-server-bash and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This project provides a GitHub integration server compatible with the MCP (Model Context Protocol) specification, allowing clients to retrieve GitHub user statistics and profile information via standard tools.

Tools
  1. tool_get_repo_count

    Returns the number of public repositories for the user defined in GITHUB_USERNAME.

  2. tool_get_commit_count

    Returns the total commit count across all public repos.

  3. tool_get_profile_info

    Returns the GitHub profile information including name, bio, followers, etc.

github-mcp-server-bash

Github MCP Server for Bash

This project provides a GitHub integration server compatible with the MCP (Model Context Protocol) specification. It allows clients to retrieve GitHub user statistics and profile information via standard tools.


๐Ÿ› ๏ธ Features

  • ๐Ÿ” tool_get_repo_count โ€“ Returns public repo count
  • ๐Ÿ“Š tool_get_commit_count โ€“ Returns total commit count across public repos
  • ๐Ÿ‘ค tool_get_profile_info โ€“ Returns user profile info (bio, followers, etc.)

All tools use the GITHUB_USERNAME and GITHUB_API_TOKEN environment variables.


๐Ÿ“ Project Structure

.
โ”œโ”€โ”€ githubserver.sh                # Main server script
โ”œโ”€โ”€ assets/
โ”‚   โ”œโ”€โ”€ githubserver_config.json  # MCP server config
โ”‚   โ””โ”€โ”€ githubserver_tools.json   # Tool definitions
โ”œโ”€โ”€ logs/
โ”‚   โ””โ”€โ”€ githubserver.log          # Log output
โ””โ”€โ”€ mcpserver_core.sh             # Core MCP logic (sourced by server)

โš™๏ธ MCP Configuration (VS Code)

Here's a sample mcp.json (used by the VS Code MCP extension or environment):

{
  "mcp": {
    "servers": {
      "my-github-server": {
        "type": "stdio",
        "command": "/absolute/path/to/githubserver.sh",
        "args": [],
        "env": {
          "GITHUB_API_TOKEN": "your_github_pat",
          "GITHUB_USERNAME": "Shaamam"
        }
      }
    }
  }
}

๐Ÿ›ก๏ธ Note: Ensure your GitHub token (GITHUB_API_TOKEN) has repo access for private repositories if needed, though only public repos are used by default.


๐Ÿš€ Running the Server

Make sure all scripts are executable:

chmod +x githubserver.sh

You can now launch the server via the MCP toolchain or your VS Code extension.


๐Ÿงช Available Tools

๐Ÿ”น tool_get_repo_count

Returns the number of public repositories for the user defined in GITHUB_USERNAME.

๐Ÿ”น tool_get_commit_count

Returns the total commit count across all public repos.

๐Ÿ”น tool_get_profile_info

Returns the GitHub profile information including name, bio, followers, etc.


โ— Requirements

  • Bash
  • jq
  • curl
  • A valid GitHub personal access token