Skip to content

Conversation

@MayorFaj
Copy link
Contributor

@MayorFaj MayorFaj commented Oct 12, 2025

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:

  • list_org_packages - List all packages for an organization with optional filters (package_type, visibility)
  • get_org_package - Get detailed information about a specific organization package
  • list_package_versions - List all versions of a package with optional state filter
  • get_package_version - Get detailed information about a specific package version
  • list_user_packages - List all packages for a user with optional filters (package_type, visibility)
    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:

  • delete_org_package - Delete an entire organization package (all versions)
  • delete_org_package_version - Delete a specific version of an organization package
  • delete_user_package - Delete an entire user package (all versions)
  • delete_user_package_version - Delete a specific version of a user package
    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
Screenshot 2025-10-12 at 20 06 47

- 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.
Copilot AI review requested due to automatic review settings October 12, 2025 19:09
@MayorFaj MayorFaj requested a review from a team as a code owner October 12, 2025 19:09
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 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.

@MayorFaj
Copy link
Contributor Author

Screenshot 2025-10-12 at 20 14 25

MayorFaj and others added 6 commits October 21, 2025 14:27
…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.
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.

Add GitHub Packages Support to MCP Server

2 participants