This document describes how to test the Bun Docs MCP extension for Zed, including manual testing procedures and troubleshooting steps.
The extension uses zed::current_platform() from the Zed Extension API, which
only works within Zed's WASM runtime environment. This means:
- ✅ Unit tests verify logic that doesn't depend on the Zed runtime (version parsing, semver comparison, path construction, etc.)
- ❌ Unit tests cannot verify platform detection or binary download behavior
- ✅ Integration tests must be performed manually by installing the extension in Zed
Build the WASM binary for the extension:
cargo build --target wasm32-wasip2 --releaseExpected output:
Compiling bun-docs-mcp-zed v0.1.0
Finished `release` profile [optimized] target(s) in X.XXsVerify WASM binary exists:
ls -lh target/wasm32-wasip2/release/bun_docs_mcp_zed.wasm- Open Zed
- Open Command Palette: Cmd/Ctrl+Shift+P
- Run: "zed: install dev extension"
- Select: Navigate to this project directory (
/path/to/bun-docs-mcp-zed)
Expected behavior:
- Extension loads successfully
- No errors in Zed's log panel
The extension should automatically download the platform-specific binary on first use.
The binary is downloaded to Zed's extension work directory. To find it:
- Open Zed's log panel: Cmd/Ctrl+Shift+Y
- Look for log messages about binary download
Expected download locations by platform:
| Platform | Binary Path Pattern |
|---|---|
| Linux x86_64 | ~/.local/share/zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/bun-docs-mcp-proxy |
| Linux aarch64 | ~/.local/share/zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/bun-docs-mcp-proxy |
| macOS x86_64 | ~/Library/Application Support/Zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/bun-docs-mcp-proxy |
| macOS aarch64 | ~/Library/Application Support/Zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/bun-docs-mcp-proxy |
| Windows x86_64 | %APPDATA%\Zed\extensions\work\bun-docs-mcp\bun-docs-mcp-proxy\bun-docs-mcp-proxy.exe |
| Windows aarch64 | %APPDATA%\Zed\extensions\work\bun-docs-mcp\bun-docs-mcp-proxy\bun-docs-mcp-proxy.exe |
On Unix (Linux/macOS):
ls -lh ~/.local/share/zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/
# or on macOS:
ls -lh ~/Library/Application\ Support/Zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/On Windows:
dir "$env:APPDATA\Zed\extensions\work\bun-docs-mcp\bun-docs-mcp-proxy\"Expected output:
- Binary file exists
- File size is reasonable (typically 2-5 MB)
- Binary is executable (Unix: has
xpermission)
The extension provides a Model Context Protocol server for Bun documentation.
-
Open Zed settings: Cmd/Ctrl+,
-
Add context server configuration:
{ "context_servers": { "bun-docs-mcp": { "enabled": true } } }
Check Zed logs for MCP server startup:
- Open log panel: Cmd/Ctrl+Shift+Y
- Look for messages about context server "bun-docs-mcp"
Expected log messages:
- Context server started successfully
- No error messages about missing binary
- No platform detection errors
The extension should detect your platform correctly and download the appropriate binary.
| Your Platform | Expected Archive | Binary Name |
|---|---|---|
| Linux x86_64 | bun-docs-mcp-proxy-linux-x86_64.tar.gz |
bun-docs-mcp-proxy |
| Linux aarch64 | bun-docs-mcp-proxy-linux-aarch64.tar.gz |
bun-docs-mcp-proxy |
| macOS x86_64 (Intel) | bun-docs-mcp-proxy-macos-x86_64.tar.gz |
bun-docs-mcp-proxy |
| macOS aarch64 (Apple Silicon) | bun-docs-mcp-proxy-macos-aarch64.tar.gz |
bun-docs-mcp-proxy |
| Windows x86_64 | bun-docs-mcp-proxy-windows-x86_64.zip |
bun-docs-mcp-proxy.exe |
| Windows aarch64 | bun-docs-mcp-proxy-windows-aarch64.zip |
bun-docs-mcp-proxy.exe |
Check that the downloaded binary matches your platform:
On Linux:
file ~/.local/share/zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/bun-docs-mcp-proxyExpected output examples:
- Linux x86_64:
ELF 64-bit LSB executable, x86-64 - Linux aarch64:
ELF 64-bit LSB executable, ARM aarch64
On macOS:
file ~/Library/Application\ Support/Zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/bun-docs-mcp-proxyExpected output examples:
- macOS x86_64:
Mach-O 64-bit executable x86_64 - macOS aarch64:
Mach-O 64-bit executable arm64
On Windows:
(Get-Item "$env:APPDATA\Zed\extensions\work\bun-docs-mcp\bun-docs-mcp-proxy\bun-docs-mcp-proxy.exe").VersionInfoThe extension checks for updates every 24 hours.
-
Delete the binary:
# Unix: rm -rf ~/.local/share/zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/ # or macOS: rm -rf ~/Library/Application\ Support/Zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/
-
Reload Zed extensions: Cmd/Ctrl+Shift+P → "zed: reload extensions"
-
Verify binary re-downloads automatically
Expected behavior:
- Binary downloads on next context server startup
- Same version or newer version downloaded
- No errors in logs
Symptom: Zed logs show ERROR: Unsupported platform: ...
Possible Causes:
- Running on unsupported platform/architecture
- Platform detection bug (should not occur with
zed::current_platform())
Solution:
- Check your platform:
uname -manduname -s - Verify it's in the supported list (see Platform Detection Test Matrix above)
- If supported but still failing, file an issue: https://github.com/kjanat/bun-docs-mcp-zed/issues
Symptom: Extension fails to download the binary from GitHub
Possible Causes:
- Network connectivity issues
- GitHub Releases unavailable
- Rate limiting from GitHub API
Solution:
- Check internet connection
- Verify GitHub is accessible: https://github.com/kjanat/bun-docs-mcp-proxy/releases
- Check Zed logs for specific error message
- Wait a few minutes and try reloading extensions
Symptom: Download succeeds but binary is not found
Possible Causes:
- Archive extraction failed
- Binary name mismatch
- Incorrect path construction
Solution:
- Check Zed logs for extraction errors
- Manually inspect the downloaded archive structure
- File an issue with logs: https://github.com/kjanat/bun-docs-mcp-zed/issues
Symptom: Binary exists but MCP server fails to start
Possible Causes:
- Binary not executable (Unix)
- Missing dependencies
- Binary corruption
Solution:
On Unix:
# Check permissions
ls -l ~/.local/share/zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/bun-docs-mcp-proxy
# Make executable if needed
chmod +x ~/.local/share/zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/bun-docs-mcp-proxy
# Test binary manually
~/.local/share/zed/extensions/work/bun-docs-mcp/bun-docs-mcp-proxy/bun-docs-mcp-proxy --versionOn Windows:
# Test binary manually
& "$env:APPDATA\Zed\extensions\work\bun-docs-mcp\bun-docs-mcp-proxy\bun-docs-mcp-proxy.exe" --versionExpected output: Version string like bun-docs-mcp-proxy 0.1.2
Use this checklist when testing the extension:
- Extension builds successfully with
cargo build --target wasm32-wasip2 --release - WASM binary exists at
target/wasm32-wasip2/release/bun_docs_mcp_zed.wasm - Extension installs as dev extension in Zed without errors
- No errors in Zed log panel after installation
- Binary downloads automatically on first use
- Binary is placed in correct platform-specific location
- Binary has correct platform/architecture (verified with
filecommand) - Binary is executable (Unix: has execute permission)
- Binary version can be retrieved with
--versionflag
- Context server can be enabled in Zed settings
- Context server starts without errors
- No "unsupported platform" errors in logs
- MCP server responds to requests (if applicable)
- Deleting binary triggers re-download
- Update check respects 24-hour interval
- Newer versions are downloaded when available
- Linux x86_64 downloads correct binary
- Linux aarch64 downloads correct binary
- macOS x86_64 downloads correct binary
- macOS aarch64 downloads correct binary
- Windows x86_64 downloads correct binary
- Windows aarch64 downloads correct binary (if available for testing)
When reporting issues, please include:
-
Platform information:
- OS:
uname -s(or Windows version) - Architecture:
uname -m(or Windows architecture) - Zed version
- OS:
-
Extension information:
- Extension version from
extension.toml - Build command used
- WASM binary hash:
shasum -a 256 target/wasm32-wasip2/release/bun_docs_mcp_zed.wasm
- Extension version from
-
Logs:
- Complete Zed log output from the log panel
- Any error messages
- Expected vs actual behavior
-
Steps to reproduce:
- Exact steps that trigger the issue
- Whether issue is reproducible
Issue tracker: https://github.com/kjanat/bun-docs-mcp-zed/issues
- Zed Extension Development: https://zed.dev/docs/extensions/developing-extensions
- MCP Server Extensions: https://zed.dev/docs/extensions/mcp-extensions
- Binary Repository: https://github.com/kjanat/bun-docs-mcp-proxy
- Extension API Reference: https://docs.rs/zed_extension_api/