From 5c41b09e01a9987895231cd8e9472befaf7e3155 Mon Sep 17 00:00:00 2001 From: Muhammad Moiz <5123355+m2moiz@users.noreply.github.com> Date: Mon, 31 Aug 2026 04:26:48 +0200 Subject: [PATCH] fix(github-issues): quote array params for zsh, correct stale MCP write claim (#2864) `-f labels[]="bug"` fails under zsh, the default shell on macOS, because `[]` is a glob pattern. The argument never reaches gh. Quote the whole `name[]=value` pair instead. The skill also states the MCP server cannot create, update, or comment on issues. github-mcp-server ships issue_write, add_issue_comment, and sub_issue_write. Documented them and reworded the CLI section; the gh api examples are unchanged. --- skills/github-issues/SKILL.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/skills/github-issues/SKILL.md b/skills/github-issues/SKILL.md index 030f7405..85be7878 100644 --- a/skills/github-issues/SKILL.md +++ b/skills/github-issues/SKILL.md @@ -20,9 +20,17 @@ Manage GitHub issues using the `@modelcontextprotocol/server-github` MCP server. | `mcp__github__projects_get` | Get details of a project, field, item, or status update | | `mcp__github__projects_write` | Add/update/delete project items, create status updates | +### MCP Tools (write operations) + +| Tool | Purpose | +|------|---------| +| `mcp__github__issue_write` | Create or update an issue (methods: create, update). Supports title, body, type, labels, assignees, milestone, and issue fields | +| `mcp__github__add_issue_comment` | Add a comment or a reaction to an issue | +| `mcp__github__sub_issue_write` | Add, remove, or reprioritize a sub-issue | + ### CLI / REST API (write operations) -The MCP server does not currently support creating, updating, or commenting on issues. Use `gh api` for these operations. +`gh api` performs the same writes and is the form used in the examples below. Reach for it when the MCP server is not connected, or when you need a REST field the MCP tools do not expose. | Operation | Command | |-----------|---------| @@ -61,11 +69,18 @@ Add any of these flags to the `gh api` call: ``` -f type="Bug" # Issue type (Bug, Feature, Task, Epic, etc.) --f labels[]="bug" # Labels (repeat for multiple) --f assignees[]="username" # Assignees (repeat for multiple) +-f 'labels[]=bug' # Labels (repeat for multiple) +-f 'assignees[]=username' # Assignees (repeat for multiple) -f milestone=1 # Milestone number ``` +**Quote the whole `name[]=value` pair.** `[]` is a glob pattern in zsh, the default shell +on macOS, so an unquoted `-f labels[]=bug` never reaches `gh`: + +``` +zsh: no matches found: labels[]=bug +``` + **Issue types** are organization-level metadata. To discover available types, use: ```bash gh api graphql -f query='{ organization(login: "ORG") { issueTypes(first: 10) { nodes { name } } } }' --jq '.data.organization.issueTypes.nodes[].name' @@ -145,7 +160,7 @@ gh api repos/github/awesome-copilot/issues \ -X POST \ -f title="Add dark mode support" \ -f type="Feature" \ - -f labels[]="high-priority" \ + -f 'labels[]=high-priority' \ -f body="## Summary Add dark mode theme option for improved user experience and accessibility.