DEV Community

Cover image for OpenCode Can Write Code. What If It Could Use Your Browser Too?
Rijul Rajesh
Rijul Rajesh

Posted on

OpenCode Can Write Code. What If It Could Use Your Browser Too?

Hello, I'm Rijul, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. Star us to help devs discover the project, give it a try, and share your feedback to help improve the product.


We use AI agents for all sorts of tasks. Some agents can even interact with your browser and act as companions while you work.

As someone who uses OpenCode, I wanted to bring that capability into my workflow. I wanted OpenCode to interact with my browser so it could access the relevant browser context while helping me with tasks.

In this article, let's see how to connect your browser to OpenCode using Browser MCP.

1. What You Need

To set this up, you need two components:

  • Browser extension: Connects your browser to the MCP server.
  • Local MCP server: Allows your AI client to interact with the browser through the Model Context Protocol (MCP).

Let's set them up.

2. Install the Browser Extension

First, visit the following page to install the Browser MCP extension:

https://browsermcp.io/install

Browser MCP extension installation page

After installing the extension, you'll be directed to a page with more information.

Browser MCP setup page

This page links to the official Browser MCP documentation, where you can find additional setup instructions and details about how it works:

https://docs.browsermcp.io/

3. Add the MCP Server to OpenCode

Next, configure OpenCode to use the Browser MCP server.

Open your OpenCode configuration file and add the following configuration:

    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "browsermcp": {
          "type": "local",
          "command": ["npx", "-y", "@browsermcp/mcp@latest"]
        }
      }
    }
Enter fullscreen mode Exit fullscreen mode

This configuration tells OpenCode to start the Browser MCP server locally using npx.

Save the configuration after adding it.

4. Connect and Test the Browser

Once you've configured the MCP server, make sure Browser MCP is connected.

Browser MCP connection in OpenCode

Now, let's test whether it works.

Go to OpenCode and give it a task that requires browser interaction. For example:

    Go to the Wikipedia page for "Open-source software" and list the main section headings.
Enter fullscreen mode Exit fullscreen mode

The Browser MCP server allows OpenCode to interact with the browser and navigate to the requested page.

Browser MCP navigating to the Wikipedia page

Here's the result returned by the agent.

OpenCode agent's result

As you can see, OpenCode can use the browser to complete the task instead of relying only on the information already available in the conversation.

Conclusion

That's how you can connect Browser MCP to OpenCode.

This setup lets you bring browser interaction into your AI-assisted workflow. Instead of working with your AI agent and browser separately, you can give OpenCode tasks that involve navigating web pages and gathering information through the connected browser.

It can be useful when you want your AI coding assistant to work with relevant information from the web alongside your existing workflow.

That's it for this article. See you in the next one!



Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.

I'm building LiveReview, a blast-radius aware AI code review built for your business-critical systems.

Instead of presenting every diff with equal emphasis, LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.

Spend code review effort where business risk is highest — not spread evenly across every diff.

⭐ Star it on GitHub:

GitHub logo HexmosTech / LiveReview

Risk-Aware AI Code Review for Business-Critical Systems

LiveReview

gitleaks.yml osv-scanner.yml govulncheck.yml semgrep.yml dependabot-enabled mcp-testcases.yml

LiveReview: Risk-Aware AI Code Review for Business-Critical Systems

LiveReview is an AI code reviewer that scores every hunk of a diff by blast radius: how far a change reaches through your call graph, how much persistent state it touches, and how well-tested it is. A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your team's attention goes to the highest-risk code first, not spread evenly across every diff.

blast-radius-demo.mp4

LiveReview's Blast Radius & Review Priority scoring, live in the diff viewer.
















The exact math, not a black box Visualize blast radius at a glance Every factor that feeds the score

How does Blast Radius scoring work? (a more technical explanation)

Here's the goal:

  • A 3-line fix in a function used by 40 other files, that also writes to a database, should score high.
  • A 300-line UI change in one file, fully covered by tests…




Click below to try LiveReview with your codebase:

LiveReview Banner

Top comments (0)