search-mcp-server
v0.14.4
Published
MCP server for browser automation via Jan Browser extension - provides tools for web navigation, interaction, and search
Maintainers
Readme
Search MCP Server
A Model Context Protocol (MCP) server that provides browser automation tools through the Jan Browser extension. Exposes tools for web navigation, interaction, search, and observation to LLM clients like Claude Desktop and Jan Desktop.
- Transport to client: stdio via
@modelcontextprotocol/sdk - Transport to extension: WebSocket bridge (local) that the extension connects to
- Available on npm:
search-mcp-server
Quick Start with npx (Recommended)
The easiest way to use this MCP server with Jan Desktop app:
Install the Jan Browser Extension (required):
- Download from the releases page or build from source
- Load the extension in Chrome:
chrome://extensions→ Enable "Developer mode" → "Load unpacked" → selectdist/folder - Verify the extension is running
Configure Jan Desktop:
- Open Jan Desktop app → Settings → Extensions → Model Context Protocol
- Add new MCP server:
- Name: Jan Browser Extension
- Command:
npx - Arguments:
search-mcp-server@latest
- Save and restart Jan Desktop
That's it! The MCP server will be automatically installed and run via npx when needed.
Advantages of npx:
- No manual installation or building required
- Always uses the latest published version
- Automatically installs dependencies (including
ws) - No NVM/Node path issues
Install from Source
Using npm:
cd mcp-server
npm install
npm run buildUsing Bun:
cd mcp-server
bun install
bun run buildRun (direct)
node dist/src/index.js
# or
bun run dist/src/index.js
# run a second instance on a different bridge port
node dist/src/index.js --bridge-port 17390[!TIP] Each MCP server process hosts its own WebSocket bridge. Operating systems only allow a single listener per
host:port, so make sure every concurrently running instance uses a unique combination (for example--bridge-port 17390,--bridge-port 17391, and so on). You can also set theBRIDGE_HOST,BRIDGE_PORT, orBRIDGE_URLenvironment variables if you prefer to configure the endpoint outside of CLI arguments.
The process will wait on stdio for MCP clients. You usually don't run it manually—your MCP client will launch it.
Run extension and MCP together (recommended for dev)
From the repo root, run both the extension build (watch) and the MCP server in watch mode:
npm install
npm run build:mcp # one-time build of MCP TS (or skip if using dev)
npm run dev:all # runs Vite (extension) + MCP server watcherThen load the extension from dist/ in Chrome (Developer mode → Load unpacked). Open the extension popup and press Connect to link it to the MCP server running at ws://127.0.0.1:17389 (or any port you configured).
To verify the connection: open chrome://extensions, click "Service worker" → Inspect on this extension. You should see [MCP Bridge] connected shortly after starting dev:all.
Configure in an MCP client
Below are common examples. Paths may vary.
Claude Desktop
Edit your Claude Desktop MCP config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add an entry under mcpServers:
Option 1: Using npx (Recommended)
{
"mcpServers": {
"jan-browser": {
"command": "npx",
"args": ["search-mcp-server@latest"]
}
}
}Option 2: Using local installation
{
"mcpServers": {
"jan-browser": {
"command": "node",
"args": ["/absolute/path/to/jan-browser-extension/mcp-server/dist/src/index.js"],
"env": {
"BRIDGE_HOST": "127.0.0.1",
"BRIDGE_PORT": "17389"
}
}
}
}Restart Claude Desktop. Make sure the Jan Browser extension is running in Chrome. In a chat, you can use tools like browser_navigate, browser_snapshot, browser_screenshot, etc.
Jan Desktop App
Jan Desktop supports MCP servers via the Model Context Protocol extension.
Option 1: Using npx (Recommended)
Open Jan Desktop app → Settings → Extensions → Model Context Protocol
Add a new MCP server:
- Name: Jan Browser Extension
- Command:
npx - Arguments:
search-mcp-server@latest
Important: Make sure the Jan Browser Chrome extension is installed and running:
- Download from releases or build from source
- Load the extension in Chrome:
chrome://extensions→ Enable "Developer mode" → "Load unpacked" → selectdist/folder - The extension must be active for the MCP server to work
Save and restart Jan Desktop
Option 2: Using local installation
Build the MCP server first:
cd /path/to/jan-browser-extension/mcp-server npm install npm run buildOpen Jan Desktop app → Settings → Extensions → Model Context Protocol
Add a new MCP server:
- Name: Jan Browser Extension
- Command:
node - Arguments:
/absolute/path/to/jan-browser-extension/mcp-server/dist/src/index.js - Environment variables (optional):
BRIDGE_HOST:127.0.0.1BRIDGE_PORT:17389
Make sure the Chrome extension is installed and running (see above)
Save and restart Jan Desktop
Available Tools: browser_snapshot, browser_navigate, browser_click, browser_type, browser_screenshot, and more.
Troubleshooting Jan Desktop:
- If you see "Failed to start MCP server", ensure the path to
index.jsis absolute and correct - Check that Node.js is installed and accessible in your PATH:
which node - Verify the build completed successfully:
ls /path/to/mcp-server/dist/src/index.js - Ensure the file is executable:
chmod +x /path/to/mcp-server/dist/src/index.js - NVM users: If you use NVM for Node.js, Jan Desktop may not find node in your PATH. Use one of these solutions:
- Option 1 (Recommended): Use the wrapper script instead:
- Command:
/absolute/path/to/jan-browser/mcp-server/start-mcp.sh - Args: (leave empty)
- Command:
- Option 2: Use absolute path to node:
- Command:
/Users/YOUR_USERNAME/.nvm/versions/node/vXX.XX.X/bin/node - Args:
/absolute/path/to/jan-browser/mcp-server/dist/src/index.js
- Command:
- Option 3: Install node system-wide (outside NVM) and use
nodeas command
- Option 1 (Recommended): Use the wrapper script instead:
- Port conflict: If port 17389 is in use, kill the existing process:
lsof -iTCP:17389 -sTCP:LISTEN | grep node | awk '{print $2}' | xargs kill -9 - Check Jan Desktop logs for more detailed error messages
VS Code (via an MCP-enabled extension)
If your extension supports MCP servers by command, configure it to launch:
- Command:
node - Args:
.../mcp-server/dist/src/index.js(no special env needed)
Usage
The server exposes tools:
search({ query: string, numResults?: number, format?: "serper" | "text" })- Default
formatis"serper". Returns a Serper-like JSON withorganic, optionalknowledgeGraph, optionalpeopleAlsoAsk, andurlsarray._meta.urlsalso included. format: "text"returns a human-readable summary list.numResults(1–10), default5.
- Default
visit_tool({ url: string, mode?: "markdown" | "html" | "text" })- Extracts page content via the extension (preferred) or HTTP fetch fallback.
- Returns compact JSON string:
{ url, success, title?, contentType, content }.
bridge_status()→connected: true|false.server_info()→{ name, version, ts }.
Example prompt in your MCP client:
Use the search tool to find recent articles on "hybrid search vector databases" (5 results). Provide titles and URLs.
Environment
BRIDGE_HOST(optional): Host for the WebSocket bridge server. Default127.0.0.1. (CLI:--bridge-host/-H)BRIDGE_PORT(optional): Port for the WebSocket bridge server. Default17389. (CLI:--bridge-port/-p)BRIDGE_TOKEN(optional): If set, the MCP server requires clients to provide?t=<token>on connection. The extension background will readbridgeTokenfromchrome.storage.syncand add it automatically.MCP_LOG_FILE(optional): If set, the server appends startup and minimal operational logs to this file.
Notes
- The Chrome extension must be loaded and running. Its background service worker will connect out to the bridge automatically and handle
searchcalls (opens SERP tab, scrapes, returns results). - If the extension is not connected yet, tool calls will retry up to 10 times (with 100 ms spacing) while waiting for the bridge to reconnect before returning "Browser extension not connected to bridge".
- Ensure the bridge port is free. On macOS, you can find/kill the process using
lsof -iTCP:17389 -sTCP:LISTENthenkill -9 <PID>.
Unified Dev with the Extension
From the repo root you can run both the extension dev server (Vite) and the MCP server in watch mode:
npm install
npm run dev:all # runs Vite (extension) + MCP server watcherLoad the extension from dist/ in Chrome (Developer mode → Load unpacked). When the MCP server starts, it exposes tools over stdio. If MCP_LOG_FILE is set, it writes a brief startup line to that file.
Optional token authentication
To secure the local bridge:
- Set an environment variable when launching via your MCP client (or locally):
BRIDGE_TOKEN='your-secret' npm run dev:mcp- Set the same token in the extension’s storage. Quick way from the service worker DevTools console:
chrome.storage.sync.set({ bridgeToken: 'your-secret' })Reload the extension or wait for it to reconnect.
Troubleshooting
ERR_CONNECTION_REFUSED
- The MCP server isn't running → start it (
npm run dev:mcp) ornpm run dev:allfrom the repo root. - Port 17389 is busy → free it:
lsof -iTCP:17389 -sTCP:LISTENthenkill -9 <PID>. - Host/port overridden incorrectly → ensure
BRIDGE_HOST=127.0.0.1andBRIDGE_PORT=17389. - Token mismatch → if
BRIDGE_TOKENis set, ensure the extension has the samebridgeTokeninchrome.storage.sync.
Tools Timing Out
If you experience timeouts with browser_navigate or other tools:
- Verify extension connection: Check Chrome extension service worker console for
[MCP Bridge] connected - Enable debug logging: Set
MCP_LOG_FILEenvironment variable:MCP_LOG_FILE=~/.jan-mcp-debug.log node dist/src/index.js - Check logs: Review log file for detailed message flow
- Test manually: Use the included test script:
MCP_LOG_FILE=~/.jan-mcp-test.log node test-manual.js
See TIMEOUT_FIX.md for details on the Buffer handling fix that resolved timeout issues.
License
Apache License 2.0 — see LICENSE
