VS Code Integration¶
Set up hanzo-mcp with VS Code, Cursor, and other MCP-compatible editors.
VS Code with Continue¶
Continue is an open-source AI code assistant that supports MCP.
Installation¶
- Install Continue extension from VS Code marketplace
- Configure MCP in
~/.continue/config.json:
- Restart VS Code
Cursor¶
Cursor has built-in MCP support.
Configuration¶
Add to Cursor settings (~/.cursor/mcp.json):
Windsurf (Codeium)¶
Configuration¶
Add to ~/.codeium/windsurf/mcp_config.json:
Generic MCP Client¶
For any MCP-compatible client:
stdio Transport¶
SSE Transport¶
Start the server:
Connect to: http://localhost:8888/sse
Project-Specific Configuration¶
Create .hanzo/config.json in your project root:
{
"name": "my-project",
"rules": [
"Use TypeScript",
"Follow existing patterns"
],
"enabled_tools": {
"shell": true,
"browser": false
}
}
The MCP server will automatically detect and apply project settings.
Recommended Extensions¶
VS Code¶
- Continue - AI assistant with MCP support
- Claude Dev - Claude integration
- GitLens - Git integration (works well with hanzo tools)
Cursor¶
Built-in AI features work with hanzo-mcp out of the box.
Troubleshooting¶
Server Not Starting¶
# Check if hanzo-mcp is installed
uvx hanzo-mcp --version
# Test manually
uvx hanzo-mcp --transport sse --port 8888
# Then open http://localhost:8888 in browser
Permission Errors¶
Ensure paths are allowed:
Tool Not Available¶
Some tools require additional dependencies:
# Full installation with all tools
pip install hanzo-mcp[tools-all]
# Or specific tools
pip install hanzo-mcp[browser] # Playwright
pip install hanzo-mcp[llm] # LLM
Logs and Debugging¶
For SSE transport, logs appear in terminal. For stdio:
Performance Tips¶
- Use uvx - Faster startup than pip-installed version
- Limit paths - Only allow necessary directories
- Disable unused tools - Reduces memory usage
- Use project config - Faster tool discovery
Browser Extension Integration¶
The Hanzo Browser Extension enables AI control of browser tabs through the browser tool.
Installation¶
- Install the browser extension from the Chrome/Firefox store (or build from source)
- Start the CDP bridge server:
- The extension automatically connects to the bridge
How It Works¶
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────────┐
│ hanzo-mcp │────▶│ CDP Bridge │────▶│ Browser Extension │
│ browser tool │◀────│ Server (9223) │◀────│ (CDP Provider) │
└─────────────────┘ └──────────────────┘ └─────────────────────┘
▲
│ WebSocket
│
┌─────┴─────┐
│ Chrome │
│ Tabs │
└───────────┘
Configuration¶
Environment variables:
| Variable | Default | Description |
|---|---|---|
HANZO_CDP_BRIDGE_HOST |
localhost |
Bridge server host |
HANZO_CDP_BRIDGE_PORT |
9223 |
Bridge server port |
Usage with MCP¶
Once connected, the browser tool can control tabs through the extension:
# In your AI/MCP context
browser(action="navigate", url="https://example.com")
browser(action="click", selector="#login-button")
browser(action="fill", selector="#email", text="user@example.com")
browser(action="screenshot")
Programmatic Usage¶
from hanzo_tools.browser import CDPBridgeClient
# Connect to the bridge
client = CDPBridgeClient(port=9223)
await client.connect()
# Control browser
await client.navigate("https://example.com")
await client.click("#submit")
screenshot = await client.screenshot(full_page=True)
Debugging¶
If the extension isn't connecting:
- Check extension is installed and enabled
- Verify bridge server is running:
curl http://localhost:9223/health - Check browser console for errors (F12 → Console)
- Ensure
debuggerpermission is granted in extension settings
See Also¶
- Quickstart - Getting started
- Configuration - All configuration options
- Tools Reference - Available tools