Add GitHub MCP server setup to install.sh (PAT via env var)

This commit is contained in:
2026-06-07 21:03:43 +01:00
parent f5a7a70d01
commit 2ee99e6ad4
2 changed files with 16 additions and 1 deletions
+15
View File
@@ -44,5 +44,20 @@ else
echo " WARNING: npm not found — install the Codex CLI manually: npm install -g @openai/codex"
fi
# GitHub MCP server (PAT-based, stdio)
if command -v claude >/dev/null 2>&1; then
if [ -n "${GITHUB_PERSONAL_ACCESS_TOKEN:-}" ]; then
echo " Setting up GitHub MCP server..."
claude mcp remove github -s user 2>/dev/null || true
claude mcp add github -s user \
-e GITHUB_PERSONAL_ACCESS_TOKEN="$GITHUB_PERSONAL_ACCESS_TOKEN" \
-- npx -y @modelcontextprotocol/server-github \
&& echo " Installed: GitHub MCP server" \
|| echo " WARNING: GitHub MCP server setup failed — run manually: claude mcp add github -s user -e GITHUB_PERSONAL_ACCESS_TOKEN=<token> -- npx -y @modelcontextprotocol/server-github"
else
echo " Skipping GitHub MCP server — set GITHUB_PERSONAL_ACCESS_TOKEN before running to enable"
fi
fi
echo ""
echo "Done. Restart Claude Code for settings to take effect."
+1 -1
View File
@@ -2,7 +2,7 @@
"cleanupPeriodDays": 30,
"env": {
"MAX_THINKING_TOKENS": "8000",
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "50",
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "50"
},
"permissions": {
"allow": [