Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A public Model Context Protocol (MCP) server, running as a Cloudflare Worker, that turns a GitHub repository or a documentation site into agent-ready context. Point an AI agent at it and it can pack a whole repo (or crawl a docs site) into one token-counted blob β or search it and get back only the relevant passages, each with its file/URL and line.
It's the agent-first companion to mcp/: where mcp reads a single
web page, ctx reads whole repos and doc sites. The repo pipeline fetches,
gunzips and parses the tarball in-process; docs extraction reuses Mozilla
Readability + Turndown.
| Tool | Input | Returns |
|---|---|---|
pack_repo | { repo, ref?, include?, exclude?, max_tokens? } | The repo as one context blob with ==== path ==== headers + token estimate |
search_context | { repo, query, ref?, include?, exclude?, max_matches?, context_chars? } | Only the passages matching query, each with file, line and score |
list_files | { repo, ref?, include?, exclude? } | JSON: the text files ctx would include, with byte sizes |
get_file | { repo, path, ref? } | The full text of a single file |
pack_docs | { url, depth?, max_pages?, max_tokens? } | A crawled docs site as one context blob (each page β Markdown) |
search_docs | { url, query, depth?, max_pages?, max_matches?, context_chars? } | Only the docs passages matching query, each with page URL, line and score |
repo is owner/repo, owner/repo/ref, or a github.com URL. url (for the
docs tools) is an absolute http(s) docs page to start crawling from.
Stdio-only clients bridge with npx mcp-remote https://ctx.vanshul.com/mcp.
~/.cursor/mcp.json:
claude_desktop_config.json (Settings β Developer β Edit Config). If your version is stdio-only, use:
ctx with URL https://ctx.vanshul.com/mcp to your MCP servers config.The GitHub URL is always constructed from a fixed owner/repo slug, so the repo
tools have no SSRF surface. The docs tools fetch caller-supplied URLs, so every
URL and redirect hop is re-validated against the SSRF guard. Downloads are
bounded (timeout, size caps, page/file-count caps) and results are cached
per-isolate for a few minutes.
Set a GITHUB_TOKEN Worker secret to lift GitHub's rate limit (60 β 5,000/hour) and
read private repos:
The token is a Worker secret only β never a tool argument β so it can't leak to an agent.
MIT Β© Vanshul Goyal
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ctx)<a href="https://allmcps.com/mcp/ctx"><img src="https://allmcps.com/api/badge/ctx?style=directory" alt="Ctx on AllMCPs" /></a>