📦
Source
vs code extension to bridge the gap between agents and documentation
0 installs
Trust: 34 — Low
Docs
Ask AI about Source
Powered by Claude · Grounded in docs
I know everything about Source. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
Source
Source is a VS Code extension that brings documentation indexing and MCP tooling directly into the IDE. It crawls and indexes documentation sites, then exposes them to coding agents through MCP so agents reference real docs instead of hallucinating.

How It Works
- Paste a documentation URL into the sidebar input.
- Source crawls the site (using sitemaps when available, falling back to link crawling).
- The crawled pages are indexed with BM25 and stored locally in a
.sourcedirectory. - A
search_docsMCP tool is registered so agents like Gemini CLI and Claude Code can query the indexed docs by keyword. - Agent rule files are written automatically so the agents know to call
search_docsbefore relying on training data.
Supported Agents
- Antigravity -- writes rules to
.agent/rules/and configures~/.gemini/antigravity/mcp_config.json - Claude Code -- writes a
CLAUDE.mdfile and configures.mcp.jsonin the workspace root
Project Structure
src/
extension.ts -- VS Code extension entry point and webview UI
crawler.ts -- Sitemap parser and recursive link crawler
mcpServer.ts -- MCP server with search_docs tool and BM25 index
ruleWriter.ts -- Generates agent-specific rule and config files
media/
main.js -- Webview client-side logic
Dependencies
- @modelcontextprotocol/sdk -- MCP server implementation
- cheerio -- HTML parsing and crawling
- minisearch -- BM25 full-text search index
- node-fetch -- HTTP requests for crawling
- zod -- Schema validation for MCP tool inputs
Development
npm install
npm run compile
Press F5 in VS Code to launch the Extension Development Host.
Usage
- Open a project in VS Code.
- Click the Source icon in the activity bar.
- Enter a documentation URL (e.g.
https://docs.example.com/getting-started). - Wait for crawling to finish. The indexed source will appear in the sidebar.
- Your coding agent will now use the
search_docsMCP tool to query the indexed docs.
To remove a source, click the remove button next to it in the sidebar.
License
MIT
