File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,6 +177,21 @@ COPY support/docs/ /opt/pi-support/docs/
177177COPY support/schemas/ /opt/pi-support/schemas/
178178RUN chmod +x /opt/pi-support/browser-state-cleanup.sh
179179
180+ # ── GitHub MCP Server binary ──
181+ # Pre-built binary for the github-mcp-server MCP server (stdio mode).
182+ # Config: localpibox/config → mcp.json → command: /home/lpb/.local/pi-support/bin/github-mcp-server
183+ # Auth: GITHUB_TOKEN resolved at runtime from gh auth token via start.sh
184+ # Toolsets: GITHUB_TOOLSETS resolved at runtime (all = enable everything)
185+ ARG GITHUB_MCP_SERVER_VERSION=v1.8.0
186+ RUN set -eux; \
187+ curl -fsSL "https://github.com/github/github-mcp-server/releases/download/${GITHUB_MCP_SERVER_VERSION}/github-mcp-server_${GITHUB_MCP_SERVER_VERSION#v}_Linux_x86_64.tar.gz" \
188+ -o /tmp/github-mcp-server.tar.gz; \
189+ mkdir -p /home/lpb/.local/pi-support/bin; \
190+ tar -xzf /tmp/github-mcp-server.tar.gz -C /home/lpb/.local/pi-support/bin; \
191+ chmod +x /home/lpb/.local/pi-support/bin/github-mcp-server; \
192+ rm -f /tmp/github-mcp-server.tar.gz; \
193+ chown -R 1000:1000 /home/lpb/.local/pi-support
194+
180195# ── Devstack deployment scripts ──
181196COPY support/install-browser.sh /opt/devstack/install-browser.sh
182197COPY support/validate.sh /opt/devstack/validate.sh
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ LPB_CONTEXT7_API_KEY=
6464# Dynamic: fetched from `gh auth token` if gh CLI is installed & logged in.
6565# Fallback: set LPB_GITHUB_TOKEN manually or via shell env (highest priority).
6666LPB_GITHUB_TOKEN = $( gh auth token 2> /dev/null || true )
67+ LPB_GITHUB_TOOLSETS = all
6768
6869# ─── Misc ───────────────────────────────────────────────────────────────
6970# Persist gh CLI auth to ~/.config/gh inside container
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # install-github-mcp-server.sh — Download and install the GitHub MCP Server
3+ # pre-built binary into /home/lpb/.local/pi-support/bin/
4+ #
5+ # Usage:
6+ # ./install-github-mcp-server.sh # latest release (default)
7+ # ./install-github-mcp-server.sh v1.8.0 # specific version
8+ #
9+ # The binary is consumed by the github-mcp-server MCP server entry in
10+ # ~/.pi/agent/mcp.json (sourced from localpibox/config repo).
11+
12+ set -euo pipefail
13+
14+ VERSION=" ${1:- latest} "
15+ BINARY_DIR=" /home/lpb/.local/pi-support/bin"
16+ REPO=" github/github-mcp-server"
17+
18+ # Resolve version
19+ if [ " $VERSION " = " latest" ]; then
20+ VERSION=$( curl -fsSL " https://api.github.com/repos/${REPO} /releases/latest" | jq -r ' .tag_name' )
21+ echo " Latest version: ${VERSION} "
22+ fi
23+
24+ # Architecture detection
25+ ARCH=$( dpkg --print-architecture)
26+ case " $ARCH " in
27+ amd64) OS_ARCH=" Linux_x86_64" ;;
28+ arm64) OS_ARCH=" Linux_arm64" ;;
29+ * ) echo " ERROR: Unsupported architecture: $ARCH " >&2 ; exit 1 ;;
30+ esac
31+
32+ TARBALL=" github-mcp-server_${VERSION# v} _${OS_ARCH} .tar.gz"
33+ DOWNLOAD_URL=" https://github.com/${REPO} /releases/download/${VERSION} /${TARBALL} "
34+
35+ echo " Installing GitHub MCP Server ${VERSION} (${OS_ARCH} )..."
36+ mkdir -p " $BINARY_DIR "
37+
38+ curl -fsSL " $DOWNLOAD_URL " -o " /tmp/${TARBALL} "
39+ tar -xzf " /tmp/${TARBALL} " -C " $BINARY_DIR "
40+ rm -f " /tmp/${TARBALL} "
41+
42+ chmod +x " ${BINARY_DIR} /github-mcp-server"
43+ echo " Installed: ${BINARY_DIR} /github-mcp-server"
Original file line number Diff line number Diff line change @@ -120,6 +120,12 @@ export LPB_AGENT_BROWSER_SESSION="${LPB_AGENT_BROWSER_SESSION:-${PI_WORKTREE_ID:
120120# ── Exa API key ──
121121export LPB_EXA_API_KEY= " ${LPB_EXA_API_KEY:- ${EXA_API_KEY:- } } "
122122
123+ # ── GitHub Token (from gh auth token or shell env) ──
124+ export LPB_GITHUB_TOKEN= " ${LPB_GITHUB_TOKEN:- ${GITHUB_TOKEN:- $(gh auth token 2>/ dev/ null || true)} } "
125+
126+ # ── GitHub MCP Server toolsets ──
127+ export GITHUB_TOOLSETS= " ${GITHUB_TOOLSETS:- ${LPB_GITHUB_TOOLSETS:- all} } "
128+
123129# ── Persistence flags ──
124130export LPB_PERSIST_GH_CONFIG= " ${LPB_PERSIST_GH_CONFIG:- true} "
125131
You can’t perform that action at this time.
0 commit comments