Labsco
MCP SERVER

GitPrism

by cougz

Turn any public GitHub repository into LLM-ready Markdown at four levels of detail — summary, tree, file list, or the whole thing.

Codebase Context Packing & Compression
Summary
The detail dial is the whole trick.

Pulling an entire repository into a context window is usually the wrong move; asking for the structure first and then the files that matter is the right one, and this makes that a parameter rather than a manual step. Caching keyed on the resolved commit SHA means a repeat request for an unchanged repository is free and a request after a push is not stale — which is the correct behaviour and rarer than it sounds. Only the root `.gitignore` is evaluated; nested ones are not, and the project says so.

What it is

A stateless converter from a GitHub URL to Markdown a model can read. It downloads the repository zipball, filters out the noise, and formats what is left — with a detail dial so you can take a directory tree when that is all you need instead of the entire source.

What you get
  • A repository converted to Markdown from a GitHub URL or an `owner/repo` shorthand, at a chosen level of detail — `ingest_repo`
  • Four detail levels: `summary` for front-matter with repo name, ref, file count and total size; `structure` for that plus a directory tree; `file-list` for a table of every included file with byte size and line count; and `full` for the complete file contents in fenced code blocks, streamed
  • Aggressive default filtering: lock files, minified bundles, build and dependency directories, binaries by extension, and any file with null bytes in its first 8 KB
  • The repository's root `.gitignore` honoured, including wildcards, directory patterns, rooted patterns and negations
  • Response headers carrying the resolved commit SHA, file count, total size, whether output was truncated and the remaining GitHub rate limit
Requirements

No account needed for the hosted service — point any MCP client at `https://gitprism.cloudemo.org/mcp`. Without a token you get 30 requests per minute per IP; passing your own GitHub personal access token as `github_token` on the call switches you to your own quota of 5,000 requests per hour. The token needs only contents read-only on public repositories. Self-hosting is a Cloudflare Worker: `npm install`, `npm run build`, `npx wrangler secret put GITHUB_TOKEN`, `npx wrangler deploy`. Limits are configurable — 50 MB maximum archive, 10 MB maximum output, 5,000 files — and results are cached for 24 hours keyed on the resolved commit SHA.