This Spring AI Chrome MCP Server enables interaction between AI assistants and Chrome browsers through the Model Context Protocol (MCP). It allows AI systems to perform various browser operations like opening websites, searching, clicking links, and extracting content.
To use the Spring AI Chrome MCP Server, you need to configure it with Claude or another compatible AI assistant that supports MCP.
Create a configuration file for Claude Desktop with the following template:
{
"mcpServers": {
"spring-ai-chrome-mcp-server": {
"command": "{JAVA_PATH}",
"args": [
"-Dspring.ai.mcp.server.stdio=true",
"-jar",
"{JAR_PATH}"
]
}
}
}
Replace the placeholders with your actual paths:
{JAVA_PATH}
: Full path to your Java executable{JAR_PATH}
: Full path to the Spring AI Chrome MCP Server JAR fileExample configuration:
{
"mcpServers": {
"spring-ai-chrome-mcp-server": {
"command": "/Users/baetaehyeon/Library/Java/JavaVirtualMachines/corretto-21.0.5-1/Contents/Home/bin/java",
"args": [
"-Dspring.ai.mcp.server.stdio=true",
"-jar",
"/Users/baetaehyeon/dev/chrome-mcp-server/build/libs/chrome-mcp-server-0.0.1.jar"
]
}
}
}
The MCP Server manages browsers by ID (allowing multiple browser instances) and tabs by index.
You can interact with the server using natural language commands or direct tool calls. Here are some examples:
The server provides the following browser operation tools:
open_browser
- Opens a browser with default Google pageopen_browser_by_browser_id
- Opens a browser with specified IDclose_browser
- Closes the current browserclose_browser_by_browser_id
- Closes a browser by IDclose_all_browsers
- Closes all open browsersopen_new_tab
- Opens a new tabopen_new_tab_by_browser_id
- Opens a new tab in specified browseropen_new_tab_with_url
- Opens a new tab with specified URLopen_new_tab_with_url_by_browser_id
- Opens a new tab with URL in specified browserclose_current_tab
- Closes the current tabclose_current_tab_by_browser_id
- Closes current tab in specified browserswitch_to_tab
- Switches to tab by indexswitch_to_tab_by_browser_id
- Switches to tab by index in specified browserget_tab_list
- Lists all open tabsget_tab_list_by_browser_id
- Lists all tabs in specified browserclose_all_tabs_except_current
- Closes all tabs except currentclose_all_tabs_except_current_by_browser_id
- Closes all tabs except current in specified browsergoogle_search
- Performs Google searchgoogle_search_by_browser_id
- Performs Google search in specified browsernavigate_to_url
- Navigates to specified URLnavigate_to_url_by_browser_id
- Navigates to URL in specified browserclick_link_with_text
- Clicks a link containing specified textclick_link_with_text_by_browser_id
- Clicks a link in specified browserinput_text
- Inputs text at current cursor positioninput_text_by_browser_id
- Inputs text in specified browsertake_screenshot
- Takes a screenshot of current pagetake_screenshot_by_browser_id
- Takes screenshot in specified browserget_page_title
- Gets the current page titleget_page_title_by_browser_id
- Gets page title in specified browserextract_page_text
- Extracts text content from current pageextract_page_text_by_browser_id
- Extracts text from page in specified browserget_cookies
- Gets cookies from current siteget_cookies_by_browser_id
- Gets cookies from site in specified browserTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "spring-ai-chrome-mcp-server" '{"command":"{JAVA_PATH}","args":["-Dspring.ai.mcp.server.stdio=true","-jar","{JAR_PATH}"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"spring-ai-chrome-mcp-server": {
"command": "{JAVA_PATH}",
"args": [
"-Dspring.ai.mcp.server.stdio=true",
"-jar",
"{JAR_PATH}"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"spring-ai-chrome-mcp-server": {
"command": "{JAVA_PATH}",
"args": [
"-Dspring.ai.mcp.server.stdio=true",
"-jar",
"{JAR_PATH}"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect