mcpField
G
github

github

Local
github.com/davidweb3-ctrlVersion Control0Updated 27w ago

About github

github is an MCP server that lets AI assistants query GitHub repositories. It provides tools for pull requests, issues, repository metadata, and code search.

Key features

  1. 01List and inspect pull requests
  2. 02Filter and view repository issues
  3. 03Retrieve repository metadata and statistics
  4. 04Search code across GitHub

Use cases

  1. 01Reviewing open pull requests
  2. 02Finding issues by label or assignee
  3. 03Checking repository details
  4. 04Searching for code across repositories

MCP support

Exposes GitHub repository, pull request, issue, and code-search tools to MCP clients. A GitHub token is configured through an environment variable or supplied programmatically.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"davidweb3-ctrl-github": {
"command": "npx",
"args": [
"-y",
"@davidweb3-ctrl/mcp-github-server"
],
"env": {
"GITHUB_TOKEN": "<GITHUB_TOKEN>"
}
}
}
}
Run commandnpx -y @davidweb3-ctrl/mcp-github-server
Environment variables to set
GITHUB_TOKENSecretGitHub Personal Access Token

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@davidweb3-ctrl/mcp-github-server1.0.0

Tools

6

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
basestringNoFilter by base branch
headstringNoFilter by head branch (format: user:branch)
pagenumberNoPage number
repostringYesRepository name
sortenumNoSort fieldcreated | updated | popularity | long-running
ownerstringYesRepository owner (username or organization)
stateenumNoFilter by PR stateopen | closed | all
per_pagenumberNoResults per page (max 100)
directionenumNoSort directionasc | desc

Details

From the project README

GitHub MCP Server

npm version License: MIT

A Model Context Protocol (MCP) server for GitHub operations. This server enables AI assistants to interact with GitHub repositories through a standardized interface.

Features

  • 🔍 List & View Pull Requests - Browse PRs with filtering options
  • 📋 List & View Issues - Access issues with labels, assignees, and comments
  • 📊 Repository Info - Get repository statistics and metadata
  • 🔎 Code Search - Search code across GitHub repositories

Installation

npm install -g @bountyclaw/mcp-github-server

Configuration

Set your GitHub token as an environment variable:

export GITHUB_TOKEN=your_github_token_here

Or pass it when creating the client programmatically.

Usage with Claude Code

Add to your Claude Code MCP settings:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@bountyclaw/mcp-github-server"],
      "env": {
        "GITHUB_TOKEN": "your_github_token_here"
      }
    }
  }
}

Available Tools

1. github_pr_list

List pull requests for a repository.

Input:

  • owner (string, required): Repository owner
  • repo (string, required): Repository name
  • state (enum, optional): Filter by state (open, closed, all)
  • head (string, optional): Filter by head branch
  • base (string, optional): Filter by base branch
  • sort (enum, optional): Sort field
  • direction (enum, optional): Sort direction
  • per_page (number, optional): Results per page (max 100)
  • page (number, optional): Page number
2. github_pr_view

View details of a specific pull request.

Input:

  • owner (string, required): Repository owner
  • repo (string, required): Repository name
  • pull_number (number, required): PR number
  • include_diff (boolean, optional): Include diff content
3. github_issue_list

List issues for a repository.

Input:

  • owner (string, required): Repository owner
  • repo (string, required): Repository name
  • state (enum, optional): Filter by state
  • labels (string, optional): Comma-separated label names
  • assignee (string, optional): Filter by assignee
  • creator (string, optional): Filter by creator
  • sort (enum, optional): Sort field
  • direction (enum, optional): Sort direction
  • per_page (number, optional): Results per page
  • page (number, optional): Page number
4. github_issue_view

View details of a specific issue.

Input:

  • owner (string, required): Repository owner
  • repo (string, required): Repository name
  • issue_number (number, required): Issue number
  • include_comments (boolean, optional): Include comments
5. github_repo_info

Get repository information and statistics.

Input:

  • owner (string, required): Repository owner
  • repo (string, required): Repository name
6. github_search_code

Search code across GitHub.

Input:

  • query (string, required): Search query (GitHub code search syntax)
  • sort (enum, optional): Sort field (indexed, best-match)
  • order (enum, optional): Sort order
  • per_page (number, optional): Results per page
  • page (number, optional): Page number

Example Queries

"List open PRs in facebook/react"
"Show me issue #123 in microsoft/vscode"
"Get info about the kubernetes/kubernetes repo"
"Search for 'useEffect' in TypeScript files"

Development

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Lint
npm run lint

# Format
npm run format

Testing

The project includes comprehensive unit tests with 90%+ coverage:

  • GitHub API client tests
  • Tool handler tests for all 6 tools
  • Error handling tests
  • Input validation tests
npm test

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Built with 🦞 by BountyClaw

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.