mcp browser tabs
Enables interaction with Google Chrome tabs through the MCP protocol, allowing clients to retrieve information and control tabs on macOS using AppleScript.
Enables interaction with Google Chrome tabs through the MCP protocol, allowing clients to retrieve information and control tabs on macOS using AppleScript.
Model Context Protocol server for retrieving and managing Chrome browser tabs information. This allows Claude Desktop (or any MCP client) to fetch information about and control currently open Chrome tabs.
To use this tool with Claude Desktop, simply add the following to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json
):
{
"tools": {
"browser-tabs": {
"command": "npx",
"args": ["-y", "@kazuph/mcp-browser-tabs"]
}
}
}
This will automatically download and run the latest version of the tool when needed.
This accessibility setting is required for AppleScript to interact with Chrome tabs.
The following sections are for those who want to develop or modify the tool.
npm install -g tsx
)git clone https://github.com/kazuph/mcp-browser-tabs.git
cd mcp-browser-tabs
npm install
npm run build
get_tabs
: Retrieves all open tabs from Google Chrome browser, returning their titles and URLs. Tabs are grouped by window and displayed in a format like "Window 1-1" (Window 1, Tab 1).
close_tab
: Closes a specific tab in Google Chrome using window and tab indices.
MIT License - see the LICENSE file for details
[
{
"description": "Get all open tabs from Google Chrome browser",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {},
"type": "object"
},
"name": "get_tabs"
},
{
"description": "Close a specific tab in Google Chrome by window and tab index. When closing multiple tabs, start from the highest index numbers to avoid index shifting. After closing tabs, use get_tabs to confirm the changes.",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"tabIndex": {
"exclusiveMinimum": 0,
"type": "integer"
},
"windowIndex": {
"exclusiveMinimum": 0,
"type": "integer"
}
},
"required": [
"windowIndex",
"tabIndex"
],
"type": "object"
},
"name": "close_tab"
}
]