Skip to main content
Glama
gemini-mcp-bridge-server

gemini-mcp-bridge-server

by somebodil

gemini-mcp-bridge-server

The local MCP server for Gemini MCP Bridge, the Chrome extension that lets Gemini on the web (gemini.google.com) use the tools of your computer.

The extension runs in Chrome and cannot touch your computer by itself. This server is the part that can: it runs commands, reads and writes files, and passes calls through to the other MCP servers you list. The extension reaches it at http://127.0.0.1:7341/mcp.

npx gemini-mcp-bridge-server

Node.js 20 or later. The first start creates the config file with a random token, then prints what to enter in the extension's options:

gemini-mcp-bridge-server 0.1.0
  URL:    http://127.0.0.1:7341/mcp
  Token:  3q2-...
  Config: /home/you/.config/gemini-mcp-bridge-server/config.json (new)
  Tools:  run_command, read_file, write_file, list_directory

Leave the window open while you use Gemini. Every call shows up there.

Start it when you log in

Install it once, then let your system start it:

npm install -g gemini-mcp-bridge-server
gemini-mcp-bridge-server install-service

It starts at once and at every login: a LaunchAgent on macOS (log: ~/Library/Logs/gemini-mcp-bridge-server.log), a systemd user service on Linux (log: journalctl --user -u gemini-mcp-bridge-server), a hidden script in the Startup folder on Windows (log: %LOCALAPPDATA%\gemini-mcp-bridge-server\server.log). No administrator rights are needed. --port, --no-shell and --no-files given here are saved in the config.

  • gemini-mcp-bridge-server token shows the URL and the token again (the service does not write the token into its log).

  • gemini-mcp-bridge-server uninstall-service stops it and removes it.

  • The service runs the Node.js that installed it: after removing that Node.js version (with nvm, say), run install-service again.

Related MCP server: AKIMCP

Tools

Tool

What it does

run_command

Runs a command in your shell ($SHELL -c, cmd.exe on Windows), with a time limit (60 s by default, at most 600 s). Returns the exit code, stdout and stderr.

read_file

Reads a text file, whole or some of its lines.

write_file

Writes a text file, or adds to its end. Missing folders are created.

list_directory

Lists a folder.

Paths may be absolute, start with ~, or be relative to your home folder. The server also tells Gemini, in its MCP instructions, your operating system, your home folder and your shell, so that Gemini writes paths and commands that work.

Options

gemini-mcp-bridge-server [--port <n>] [--config <file>] [--no-shell] [--no-files] [--new-token]
gemini-mcp-bridge-server token | install-service | uninstall-service

The config file is ~/.config/gemini-mcp-bridge-server/config.json (on Windows %APPDATA%\gemini-mcp-bridge-server\config.json). Only your user can read it.

{
  "port": 7341,
  "token": "…",
  "tools": { "shell": true, "files": true },
  "mcpServers": {
    "playwright": { "command": "npx", "args": ["@playwright/mcp@latest"] },
    "other": { "url": "http://127.0.0.1:9000/mcp", "headers": { "Authorization": "Bearer …" } }
  }
}

mcpServers has the shape other MCP clients use, so an existing list can be copied in: stdio servers (command, args, env, cwd) and Streamable HTTP servers (url, headers). Their tools appear with the server's name in front, as playwright__browser_navigate. "disabled": true leaves one out.

Safety

  • The server listens on 127.0.0.1 only. Any web page in your browser can send requests to 127.0.0.1, so the server refuses a request unless all three hold:

    • It carries the token: Authorization: Bearer <token>.

    • It has no Origin, or a chrome-extension:// one. Web pages always send their own Origin.

    • Its Host is 127.0.0.1 or localhost, which defeats DNS rebinding.

  • Whoever has the token can run commands as you. Keep it like a password. --new-token replaces it.

  • The extension asks before each call by default. What Gemini writes can come from a web page or a document it read ("prompt injection"): keep run_command and write_file on Ask in the extension unless you watch closely. --no-shell and --no-files turn the tools off on this side.

Development

npm install
npm run check   # types, lint, tests (including a stdio MCP server passed through)
npm start       # build and run dist/cli.js

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      A
      maintenance
      Exposes a governed suite of 38 OAuth-gated MCP tools that let web-based AI chats and other clients read and edit files, run whitelisted shell commands, search, use Git, SQLite, browser automation, DevTools, background tasks, localhost services, clipboard, notifications, and ports on a user's own machine. It runs locally with folder scoping and a strict command whitelist, so remote clients gain a large operating surface without unrestricted shell access.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Exposes an OAuth-gated MCP endpoint with a governed suite of 38 tools that let web-based AI chat clients work directly on your local machine — reading and editing files, running whitelisted shell commands, searching, using Git and SQLite, automating browsers, driving DevTools, managing background tasks and ports, and reaching localhost services, clipboard, and notifications. A strict command whitelist and folder-scoped access keep that remote operating surface safe by default.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Connects web-based AI chat clients such as Claude, ChatGPT, and Grok to a local machine through a single OAuth-gated MCP endpoint so they can browse, read, write, and edit files, run whitelisted shell commands, search content, use Git, query SQLite, drive browsers and DevTools, and manage background tasks, ports, and clipboard. It also exposes localhost and LAN services via a protected HTTP client, letting remote or mobile clients debug and operate local projects without granting unrestricted shell access.
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      Connects web AI chats and local clients to your own machine through one OAuth-gated MCP endpoint, exposing 38 governed tools for files, shell commands, search, Git, SQLite, browser automation, DevTools, background tasks, localhost services, clipboard, notifications, ports, and Postman control. It lets assistants build and edit projects, inspect databases and local APIs, drive browser workflows, and manage long-running jobs without handing every client unrestricted shell access.
      MIT