-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: Add GitHub Packages toolset #1209
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
base: main
Are you sure you want to change the base?
Conversation
- Introduced new tools for managing GitHub Packages, including listing, retrieving, and deleting packages and their versions. - Implemented comprehensive unit tests for the new package-related tools to ensure functionality and error handling. - Updated toolset metadata to include the new packages tools in the available tools list.
There was a problem hiding this 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 introduces a comprehensive GitHub Packages toolset to the GitHub MCP Server, enabling management and retrieval of package information for both organizations and users. The addition provides nine package-related operations including listing, retrieving details, and deletion capabilities for packages and their versions.
- Adds a new "packages" toolset with read/write operations for managing GitHub packages
- Implements comprehensive test coverage for all package operations with proper error handling scenarios
- Updates documentation to include the new packages toolset with detailed tool descriptions
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/tools.go | Adds packages toolset metadata and integrates it into the default toolset group |
| pkg/github/packages.go | Implements all package-related operations with proper error handling and API interactions |
| pkg/github/packages_test.go | Comprehensive test suite covering all package operations with success and error scenarios |
| pkg/github/toolsnaps/*.snap | Generated tool snapshots for all package operations with proper schema definitions |
| docs/remote-server.md | Documents the new packages toolset with installation links |
| README.md | Updates toolset list and adds detailed package tool documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…under PackagesRead and PackagesWrite - Updated test cases to reflect new function names and structures. - Replaced ListOrgPackages, GetOrgPackage, ListPackageVersions, and GetPackageVersion with PackagesRead. - Replaced ListUserPackages with PackagesWrite. - Adjusted input schema and annotations for read-only and write operations. - Enhanced deletion tests for organization and user packages and their versions.

This pull request introduces GitHub Packages support to the GitHub MCP Server, enabling AI agents to manage and retrieve GitHub Packages for both organizations and users through two consolidated MCP tools.
New Features:
1. Packages Read Tool (packages_read)
Consolidated read-only tool for retrieving package information
Supports 5 methods:
Includes pagination support for list operations
Properly handles response body cleanup and error reporting
2. Packages Write Tool (packages_write)
Consolidated write tool for package deletion operations
Requires delete:packages scope
Supports 4 methods:
Returns standardized success/failure responses
Implementation Details:
Documentation Updates:
Updated README.md with packages tool details
Added packages to default toolset configuration
Documented all available methods and their parameters
Note: Download statistics are not available through the GitHub REST API and are not included in responses, though they are visible on the GitHub web interface.
Closes: #1208
