My Google Search MCP
Performs real Google searches through the user's Chrome session and returns structured Markdown including AI Overview, Featured Snippet, Knowledge Panel, organic results, and People Also Ask.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
My Google Search MCP
Real Google search for AI agents, powered by your own Chrome session
What this is
my-google-search-mcp is a Model Context Protocol server that gives AI clients two useful tools:
google_searchfor real Google results through your actual Chrome browserfetch_and_filterfor pulling only the useful parts of a web page
Instead of fighting bot detection with scraping tricks, this project uses your real Chrome session through a lightweight extension.
Related MCP server: dsh-google-chrome-search
Why it is useful
Feature | Benefit |
Real browser search | Results come from your own Chrome session |
Better agent output | Search results are returned as clean Markdown |
Focused page extraction | Optional LLM filtering removes page bloat |
Easy MCP setup | Works with Claude Desktop, Cursor, VS Code, Copilot, and other MCP clients |
Local bridge | The extension talks to a loopback server on |
Quick Start
To use
google_search, you need both the Chrome extension and the MCP server config.
Requirements
Node.js and npm
Google Chrome
An MCP-compatible client
The bundled Chrome extension from
chrome-extension/
Optional:
OPENROUTER_API_KEYif you want tighter filtering fromfetch_and_filter
1. Install the Chrome extension
Download the project from the GitHub release or clone this repo
Open
chrome://extensionsTurn on Developer mode
Click Load unpacked
Select the
chrome-extension/folder
2. Add the MCP server to your client
{
"mcpServers": {
"my-google-search-mcp": {
"command": "npx",
"args": ["-y", "my-google-search-mcp"]
}
}
}You do not need to install the npm package first. npx will download and run it automatically.
3. Start the server once
Run:
npx my-google-search-mcpOn first run, the CLI will:
start the local MCP server
start the local bridge on
127.0.0.1:3777generate a bridge token
save that token to
~/.mcp-google-search.jsonprint the token for you
4. Put the token in the extension
Open chrome-extension/background.js and update:
const BRIDGE_TOKEN = "your-token-here";Then reload the extension in chrome://extensions.
5. Use it
After setup:
restart your MCP client if needed
keep Chrome open
use
google_searchfrom your AI client
That is the full setup.
How it works
Search flow
+-----------+
| AI Client |
+-----------+
|
v
+----------------------+
| my-google-search-mcp |
+----------------------+
|
v
+--------------+
| Local Bridge |
+--------------+
|
v
+------------------+
| Chrome Extension |
+------------------+
|
v
+---------------+
| Google Search |
+---------------+Page extraction flow
URL
|
v
Fetch page
|
v
Clean HTML -> Markdown
|
v
Optional LLM filteringTools
google_search
Searches Google and returns structured Markdown that may include:
AI Overview
Featured Snippet
Knowledge Panel
Top organic results
People Also Ask
Requirement:
Chrome must be open
the extension must be installed
the extension token and server token must match
fetch_and_filter
Fetches a URL and returns only the relevant content.
Without OPENROUTER_API_KEY:
returns cleaned Markdown from the page
With OPENROUTER_API_KEY:
uses an LLM to extract only the parts that match the query
can follow relevant sub-links if the root page does not contain the answer
Client Examples
Claude Desktop
{
"mcpServers": {
"my-google-search-mcp": {
"command": "npx",
"args": ["-y", "my-google-search-mcp"]
}
}
}VS Code / Copilot / Cursor
{
"mcpServers": {
"my-google-search-mcp": {
"command": "npx",
"args": ["-y", "my-google-search-mcp"]
}
}
}With environment variables
{
"mcpServers": {
"my-google-search-mcp": {
"command": "npx",
"args": ["-y", "my-google-search-mcp"],
"env": {
"BRIDGE_TOKEN": "your-secret-token",
"OPENROUTER_API_KEY": "sk-or-v1-..."
}
}
}
}Environment Variables
You can use .env.example or provide env vars through your MCP client:
OPENROUTER_API_KEY=sk-or-v1-...
OPENROUTER_MODEL=google/gemini-2.0-flash-001
BRIDGE_TOKEN=your-secret-tokenTroubleshooting
Extension not connected
Make sure Chrome is open
Make sure the extension is loaded
Make sure the token in
background.jsmatches the server token
fetch_and_filter returns full page content
That means OPENROUTER_API_KEY is not set. The tool still works, but it skips LLM filtering.
Google results stop parsing correctly
Google changes its DOM often. If that happens, update the selectors in chrome-extension/background.js.
Security Notes
Bridge requests require a shared token
The bridge only listens on
127.0.0.1Search requests are rate-limited
fetch_and_filterblocks localhost and private/internal IP rangesPrompt injection is treated as untrusted page content during LLM extraction
Error messages are sanitized before being returned to clients
Local Development
git clone https://github.com/dev-tahir/my-google-search-mcp
cd my-google-search-mcp
npm install
npm run build
npm startFor development mode:
npm run devRepo Structure
src/
bin.ts CLI entrypoint
index.ts MCP server and tool registration
bridge.ts local bridge between MCP server and Chrome extension
fetcher.ts HTML fetching, cleanup, and Markdown conversion
llm.ts OpenRouter integration
site-search.ts query-driven extraction and link-following
chrome-extension/
background.js Chrome extension service worker
manifest.json extension manifestPublishing Notes
npm package name:
my-google-search-mcpbinary entrypoint:
my-google-search-mcplicense: MIT
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Web search, Google SERP, page extraction to markdown and cited answers for AI agents.
Web search and content extraction for AI: Google results, any page as Markdown or JSON
Web search, fetch, extract, and research for AI agents. Markdown output + AI-synthesized answers.
Search the web, fetch any URL and map a site as clean, LLM-ready Markdown.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables web searching through Google, DuckDuckGo, and Bing using a headless Chrome browser, returning structured results with titles, URLs, and snippets. Also supports fetching and extracting text content from any webpage.16MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to perform real Google web searches and render web pages for content extraction using a local Chrome browser, with human-in-the-loop CAPTCHA verification, requiring no API keys.10 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to perform live web searches with ranked results and extracted page passages, plus clean markdown extraction of any URL.MIT
- AlicenseNot gradedqualityCmaintenanceEnables deep-research agents to run search engine queries and batch-extract page content through a user's Chrome profile, returning search results and extracted content to MCP clients.4MIT