webmcp-bridge is a WebMCP-focused browser app that turns remote MCP servers into browser-usable tool context, so you can discover capabilities, execute them, and expose them through navigator.modelContext for next-gen browser AI workflows.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"webmcp-bridge": {
"args": [
"-y",
"webmcp-bridge"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
You have MCP servers. You want them in the browser. This module connects to a remote MCP server, discovers its tools, and registers them with navigator.modelContext.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y 'webmcp-bridge' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked webmcp-bridge against OSV.dev.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in browser / developer-tools
Browser automation with Puppeteer for web scraping and testing
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
MCP Security Weekly
Get CVE alerts and security updates for Webmcp Bridge and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Connect any MCP server to Chrome's WebMCP API.
You have MCP servers. You want them in the browser. This module connects to a remote MCP server, discovers its tools, and registers them with navigator.modelContext.
npm install mcp-web-bridge
import { WebMCPBridge } from 'mcp-web-bridge';
const bridge = new WebMCPBridge('https://mcp.example.com');
await bridge.connect();
bridge.register();
That's it. Tools are now available to Chrome's AI agent.
const bridge = new WebMCPBridge('https://mcp.example.com', {
enrichContext: (toolName, args) => ({
...args,
user_locale: navigator.language,
user_timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
}),
onResponse: (toolName, result) => {
console.log(`[${toolName}]`, result);
return result;
},
});
await bridge.connect();
bridge.register();
const bridge = new WebMCPBridge('https://mcp.example.com');
bridge.setAuth({ type: 'bearer', token: 'sk-...' });
await bridge.connect();
Supports bearer, apikey, and basic auth. OAuth with PKCE is handled by the MCPAuth class.
const bridge = new WebMCPBridge('https://mcp.example.com', {
headers: {
'X-Custom-Header': 'value',
'Authorization': 'Bearer sk-...',
},
});
Custom headers are merged into every request. Auth headers from setAuth() are applied first, then your custom headers override.
bridge.register([
{
name: 'get_selection',
description: 'Get the currently selected text on the page',
inputSchema: { type: 'object', properties: {} },
execute: async () => ({
content: [{ type: 'text', text: window.getSelection().toString() }],
}),
},
]);
Mix remote MCP tools with local browser capabilities.
new WebMCPBridge(serverUrl, options?)| Option | Type | Description |
|---|---|---|
headers | object | Custom headers merged into every request |
enrichContext | (name, args) => args | Enrich tool args before proxying |
onToolCall | (name, args) => void | Called before each tool call |
onResponse | (name, result) => result | Transform responses |
onError | (name, error) => void | Error handler |
logger | object | Custom logger (default: console) |
| Method | Returns | Description |
|---|---|---|
connect() | { tools, prompts, resources } | Initialize + discover |
register(extraTools?) | tool[] | Register with WebMCP |
callTool(name, args) | result | Call a tool |
getPrompt(name, args) | result | Get a prompt |
readResource(uri) | result | Read a resource |
setAuth({ type, token }) | — | Set auth before connecting |
disconnect() | — | Clear context + logout |
chrome://flags/#enable-webmcp-testingconnect() and callTool() still work — you just can't register()MIT