# GitHub MCP failing to start

**URL:** <https://forum.cursor.com/t/github-mcp-failing-to-start/153617>\
**Category:** Help\
**Tags:** mcp, github\
**Created:** [March 4, 2026, 8:53pm UTC](https://forum.cursor.com/t/github-mcp-failing-to-start/153617 "2026-03-04T20:53:28Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![OmryA](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/omrya/32/110667_2.png) [@OmryA](https://forum.cursor.com/u/OmryA)\
**Post date:** [December 3, 2026, 11:52pm UTC](https://forum.cursor.com/t/github-mcp-failing-to-start/153617/7 "2026-12-03T23:52:40Z")

</div>

This is probably the cause of the “Authorization header is badly formatted” error here: Grok Build leaves `${env:NAME}` unresolved in `mcp.json` when `NAME` ends in `_TOKEN` or `_KEY`. The GitHub server then receives the literal text `Bearer ${env:CURSOR_GITHUB_TOKEN}` and rejects it as badly formatted.

Details and a reproduction are in [${env:NAME} in mcp.json is not resolved when NAME ends in \_TOKEN or \_KEY](https://forum.cursor.com/t/env-name-in-mcp-json-is-not-resolved-when-name-ends-in-token-or-key/179948).

**Workaround:** copy the token into a variable whose name doesn’t end in `_TOKEN` or `_KEY`, then restart:

```bash
export CURSOR_GITHUB_AUTH="$CURSOR_GITHUB_TOKEN"
launchctl setenv CURSOR_GITHUB_AUTH "$CURSOR_GITHUB_AUTH" # macOS, so the app sees it

```

```json
"headers": { "Authorization": "Bearer ${env:CURSOR_GITHUB_AUTH}" }

```

---

_[View the full topic](https://forum.cursor.com/t/github-mcp-failing-to-start/153617)._
