Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,18 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
{
"mcpServers": {
"gh-attach": {
"command": "gh",
"args": ["attach", "mcp", "--transport", "stdio"]
"command": "bash",
"args": [
"-lc",
"export GITHUB_TOKEN=\"$(gh auth token)\" && exec gh attach mcp --transport stdio"
]
}
}
}
```

This wrapper requires `bash` and an authenticated GitHub CLI session (`gh auth login`). It resolves the token at startup instead of storing it in the config file, but the token is still present in the MCP server process environment while it is running. If `bash` is unavailable, use the standalone CLI setup instead.

### VS Code / GitHub Copilot

Add to `.vscode/settings.json`:
Expand Down Expand Up @@ -203,15 +208,20 @@ Add to `.vscode/settings.json`:
"servers": {
"gh-attach": {
"type": "local",
"command": "gh",
"args": ["attach", "mcp", "--transport", "stdio"],
"command": "bash",
"args": [
"-lc",
"export GITHUB_TOKEN=\"$(gh auth token)\" && exec gh attach mcp --transport stdio"
],
"tools": ["*"]
}
}
}
}
```

This wrapper requires `bash` and an authenticated GitHub CLI session (`gh auth login`). It resolves the token at startup instead of storing it in the config file, but the token is still present in the MCP server process environment while it is running. If `bash` is unavailable, use the standalone CLI setup instead.

If you prefer `npx`, use `command: "npx"` and prepend `--registry=https://npm.pkg.github.com`, `@addono/gh-attach` to the `args` array.

## Configuration
Expand Down