Major refactor: Multi-user Chrome MCP extension with remote server architecture

This commit is contained in:
nasir@endelospay.com
2025-08-21 20:09:57 +05:00
parent d97cad1736
commit 5d869f6a7c
125 changed files with 16249 additions and 11906 deletions

View File

@@ -25,6 +25,8 @@ export const TOOL_NAMES = {
INJECT_SCRIPT: 'chrome_inject_script',
SEND_COMMAND_TO_INJECT_SCRIPT: 'chrome_send_command_to_inject_script',
CONSOLE: 'chrome_console',
SEARCH_GOOGLE: 'chrome_search_google',
SUBMIT_FORM: 'chrome_submit_form',
},
};
@@ -49,6 +51,11 @@ export const TOOL_SCHEMAS: Tool[] = [
type: 'boolean',
description: 'Create a new window to navigate to the URL or not. Defaults to false',
},
backgroundPage: {
type: 'boolean',
description:
'Open URL in background page using full-size window that gets minimized. When true, creates a window with proper dimensions first, then minimizes it for background operation while maintaining web automation compatibility. Defaults to false',
},
width: { type: 'number', description: 'Viewport width in pixels (default: 1280)' },
height: { type: 'number', description: 'Viewport height in pixels (default: 720)' },
refresh: {
@@ -60,6 +67,7 @@ export const TOOL_SCHEMAS: Tool[] = [
required: [],
},
},
{
name: TOOL_NAMES.BROWSER.SCREENSHOT,
description:
@@ -534,4 +542,56 @@ export const TOOL_SCHEMAS: Tool[] = [
required: [],
},
},
{
name: TOOL_NAMES.BROWSER.SEARCH_GOOGLE,
description:
'Enhanced Google search automation that opens Google, fills search box, and submits search using multiple methods for reliability. Ideal for queries like "find phone number post office Fortabbas".',
inputSchema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'Search query to search for on Google',
},
openGoogle: {
type: 'boolean',
description: 'Whether to navigate to Google first (default: true)',
},
extractResults: {
type: 'boolean',
description: 'Whether to extract and return search results (default: true)',
},
maxResults: {
type: 'number',
description: 'Maximum number of search results to extract (default: 10)',
},
},
required: ['query'],
},
},
{
name: TOOL_NAMES.BROWSER.SUBMIT_FORM,
description:
'Submit a form using multiple methods: Enter key, submit button click, or form submission. Useful when search boxes or forms need to be submitted.',
inputSchema: {
type: 'object',
properties: {
formSelector: {
type: 'string',
description: 'CSS selector for the form to submit (default: "form")',
},
inputSelector: {
type: 'string',
description: 'CSS selector for the input field to focus before submission (optional)',
},
submitMethod: {
type: 'string',
description:
'Preferred submission method: "enter", "button", or "auto" (default: "auto")',
enum: ['enter', 'button', 'auto'],
},
},
required: [],
},
},
];