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(github): Add GitHub Search to Github MCP #103

Merged

Conversation

0xRaduan
Copy link
Contributor

@0xRaduan 0xRaduan commented Nov 28, 2024

Description

Added comprehensive search functionality to the GitHub MCP Server, enabling users to search for code, issues/PRs, and users across GitHub. This enhancement brings powerful GitHub search capabilities directly to MCP clients.

Server Details

  • Server: github
  • Changes to: tools (added search functionality), schemas (added search schemas), documentation

Motivation and Context

GitHub's search functionality is a crucial feature for developers and AI assistants working with codebases. This addition allows MCP clients to:

  • Search code across repositories with language and path filters
  • Find relevant issues and pull requests
  • Discover users and organizations
  • Use GitHub's advanced search syntax
  • Sort and paginate results efficiently

How Has This Been Tested?

  • Tested with Claude Desktop client
    CleanShot 2024-11-28 at 09 56 24@2x
  • Verified search functionality works through stdio interface
  • Tested various search scenarios:
    • Code search with language and path filters
    • Issues search with labels and state filters
    • User search with location and follower filters

Breaking Changes

No breaking changes. Users can continue using existing functionality without modification. The new search features are purely additive.

Types of changes

  • New MCP Server
  • 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 server 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(there are no tests)
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Additional context

  • Added comprehensive documentation for search query syntax in README
  • Included detailed schema descriptions and JSDoc comments
  • Implemented proper type safety with Zod schemas
  • Version bumped from 0.5.1 to 0.6.0 for new feature addition

@0xRaduan 0xRaduan changed the title Add GitHub Search to Github MCP feat(github): Add GitHub Search to Github MCP Nov 28, 2024
@0xRaduan
Copy link
Contributor Author

@maheshmurag / @jspahrsummers - please let me know if anything else is needed

@0xRaduan
Copy link
Contributor Author

0xRaduan commented Dec 3, 2024

cc. @dsp-ant, couldn't assign a reviewer here, maybe you can help find the right person

jspahrsummers
jspahrsummers previously approved these changes Dec 3, 2024
Copy link
Member

@jspahrsummers jspahrsummers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting this!

The diff is a bit hard to read with all the formatting changes (please strip those out in future), but the semantic changes look good. Please update from main so we can merge this.

@@ -1,6 +1,6 @@
{
"name": "@modelcontextprotocol/server-github",
"version": "0.5.1",
"version": "0.6.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment, all server versions have to be bumped in tandem. Can you please revert this or bump all servers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, makes sense, will revert.

src/github/schemas.ts Outdated Show resolved Hide resolved
@0xRaduan
Copy link
Contributor Author

0xRaduan commented Dec 5, 2024

Hey, taking a look right now.

@0xRaduan
Copy link
Contributor Author

0xRaduan commented Dec 5, 2024

Re: formatting changes, I do think that we need to add a .prettier config, otherwise my VS Code was just setup by default differently, perhaps.

@0xRaduan
Copy link
Contributor Author

0xRaduan commented Dec 5, 2024

Hey @jspahrsummers - I did address your comments + merged with latest master(as there were merge conflicts).

Feel free to squash and merge.

I did notice that there is no prettierc, so maybe I can add it in a separate PR.

Do let me know, if adding some CI for codestyle for TS/python makes sense?

I think as you use UV for python, using ruff would make sense. As for TS, I think using prettier/eslint would make most sense.

jspahrsummers
jspahrsummers previously approved these changes Dec 5, 2024
Copy link
Member

@jspahrsummers jspahrsummers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making those changes!

w.r.t. linting and styling, I opened #197 to track this. More than happy to review a PR addressing it!

@jspahrsummers jspahrsummers merged commit 0724ae4 into modelcontextprotocol:main Dec 5, 2024
23 checks passed
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.

2 participants