VS Code Simple Browser MCP server

Enables web interaction through VS Code's Simple Browser with tools for opening URLs, navigating pages, executing JavaScript, and monitoring console logs in real-time for web automation and debugging workflows.
Back to servers
Setup instructions
Provider
SaViGnAnO
Release date
Jun 08, 2025
Language
JavaScript
Stats
1 star

This MCP server enables Large Language Models (LLMs) to interact with VS Code's Simple Browser, allowing them to open websites, navigate pages, execute JavaScript, and monitor browser activity all from within VS Code.

Installation

To install the VS Code Simple Browser MCP server, follow these steps:

git clone https://github.com/YOUR_USERNAME/vscode-simple-browser-mcp.git
cd vscode-simple-browser-mcp
npm install
npm run build

Configuration

To use the MCP server with Claude Desktop, add the following to your Claude Desktop configuration:

{
  "mcpServers": {
    "vscode-simple-browser": {
      "command": "node",
      "args": ["/path/to/vscode-simple-browser-mcp/build/index.js"]
    }
  }
}

Make sure to replace /path/to/vscode-simple-browser-mcp with the actual path where you cloned the repository.

Available Tools

The MCP server provides several tools for interacting with VS Code's Simple Browser:

Browser Control

  • open_url - Open websites in VS Code Simple Browser
  • navigate - Navigate between pages (forward, back, refresh)

JavaScript Execution

  • execute_javascript - Run JavaScript code in the browser context

Monitoring & State

  • get_console_logs - Retrieve console messages with filtering options
  • get_browser_state - Get the current browser status and information

Usage Examples

Opening a URL

To open a website in the VS Code Simple Browser:

// Example of using the open_url tool
{
  "tool": "open_url",
  "url": "https://example.com"
}

Executing JavaScript

To run JavaScript code in the browser context:

// Example of using the execute_javascript tool
{
  "tool": "execute_javascript",
  "code": "document.querySelector('h1').textContent"
}

Getting Console Logs

To retrieve console messages from the browser:

// Example of using the get_console_logs tool
{
  "tool": "get_console_logs",
  "filter": "error" // Optional: filter by log level
}

Navigating Between Pages

To navigate through browser history:

// Example of using the navigate tool
{
  "tool": "navigate",
  "action": "back" // Options: back, forward, refresh
}

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "vscode-simple-browser" '{"command":"node","args":["/path/to/vscode-simple-browser-mcp/build/index.js"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

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.

Adding an MCP server to Cursor globally

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": {
        "vscode-simple-browser": {
            "command": "node",
            "args": [
                "/path/to/vscode-simple-browser-mcp/build/index.js"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "vscode-simple-browser": {
            "command": "node",
            "args": [
                "/path/to/vscode-simple-browser-mcp/build/index.js"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later