google WebMCP
Browser tool configuration for google
Tools (2)
get_search_results()
Get the list of results from current Google search results page
Parameters
No parameters
JavaScript Handler
() => {
const results = [];
document.querySelectorAll('#search .g, #rso .g').forEach((el) => {
const title = el.querySelector('h3')?.textContent;
const link = el.querySelector('a')?.href;
const snippet = el.querySelector('.VwiC3b, [data-sncf]')?.textContent;
if (title && link && !link.includes('google.com/search')) {
results.push({ index: results.length + 1, title, link, snippet });
}
});
return { success: true, count: results.length, results: results.slice(0, 10) };
}
google_search()
Search on Google (navigates to results page, then use get_search_results to get results)
Parameters
JavaScript Handler
(params) => {
window.location.href = 'https://www.google.com/search?q=' + encodeURIComponent(params.query);
return { success: true, message: 'Navigating to search results...', query: params.query };
}
🔌 Chrome MCP Server Extension
Use these tools with Claude, ChatGPT, and other AI assistants.
How to Use WebMCP
WebMCP tools are designed for browser extensions or automation frameworks. The browser extension matches the current URL against the pattern and executes the JavaScript handler when the tool is invoked.
API Endpoint:
GET /api/webmcp/match?url=https://www.google.com/...