Title: enable linking branch via mcp · Issue #2720 · github/github-mcp-server · GitHub
Open Graph Title: enable linking branch via mcp · Issue #2720 · github/github-mcp-server
X Title: enable linking branch via mcp · Issue #2720 · github/github-mcp-server
Description: ###Describe the feature or problem you'd like to solve When working with GitHub issues in an agentic workflow, creating a branch that is properly linked to an issue via the Development section requires either the GraphQL createLinkedBran...
Open Graph Description: ###Describe the feature or problem you'd like to solve When working with GitHub issues in an agentic workflow, creating a branch that is properly linked to an issue via the Development section requ...
X Description: ###Describe the feature or problem you'd like to solve When working with GitHub issues in an agentic workflow, creating a branch that is properly linked to an issue via the Development section ...
Opengraph URL: https://github.com/github/github-mcp-server/issues/2720
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"enable linking branch via mcp","articleBody":"###Describe the feature or problem you'd like to solve\n\nWhen working with GitHub issues in an agentic workflow, creating a branch that is properly linked to an issue via the Development section requires either the GraphQL createLinkedBranch mutation or the REST endpoint POST /repos/{owner}/{repo}/issues/{issue_number}/branches. The current create_branch tool only accepts branch, from_branch, owner, and repo — with no way to associate the branch with an issue.\n\nAs a result, branches created by AI agents appear unlinked in the GitHub UI, breaking the issue → branch → PR traceability chain that teams rely on for project tracking.\n\n### Proposed solution\n\nAdd an optional issue_number parameter to the existing create_branch tool (or expose a new create_linked_branch tool) that calls POST /repos/{owner}/{repo}/issues/{issue_number}/branches. When provided, the created branch automatically appears in the issue's Development section, closing the gap in the issue lifecycle.\n\nThis mirrors the behavior of gh issue develop #N --branch-name my-branch in the GitHub CLI.\n\n### Example prompts or workflows (for tools/toolsets only)\n\nAgentic development loop — \"Fix issue #42\" → agent creates issue, calls create_branch with issue_number: 42, pushes commits, opens PR with Closes #42. The full issue lifecycle is traceable in the GitHub UI without any manual steps.\n\nProject board automation — Teams using GitHub Projects can see the branch linked directly on the issue card, giving PMs visibility into which issues are actively being worked on before the PR is opened.\n\nMulti-agent workflows — A planning agent creates the issue and the linked branch, then hands off to a coding agent. The Development section link makes it unambiguous which branch belongs to which issue across agents.\n\nQA-to-dev handoff — A QA agent files a bug report (issue), a dev agent immediately creates a linked branch. The Development link is visible to the QA agent when it checks the issue status later to verify the fix.\n\nAdditional context\nThe GitHub REST API already supports this via POST /repos/{owner}/{repo}/issues/{issue_number}/branches (documented at https://docs.github.com/en/rest/issues/issues#create-a-branch-for-an-issue). This is a thin wrapper — no new authentication scope is required beyond what create_branch already uses. The only addition needed is passing issue_number in the request body.\n","author":{"url":"https://github.com/rvaldomir","@type":"Person","name":"rvaldomir"},"datePublished":"2026-06-17T15:45:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2720/github-mcp-server/issues/2720"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bc927893-74b3-f2cc-c02c-5f0d44e2d46c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B7FE:3FFD58:4B0BD7:64B7CE:6A61779B |
| html-safe-nonce | aa87ec15eb3c66bf74451adbd89c6bcd233e30d5ff1faaf4f4cb4149331ec5c1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCN0ZFOjNGRkQ1ODo0QjBCRDc6NjRCN0NFOjZBNjE3NzlCIiwidmlzaXRvcl9pZCI6IjI3ODU4ODU4MDE5NTU4MTczNzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 21dd764137375423f2e599ac6199f7f841d57ad3ea6e0361122300ab162ee029 |
| hovercard-subject-tag | issue:4684827261 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/2720/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b0e18f6674c72af0f5a98c7c8893beec4310f6a2edb23db35c8633f5b7142222/github/github-mcp-server/issues/2720 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b0e18f6674c72af0f5a98c7c8893beec4310f6a2edb23db35c8633f5b7142222/github/github-mcp-server/issues/2720 |
| og:image:alt | ###Describe the feature or problem you'd like to solve When working with GitHub issues in an agentic workflow, creating a branch that is properly linked to an issue via the Development section requ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rvaldomir |
| hostname | github.com |
| expected-hostname | github.com |
| None | b05bb6314e7e93021a7b7dab54a85cbe48d821938e762c1dff815efd60699622 |
| turbo-cache-control | no-preview |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 94389bfdcd393b0a5a274aee94e8a9739d063fe5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width