Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: register all pull request tools in github server #662

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dbworku
Copy link

@dbworku dbworku commented Feb 23, 2025

Description

Some of the pull request operations listed in the README never had tool registrations or handlers. The implementations looked fine; just closing the last mile for:

  • get_pull_request_status
  • update_pull_request_branch
  • get_pull_request_comments
  • get_pull_request_reviews
  • merge_pull_request

Server Details

  • Server: github
  • Changes to: tools

Motivation and Context

We want MCP Clients using this server to be able to use all of the tools that we list in the documentation.

How Has This Been Tested?

Built with:

➜  servers git:(register-all-tools) ✗ docker build -t mcp/github -f src/github/Dockerfile .
[+] Building 12.7s (15/15) FINISHED                       docker:desktop-linux
...
 => => exporting manifest list sha256:98865d3d57046c173e22b7d1391619eb06  0.0s
 => => naming to docker.io/mcp/github:latest                              0.0s
 => => unpacking to docker.io/mcp/github:latest                           0.2s

Addes to Claude Desktop with:

{
    "mcpServers": {
      "github": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "-e",
          "GITHUB_PERSONAL_ACCESS_TOKEN",
          "mcp/github"
        ],
        "env": {
          "GITHUB_PERSONAL_ACCESS_TOKEN": "<REDACTED_FROM_PR>"
        }
      },
    }
  }

Created a prompt that uses the tools. Verified that various tool calls succeed.
Screenshot 2025-02-22 at 9 13 49 PM

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Added tool registrations and handlers for:
- get_pull_request_status
- update_pull_request_branch
- get_pull_request_comments
- get_pull_request_reviews
- merge_pull_request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant