This MCP server provides browser automation capabilities through BrowserCat's cloud browser service, allowing LLMs to interact with web pages, take screenshots, and execute JavaScript without local browser installation. It serves as a bridge between language models and real browser environments.
To use the BrowserCat MCP Server, you'll need to obtain a BrowserCat API key first.
The easiest way to use BrowserCat MCP Server is through NPX. Create a configuration file that references the server:
{
"mcpServers": {
"browsercat": {
"command": "npx",
"args": ["-y", "@browsercatco/mcp-server"],
"env": {
"BROWSERCAT_API_KEY": "your-api-key-here"
}
}
}
}
Replace your-api-key-here
with your actual BrowserCat API key.
The BrowserCat MCP Server provides several tools for browser automation. Here's how to use each one:
Navigate to any URL using the browsercat_navigate
tool:
// Navigate to a webpage
{
"tool": "browsercat_navigate",
"input": {
"url": "https://example.com"
}
}
Capture screenshots of entire pages or specific elements:
// Screenshot the entire page
{
"tool": "browsercat_screenshot",
"input": {
"name": "homepage",
"width": 1280,
"height": 800
}
}
// Screenshot a specific element
{
"tool": "browsercat_screenshot",
"input": {
"name": "login-form",
"selector": "#login-form",
"width": 600,
"height": 400
}
}
You can access your screenshots via the resource URL screenshot://<name>
.
{
"tool": "browsercat_click",
"input": {
"selector": "#submit-button"
}
}
{
"tool": "browsercat_hover",
"input": {
"selector": ".dropdown-menu"
}
}
{
"tool": "browsercat_fill",
"input": {
"selector": "#username",
"value": "testuser"
}
}
{
"tool": "browsercat_select",
"input": {
"selector": "#country",
"value": "USA"
}
}
Run arbitrary JavaScript in the browser context:
{
"tool": "browsercat_evaluate",
"input": {
"script": "document.querySelectorAll('.product-item').length"
}
}
You can retrieve browser console logs through the resource URL console://logs
. This will return all console messages outputted by the browser.
Here's a complete example of how to automate a login process:
// 1. Navigate to website
{
"tool": "browsercat_navigate",
"input": {
"url": "https://example.com/login"
}
}
// 2. Take a screenshot of the login page
{
"tool": "browsercat_screenshot",
"input": {
"name": "login-page"
}
}
// 3. Fill in username
{
"tool": "browsercat_fill",
"input": {
"selector": "#username",
"value": "[email protected]"
}
}
// 4. Fill in password
{
"tool": "browsercat_fill",
"input": {
"selector": "#password",
"value": "password123"
}
}
// 5. Click the login button
{
"tool": "browsercat_click",
"input": {
"selector": "#login-button"
}
}
// 6. Take a screenshot after login
{
"tool": "browsercat_screenshot",
"input": {
"name": "after-login"
}
}
After executing these steps, you can view the screenshots via screenshot://login-page
and screenshot://after-login
.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "browsercat" '{"command":"npx","args":["-y","@browsercatco/mcp-server"],"env":{"BROWSERCAT_API_KEY":"your-api-key-here"}}'
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": {
"browsercat": {
"command": "npx",
"args": [
"-y",
"@browsercatco/mcp-server"
],
"env": {
"BROWSERCAT_API_KEY": "your-api-key-here"
}
}
}
}
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": {
"browsercat": {
"command": "npx",
"args": [
"-y",
"@browsercatco/mcp-server"
],
"env": {
"BROWSERCAT_API_KEY": "your-api-key-here"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect