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

Enhancement: Add organization support to repository creation #530

Open
kevinkre opened this issue Jan 16, 2025 · 0 comments
Open

Enhancement: Add organization support to repository creation #530

kevinkre opened this issue Jan 16, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@kevinkre
Copy link

Current Limitation

The create_repository MCP tool currently only creates repositories in the authenticated user's personal account. It uses the GitHub API endpoint /user/repos which doesn't support organization repository creation.

Workaround

Until this is implemented, create the organization repo first. The rest of the tools will work it seems. You can create organization repositories either:

  1. Through the GitHub website interface
  2. Using the GitHub API directly via curl:
curl -H "Authorization: Bearer YOUR_GITHUB_PERSONAL_ACCESS_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"name": "NEW-REPO-NAME", "private": false}' \
     https://api.github.com/orgs/YOUR_ORGANIZATION/repos

Proposed Enhancement

Add a new MCP tool create_org_repository that maps to the GitHub API endpoint /orgs/{org}/repos. The tool should include an additional required parameter:

{
  "organization": {
    "type": "string",
    "name": "Name of the organization where the repository should be created"
  }
}

Note

All other GitHub MCP tools (push_files, get_file_contents, etc.) work correctly with organization repositories once they are created - you just need to specify the correct organization name as the owner parameter.

Impact

This enhancement would make it easier to automate repository creation in organizational contexts, particularly important for teams using MCP tools for project setup and management.

@kevinkre kevinkre added the enhancement New feature or request label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant