GitHub But Fast
GitHub But Fast
GitHub, but with fewer model/tool round trips.
GitHub But Fast (GBF) is a read-only, token-efficient remote MCP gateway for GitHub. It uses Cloudflare Code Mode so an MCP-capable AI agent can discover GitHub REST endpoints and execute many fresh reads in one sandboxed JavaScript program, then return only the compact result it needs.
GBF is intended for ChatGPT, Claude Code, Cursor, Codex/Astra, and other clients that can connect to a remote MCP server. It is an accelerator, not a source of truth: GitHub remains authoritative, and clients should be able to fall back to their normal GitHub integration if GBF is unavailable.
Why
A typical agent takeover can otherwise look like:
model -> fetch file -> model -> fetch issue -> model -> fetch comments -> model -> fetch PR -> ...GBF moves the mechanical GitHub fan-out into Code Mode:
agent -> search (when needed) -> execute
|-> GitHub file
|-> GitHub issue/comments
|-> GitHub PR/checks
`-> compact resultCloudflare's current openApiMcpServer() exposes two MCP tools: search and execute. execute runs model-written JavaScript in an isolated Worker sandbox; authentication and outbound GitHub requests stay in trusted host code.
V1 safety model
V1 is deliberately boring:
read-only: model-triggered requests may use only
GETorHEADrepository allowlist:
/repos/{owner}/{repo}/...must target a configured repositoryrepo-scoped search only:
/search/*queries must includerepo:owner/namecanonical-path validation: dot-segment and host-escape normalization tricks are rejected
host-side revalidation: even if generated code asks for a mutation, the host rejects it
GitHub App auth: the Worker mints short-lived installation tokens; no long-lived PAT is exposed to the sandbox
response cap: oversized API responses are rejected with a hint to narrow/paginate
sandbox has no GitHub credential
Code Mode is currently experimental upstream. GBF should therefore remain an optional fast path, never a required control-plane dependency.
Upstream building blocks
GBF intentionally does not reimplement GitHub or MCP plumbing:
Cloudflare
@cloudflare/codemode+ the officialcodemode-mcp-openapipatternGitHub's official
github/rest-api-descriptionOpenAPI documentGitHub App installation authentication
Local development
npm install
cp .dev.vars.example .dev.vars
# fill in local test credentials
npm test
npm run typecheck
npm run build
npm run devThe remote MCP endpoint is /mcp; /health is unauthenticated and exposes no repository data.
Configuration
Required Worker secrets/variables:
Name | Purpose |
| GitHub App ID |
| Installation ID for the selected account/repositories |
| GitHub App private key; secret, never commit |
| Comma-separated |
| Temporary V1 client authentication for |
| Optional response cap; defaults to 1,500,000 bytes |
V1 uses a static bearer token only as a staging bootstrap. Before broad multi-client rollout, replace this with a proper OAuth/Cloudflare Access flow.
Status
Source bootstrap is green in draft PR #1: unit tests, TypeScript checks, and Wrangler dry-run bundling pass. No production deployment or live GitHub-App smoke is claimed yet.
Setup docs:
docs/SETUP.md— durable 15-step checklistdocs/GITHUB_APP.md— minimal read-only GitHub App setupdocs/CLOUDFLARE.md— Workers staging/deployment setupdocs/ARCHITECTURE.md— trust boundaries and failure modeldocs/ROLLOUT.md— benchmark and multi-client rollout gates
License
MIT. Portions of the architecture and server pattern are adapted from Cloudflare's MIT-licensed agents Code Mode examples; see NOTICE.