Skip to content

docs(examples): GH_TOKEN is required for example 54's GitHub MCP, not optional - #163

Open
ling-senpeng13 wants to merge 1 commit into
mainfrom
docs/example-54-gh-token-required
Open

docs(examples): GH_TOKEN is required for example 54's GitHub MCP, not optional#163
ling-senpeng13 wants to merge 1 commit into
mainfrom
docs/example-54-gh-token-required

Conversation

@ling-senpeng13

@ling-senpeng13 ling-senpeng13 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

One-line doc fix in examples/agents/54-software-bug-assistant.ts.

The header comment claimed GH_TOKEN is optional, but without it the example builds Authorization: Bearer (empty credential) and the run fails deep inside MCP tool listing with a misleading error:

HTTP 400 error from MCP server: bad request: Authorization header is badly formatted

The default api.githubcopilot.com/mcp/ endpoint requires authentication (without the header it returns 401 "missing required Authorization header"), so the token is semantically required — the ?? '' fallback only converts a missing-config error into a malformed-request error. This documents it as required and shows the quickest way to set it (export GH_TOKEN=$(gh auth token)).

No code behavior changes. Verified the example passes end-to-end against conductor-oss 3.32.0-rc18 with a real token (COMPLETED, 11 tool calls incl. live GitHub MCP).

For parity: python-sdk's 54_software_bug_assistant.py already documents GH_TOKEN as a plain requirement.

… optional

Without GH_TOKEN the example sends 'Authorization: Bearer ' (empty) and
the run fails with a misleading MCP 400. The default
api.githubcopilot.com/mcp/ endpoint requires authentication, so document
the token as required and show how to set it from the gh CLI.
@ling-senpeng13
ling-senpeng13 force-pushed the docs/example-54-gh-token-required branch from 60091cb to 2f77014 Compare August 14, 2026 23:50
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.

1 participant