Search Bun documentation directly in Zed using the Model Context Protocol (MCP).
Pure Rust implementation with zero runtime dependencies.
- π Search Bun Docs - Query Bun documentation from Zed Assistant
- β‘ Pure Rust - Native binary with automatic download from GitHub Releases
- πͺΆ Lightweight - 1.3 MB compressed, 2.7 MB extracted
- π Fast - 4ms startup time
- π Multi-Platform - Supports Linux, macOS, Windows (x86_64/ARM64)
- π Auto-Update - Downloads latest binary on installation
- Open Zed
- Cmd+Shift+X (macOS) or
Ctrl+Shift+X (Linux/Windows)
βExtensions - Search: "Bun Docs MCP"
- Click Install
# Clone this repository
git clone https://github.com/kjanat/bun-docs-mcp-zed
cd bun-docs-mcp-zedThen, install in Zed:
- Press Cmd+Shift+P (macOS) or
Ctrl+Shift+P (Linux/Windows) - Type: "zed: install dev extension"
- Select this directory
No build required! The extension auto-downloads the Rust binary from GitHub Releases on first use.
- Open Assistant:
Cmd+Shift+A (macOS) or
Ctrl+Shift+A (Linux/Windows) - Enable Context: Click context dropdown β Enable "bun-docs-mcp"
- Ask Questions: "How does Bun.serve work?"
- How does
Bun.servework? - Explain Bun's
WebSocketsupport - What are Bun's TCP APIs?
- How do I use
Bun.file? - Show me
Bun.spawnexamples
flowchart TD
A["π§ Zed Extension (WASM)<br/>β’ Auto-downloads binary<br/>β’ Platform detection<br/>β’ Daily update checks<br/>β’ Size: 171 KB"]
B["π¦ GitHub Releases<br/>kjanat/bun-docs-mcp-proxy<br/>β’ 6 platforms supported<br/>β’ ~1.3 MB compressed"]
C["βοΈ Rust MCP Proxy (Native)<br/>β’ stdio β HTTP β SSE<br/>β’ 2.7 MB extracted<br/>β’ 4ms startup"]
D["π Bun Docs API<br/>https://bun.com/docs/mcp"]
A -->|"downloads from"| B
B -->|"extracts to /work/"| C
C -->|"queries"| D
- Extension: Zed loads the WASM extension from this repo
- Auto-Download: On first use, downloads platform-specific binary from GitHub Releases
- Proxy Binary: Rust binary translates between:
- Zed's stdin/stdout (JSON-RPC)
- Bun Docs HTTP API (SSE responses)
- Search: Queries Bun documentation and returns results
All platforms auto-detected and supported:
| Platform | Binary | Size |
|---|---|---|
| Linux x86_64 | bun-docs-mcp-proxy-linux-x86_64.tar.gz |
1.3 MB |
| Linux ARM64 | bun-docs-mcp-proxy-linux-aarch64.tar.gz |
1.25 MB |
| macOS Intel | bun-docs-mcp-proxy-macos-x86_64.tar.gz |
1.19 MB |
| macOS Apple Silicon | bun-docs-mcp-proxy-macos-aarch64.tar.gz |
1.13 MB |
| Windows x86_64 | bun-docs-mcp-proxy-windows-x86_64.zip |
1.09 MB |
| Windows ARM64 | bun-docs-mcp-proxy-windows-aarch64.zip |
1.04 MB |
Static Linux builds (musl) also available.
| Metric | Value |
|---|---|
| First Use | ~2-3 seconds (one-time download) |
| Subsequent | ~4ms startup (instant!) |
| Binary Size | 2.7 MB |
| Memory | ~2-5 MB |
| Dependencies | None (standalone binary) |
bun-docs-mcp-zed/
βββ extension.toml # Zed extension metadata
βββ Cargo.toml # Rust build configuration
βββ src/
β βββ lib.rs # Extension (auto-downloads proxy binary)
βββ ARCHITECTURE.md # Technical architecture
βββ README.md # This file
Proxy implementation: Separate repo at kjanat/bun-docs-mcp-proxy
# Build extension WASM
cargo build --release --lib
# Extension auto-downloads proxy binary from GitHub
# No need to build proxy locally!# Install as dev extension in Zed
# Cmd+Shift+P (macOS) or Ctrl+Shift+P (Linux/Windows) β "zed: install dev extension"
# Select this directory
# Enable in Assistant and test
# Open Assistant β Enable "bun-docs-mcp"
# Ask: "How does Bun.serve work?"MCP Protocol: JSON-RPC 2.0 over stdio
Transport: Server-Sent Events (SSE) over HTTPS
API Endpoint: https://bun.com/docs/mcp
Binary Source: Auto-downloaded from GitHub Releases
For detailed architecture information, see ARCHITECTURE.md.
Check Zed log:
Cmd+Shift+P (macOS) or
Ctrl+Shift+P (Linux/Windows)
β "zed: open log"
Common issues:
- First use takes 2-3 seconds (downloading binary)
- Network issues prevent download β Check internet connection
- Binary not for your platform β Check supported platforms above
Find the binary location:
The extension stores the binary in Zed's extension work directory. The exact path varies by platform:
- Linux:
~/.local/share/zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/ - macOS:
~/Library/Application Support/Zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/ - Windows:
%APPDATA%\Zed\extensions\work\bun-docs-mcp\bun-docs-mcp-proxy\
Verify binary exists (Linux/macOS):
ls -lh ~/.local/share/zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/
# Should show: bun-docs-mcp-proxy (executable)Test manually (Linux/macOS):
~/.local/share/zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/bun-docs-mcp-proxy <<< '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
# Should return: {"jsonrpc":"2.0","id":1,"result":{"tools":[...]}}Note: Replace paths with your platform-specific location from above.
This extension is implemented in pure Rust for:
- Performance: 4ms startup time
- Size: Compact 2.7 MB binary
- Dependencies: Zero runtime dependencies
- Reliability: Compile-time safety guarantees
- Boredom: Why not...
See ARCHITECTURE.md for migration history and technical details.
Contributions welcome!
Proxy implementation: kjanat/bun-docs-mcp-proxy
Extension: This repository
MIT - See LICENSE
- Zed Editor - Extensible code editor
- Bun - Fast JavaScript runtime
- Model Context Protocol - LLM integration standard
- Bun Docs MCP Server - Official Bun documentation API
Ready to search Bun docs in Zed! Install the extension and start asking questions. π