Skip to content

Pass GitHub MCP Tools#142

Merged
sgoedecke merged 13 commits intoactions:mainfrom
maartenvandiemen:feature/pass-toolsets
Nov 30, 2025
Merged

Pass GitHub MCP Tools#142
sgoedecke merged 13 commits intoactions:mainfrom
maartenvandiemen:feature/pass-toolsets

Conversation

@maartenvandiemen
Copy link
Contributor

@maartenvandiemen maartenvandiemen commented Nov 2, 2025

In a recent change of the GitHub MCP Server some tools are not enabled anymore by default. You need to explicitly define them: https://github.com/github/github-mcp-server?tab=readme-ov-file#tool-configuration.

With this change I introduced an extra optional parameter in which you can pass the tools that the caller want to have enabled.

In issue #138 this is the issue, since the tools for GH Actions aren't enabled by default anymore.

@maartenvandiemen maartenvandiemen requested a review from a team as a code owner November 2, 2025 22:52
Copilot AI review requested due to automatic review settings November 2, 2025 22:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for configuring GitHub MCP toolsets by introducing a new github-mcp-toolsets input parameter. This allows users to specify which toolsets (e.g., repos, issues, pull_requests, actions, code_security) should be enabled when connecting to the GitHub MCP server, providing more granular control over available tools.

Key changes:

  • Added github-mcp-toolsets input parameter to action.yml with detailed description
  • Modified connectToGitHubMCP function to accept optional toolsets parameter and include it in the X-MCP-Toolsets header when specified
  • Updated README documentation with usage examples and reference to available toolsets
  • Added comprehensive test coverage for the new functionality

Reviewed Changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/mcp.ts Added optional toolsets parameter to connectToGitHubMCP function and logic to conditionally set X-MCP-Toolsets header
src/main.ts Retrieved github-mcp-toolsets input and passed it to connectToGitHubMCP function
dist/index.js Compiled JavaScript output reflecting the TypeScript changes
action.yml Added new github-mcp-toolsets input with comprehensive description of available options
tests/mcp.test.ts Added three new test cases covering default, custom, and empty toolsets scenarios
tests/main.test.ts Updated existing test expectations to include empty string for toolsets parameter
README.md Added new section documenting toolsets configuration with examples, updated version references from v1/v1.2 to v2, and updated inputs table

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@abhivarma007
Copy link

@maartenvandiemen thanks for creating the fix to this issue, can I expect by when this will be resolved?

@maartenvandiemen
Copy link
Contributor Author

maartenvandiemen commented Nov 3, 2025

@maartenvandiemen thanks for creating the fix to this issue, can I expect by when this will be resolved?

That's depends on the feedback on this PR and when I get it. For the time being I use the version of my PR. Example:

      - name: Run AI inference with prompt file
        id: ai
        uses: maartenvandiemen/ai-inference@feature/pass-toolsets
        with:

Hopefully your policies allow this. Once this PR is merged you will notice it soon enough, the branch will be deleted.

@abhivarma007
Copy link

Unfortunately, our enterprise settings won't allow to use this action. Just waiting for team to approve the changes.

sgoedecke
sgoedecke previously approved these changes Nov 23, 2025
sgoedecke
sgoedecke previously approved these changes Nov 23, 2025
@sgoedecke
Copy link
Contributor

@maartenvandiemen Apologies for the delayed review. If you fix the linting errors, I'll re-approve and merge. Please ping me with @sgoedecke when you do - that way I'll see it immediately.

Maarten van Diemen and others added 3 commits November 24, 2025 13:16
@maartenvandiemen
Copy link
Contributor Author

@sgoedecke thanks for the review! To be honest I have no clue what is causing the yaml linting issues. I executed the commands locally (Windows) and I don't get any errors. Let's give it another try?

@sgoedecke
Copy link
Contributor

@maartenvandiemen I see this in the logs:

MARKDOWN
  2025-11-24 22:39:12 [INFO]   Linting MARKDOWN items...
  Error: -24 22:39:14 [ERROR]   Found errors when linting MARKDOWN. Exit code: 1.
  2025-11-24 22:39:14 [INFO]   Stderr contents for MARKDOWN:
  ------
  /github/workspace/README.md:211:6 MD034/no-bare-urls Bare URL used [Context: "https://github.com/github/gith..."]

Looks like you need to make that a link

Maarten van Diemen added 2 commits November 26, 2025 22:58
@maartenvandiemen
Copy link
Contributor Author

@sgoedecke thanks for pointing me in the right direction. I've fixed it.

I've updated as well all the GitHub Actions to the latest versions available.

@sgoedecke
Copy link
Contributor

Hmm, I wonder if by bumping the linter you've brought in a bunch more linting rules, which are now failing. Up to you if you want to reverse that bump or add fixes/ignores for the new rules.

@sgoedecke sgoedecke merged commit 334892b into actions:main Nov 30, 2025
6 checks passed
@sgoedecke
Copy link
Contributor

@maartenvandiemen Thank you for your patience! I'll cut a new release now.

@maartenvandiemen
Copy link
Contributor Author

@maartenvandiemen Thank you for your patience! I'll cut a new release now.

Thank you as well! Could you also close issue #138? This PR resolves it🙂

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.

4 participants