Files
extension/docs/PLATFORM_COMPATIBILITY.md
Hanzo Dev 0b6f26d0bf feat: Add comprehensive MCP tools and multi-platform build support
- Implement feature parity between Python and TypeScript MCP versions
- Add comprehensive test coverage for all orthogonal tools
- Consolidate tools to follow single-tool-multiple-actions pattern
- Add bash, git-search, critic, and mode tools
- Create multi-platform build system for VS Code, Claude Desktop, and DXT
- Add test files for filesystem, search, shell, process, web-fetch, mode, and git-search tools
- Fix TypeScript compilation issues and update build scripts
- Update package.json with hanzo-ai publisher ID
- Successfully build all distribution formats:
  - VS Code Extension (.vsix)
  - Claude Desktop MCP package
  - Claude Code DXT file
  - Standalone MCP server
2025-07-04 20:13:16 -04:00

2.6 KiB

Platform Compatibility Guide

VS Code vs Cursor vs Windsurf

Short Answer: NO, we don't need different builds! 🎉

The same .vsix extension package works across all three platforms because:

  1. Cursor is a fork of VS Code that maintains 100% API compatibility
  2. Windsurf is also VS Code-based with full extension compatibility
  3. All three use the same extension manifest format and APIs

Single Build, Multiple Platforms

# Build once
npm run package

# Install the same .vsix file in any editor:
# - VS Code: Extensions > Install from VSIX
# - Cursor: Extensions > Install from VSIX  
# - Windsurf: Extensions > Install from VSIX

Platform Detection (if needed)

While not necessary, you can detect which editor is running:

// In extension code
const appName = vscode.env.appName;
// Returns: "Visual Studio Code" | "Cursor" | "Windsurf"

const appHost = vscode.env.appHost;
// Returns: "desktop" | "web" | "codespaces"

Claude Desktop Integration

Claude Desktop requires a separate MCP server build, but this is already handled:

# VS Code/Cursor/Windsurf extension
npm run package          # Creates hanzoai-1.5.4.vsix

# Claude Desktop MCP server
npm run build:mcp        # Creates out/mcp-server-standalone.js

Installation Summary

Platform Installation Method File
VS Code Install from VSIX hanzoai-1.5.4.vsix
Cursor Install from VSIX hanzoai-1.5.4.vsix
Windsurf Install from VSIX hanzoai-1.5.4.vsix
Claude Desktop MCP Config out/mcp-server-standalone.js

Benefits of Unified Build

  1. Maintenance: Single codebase to maintain
  2. Testing: Test once, run everywhere
  3. Distribution: One package for all VS Code-based editors
  4. Updates: Users get same features regardless of editor

Edge Cases

The only platform-specific considerations are:

  1. Keybindings: Some editors may have different default keybindings
  2. Theme: UI might look slightly different based on editor theme
  3. Settings: Editor-specific settings namespace (but our extension uses hanzo.*)

Verification

To verify compatibility:

# 1. Build extension
npm run package

# 2. Test in each editor
code --install-extension hanzoai-1.5.4.vsix
cursor --install-extension hanzoai-1.5.4.vsix
windsurf --install-extension hanzoai-1.5.4.vsix

# 3. All should work identically!

Conclusion

Our unified build approach is the recommended best practice. The VS Code extension API was designed for this compatibility, and forks like Cursor and Windsurf maintain this compatibility intentionally.