Unlock Desktop AI Integration: The native host is a core feature that bridges your browser’s WebMCP tools to desktop AI assistants. Use browser-based tools directly from Claude Code, Claude Desktop, or any MCP-compatible client!
Prerequisites:
- MCP-B Chrome Extension installed from Chrome Web Store
- Node.js 18+ installed
- A website with WebMCP tools registered
How It Works
The native host acts as a proxy server that:- Runs locally on your machine (default port: 12306)
- Communicates with the MCP-B Chrome extension
- Exposes browser tools to desktop MCP clients via HTTP
- Respects your browser’s authentication (cookies, sessions)
Installation
Step 1: Install the Native Server
Install the native server globally via npm:- npm
- pnpm
- yarn
The native server must be installed globally to make the
@mcp-b/native-server command available system-wide.Step 2: Verify Installation
Check that the installation was successful:Starting the Native Host
Basic Usage
Start the native server with default settings:Configuration Options
The native server supports several configuration options:- Custom Port
- Verbose Logging
- Multiple Options
Running as a Background Service
For continuous use, you can run the native server as a background service.- Mac/Linux (pm2)
- Windows (NSSM)
Connecting to Claude Code
Claude Code is Anthropic’s command-line AI assistant that supports MCP.Step 1: Configure Claude Code
Add the native host to your Claude Code MCP configuration:- Mac/Linux
- Windows
Edit
~/.config/claude/mcp.json:Step 2: Start Claude Code
Start Claude Code in your project directory:Step 3: Verify Connection
Once Claude Code starts, ask it to list available tools:Connecting to Claude Desktop
Claude Desktop is Anthropic’s desktop application that supports MCP.Step 1: Configure Claude Desktop
Add the native host to Claude Desktop’s MCP settings:- Mac
- Windows
Edit
~/Library/Application Support/Claude/claude_desktop_config.json:Step 2: Restart Claude Desktop
Restart Claude Desktop to load the new configuration:- Quit Claude Desktop completely
- Reopen Claude Desktop
- Wait a few seconds for MCP connections to initialize
Step 3: Test the Connection
In Claude Desktop, ask about available tools:Verifying the Setup
Check Native Host Status
Verify the native host is running and accepting connections:- Browser Test
- MCP Inspector
Check Extension Connection
Verify the MCP-B extension is connected:- Open Chrome and click the MCP-B extension icon
- Go to the “Settings” tab
- Check for “Native Host: Connected” status
- If disconnected, ensure the native server is running
Test Tool Execution
Try calling a tool from your MCP client:1
Open a website with WebMCP tools
Navigate to a site with tools registered (e.g., the MCP-B demo)
2
Ask Claude to use a tool
In Claude Code or Claude Desktop:
3
Verify execution
- Check that Claude successfully calls the tool
- Verify the tool executes in the browser tab
- Confirm Claude receives the tool’s response
Debugging Issues
Native Server Won’t Start
Port already in use
Port already in use
Error:
EADDRINUSE: address already in use :::12306Solution: Another process is using port 12306Command not found
Command not found
Error:
@mcp-b/native-server: command not foundSolution: Global npm modules not in PATHExtension not connecting
Extension not connecting
Error:
Extension not connected in server logsSolution: Extension ID mismatch or extension not installed- Verify the MCP-B extension is installed from the Chrome Web Store
- Check the extension is enabled at
chrome://extensions/ - Restart Chrome
- Restart the native server
MCP Client Can’t Connect
Connection refused
Connection refused
Error:
ECONNREFUSED when Claude tries to connectChecklist:- Native server is running:
curl http://127.0.0.1:12306/health - Port matches config: Check both server and client config
- Firewall not blocking: Allow localhost connections
- Config file is valid JSON: Validate with a JSON linter
No tools available
No tools available
Issue: Claude connects but can’t see any toolsChecklist:
- Browser tabs with WebMCP tools are open
- MCP-B extension is active (click icon to check)
- Tools are registered: Check extension “Tools” tab
- Native server is connected to extension: Check server logs
Tools fail to execute
Tools fail to execute
Issue: Claude sees tools but execution failsDebug steps:
-
Check browser console for errors:
- Open DevTools (F12)
- Look for errors when tool is called
-
Check native server logs:
-
Verify tab is still active:
- If you closed or navigated away from the tab, tools won’t work
- Tools are scoped to specific pages
-
Test directly in extension:
- Click MCP-B extension icon
- Go to “Tools” tab
- Manually call the tool
- Check for errors in extension popup
Configuration Issues
Config file not found
Config file not found
Issue: Claude can’t find the MCP configuration fileSolution: Create the directory structure
- Claude Code (Mac/Linux)
- Claude Code (Windows)
- Claude Desktop (Mac)
Invalid JSON syntax
Invalid JSON syntax
Error: Claude fails to load configSolution: Validate your JSONCorrect format:
Wrong URL format
Wrong URL format
Issue: Connection fails due to incorrect URLCorrect formats:
- ✅
http://127.0.0.1:12306/mcp - ✅
http://localhost:12306/mcp - ❌
http://127.0.0.1:12306(missing /mcp path) - ❌
https://127.0.0.1:12306/mcp(https not supported) - ❌
ws://127.0.0.1:12306/mcp(wrong protocol)
Security Considerations
Best Practices
Localhost Only
Localhost Only
The native host should only listen on localhost (127.0.0.1), not on external network interfaces. This is the default behavior.Avoid:
Firewall Configuration
Firewall Configuration
Ensure your firewall allows localhost connections but blocks external access:
- Allow:
127.0.0.1:12306→ localhost only - Block:
0.0.0.0:12306→ all interfaces
Tool Permissions
Tool Permissions
Only expose tools that you would be comfortable executing through your browser’s UI. Tools have the same permissions as your browser session.Review tools carefully:
- Check what data they can access
- Verify what actions they can perform
- Ensure proper authentication checks
Monitor Tool Usage
Monitor Tool Usage
Keep the native server logs visible or check them regularly to monitor tool execution:Watch for:
- Unexpected tool calls
- Failed authentication attempts
- Unusual patterns of usage
Advanced Usage
Multiple Extension Support
If you’re testing with both the Chrome Web Store extension and a development build:- Go to
chrome://extensions/ - Disable the version you’re not using
- Restart Chrome
- Restart the native server
Custom Extension IDs
For development builds with custom extension IDs, configure the native server:Monitoring and Logging
Enable detailed logging for debugging:- Console Logging
- File Logging
- JSON Logging
Health Monitoring
Monitor the native host health with automated checks:Next Steps
Claude Code Integration
Deep dive into using Claude Code with WebMCP
Development Guide
Learn how to develop WebMCP tools
Examples
Explore complete examples and patterns
Troubleshooting
More debugging tips and solutions
Getting Help
If you encounter issues not covered here:1
Check server logs
Run with verbose logging:
@mcp-b/native-server --verbose2
Test health endpoint
Verify server is running:
curl http://127.0.0.1:12306/health3
Check GitHub Issues
Search for similar problems: WebMCP Issues
4
Join Discord
Ask the community: WebMCP Discord
When reporting issues, include:
- Native server version (
npm list -g @mcp-b/native-server) - MCP-B extension version
- Operating system and version
- MCP client (Claude Code/Desktop) and version
- Relevant log output with
--verboseflag
