By now youâve used opencode to do real work: Part 3 had it clean a CSV and answer a question about it. But so far opencode only really knows two things: the files in front of it, and whatever its training taught it.
Thatâs about to change. In this Part 5, youâre going to give it the ability to reach the outside world, and thatâs where things get exciting.
Picture what your agent could do for you tomorrow:
- Answer questions that need todayâs data: âWhat are the latest quarterly earnings for these five companies, and whoâs growing fastest?â It searches the live web, pulls real figures, and cites sources, not a guess from memory.
- Bring you a morning briefing: âScan todayâs news on retail, summarize the top 5 stories, and save me a short brief.â It reads a dozen articles and hands you one clean summary.
- Go get data that has no âexportâ button: âOpen our supplierâs public dashboard, navigate to last month, and copy the table into my workbook.â It drives a real browser, clicks around, and retrieves what you need.
- Archive evidence for your reports: âSave this page as a PDFâ or âgrab that competitorâs pricing table as a CSV.â
Each of those is exactly the kind of task youâve been doing by hand (checking figures, gathering sources, pulling data), now on autopilot. And none of it needs you to be a programmer.
What makes all of this possible is MCP (Model Context Protocol), a standard way to attach extra tools to an AI assistant. Think of it as handing opencode a toolbox it can reach into on demand. Each tool is called an MCP server. In this post youâll add two of them: Exa (searches the web) and Playwright (drives a browser).
Fun fact: these are the same two servers that keep this blogâs own AI workflow running, so youâre wiring up the exact tricks that power what youâre reading. Hereâs how to set them up.
First: open opencodeâs settings file
MCP servers are declared in opencodeâs config file, called opencode.json, sitting in your user config folder. The easiest way to edit it while keeping the format valid is call opencode and run the /mcp command, which walks you through adding servers. If youâd rather edit by hand, the file lives at:
- Windows:
%USERPROFILE%\.config\opencode\opencode.json
Both servers below get added under the same top-level "mcp" block, alongside whateverâs already there.
Server 1: Exa (live web search)
For âanswer a current questionâ work, Exa is the add-on you want. Without it, opencode answers from memory; with it, it can search the web and read pages in real time, so you can ask âwhat are the current revenue numbers for these three companies?â and get todayâs answer, not a stale one.
Easiest way: have opencode set it up for you. Copy this, open opencode, paste it in and let it edit its own config:
Add the Exa MCP server to my opencode config so I can search the web live.
Add it to the "mcp" section in opencode.json:
exa: {
"type": "remote",
"url": "https://mcp.exa.ai/mcp?tools=web_search_exa,web_fetch_exa,web_search_advanced_exa",
"enabled": true
}
Keep anything else in the file untouched. Tell me when it's ready.
Thatâs the whole flow: opencode reads the prompt, adds the config, and tells you itâs ready. Prefer to edit by hand? Hereâs the config it ends up with (mirrors the exact setup this blog uses):
"mcp": {
"exa": {
"type": "remote",
"url": "https://mcp.exa.ai/mcp?tools=web_search_exa,web_fetch_exa,web_search_advanced_exa",
"enabled": true
}
}
What the pieces mean:
"type": "remote"means the Exa server runs online, so opencode just points at it over the internet.- the
urlis Exaâs search server. The?tools=...part picks which abilities you want (simple search, page reading, advanced filtered search). "enabled": trueturns it on.
Exa has a free tier, so you can start without configuring billing. Restart opencode after editing the file (or use /mcp to connect it live without restarting).
Try it. Ask opencode something fact-based and current, like:
âSearch the web and tell me the top 5 books on data visualization recommended this year, with a one-line summary of each.â
You should see it reach out and come back with sourced answers. Official docs: exa.ai/docs/reference/exa-mcp.
Server 2: Playwright (browser automation)
Where Exa reads the web, Playwright drives it: it can open a browser, go to a page, scroll, fill forms, log in, and copy the results. Thatâs huge for data work: grabbing something from a site that has no easy export button, grabbing a table off a dashboard, or checking a live page.
Playwright is a local server, so it spawns a real browser on your machine.
Easiest way: have opencode set it up for you. Same trick as Exa: copy this, paste it into opencode, and it installs the server:
Add the Playwright MCP server to my opencode config so I can control a browser.
Add it to the "mcp" section in opencode.json:
playwright: {
"type": "local",
"command": ["npx", "@playwright/mcp@latest"],
"enabled": true
}
Keep anything else in the file untouched. Tell me when it's ready.
Prefer to do it by hand? Add it like this:
"mcp": {
"playwright": {
"type": "local",
"command": ["npx", "@playwright/mcp@latest"],
"enabled": true
}
}
Differences from Exa at a glance:
"type": "local": the server runs on your computer rather than on a hosted URL."command": how opencode starts it.npx @playwright/mcp@latestfetches and runs the Playwright server. The browser itself downloads automatically the first time you use it.
By default it opens a visible browser window (headed mode), so you can watch what itâs doing. If youâd rather it run invisibly in the background, add "--headless" as another line in the command list.
Try it. Give opencode a task that needs interacting with a real site; start simple, something public:
âOpen the Wikipedia page for âData visualizationâ, scroll to the history section, and summarize the first two paragraphs.â
Watch a browser window open and move by itself. Official docs: playwright.dev/mcp.
Two safety notes. First, Playwright acts on real websites with your sessions, so only use it on sites youâre allowed to be using and give it specific tasks (donât hand it your bank login). Second, every MCP server you add puts a little more load on the conversation, so only keep the ones you actually use.
The mental model
Youâve now seen the full picture of what opencode can do:
- Files (Parts 1 to 3): it edits your project.
- Skills (Part 4): it follows a packaged method you give it.
- MCP servers (this part): it can reach the outside world: live web (Exa) and real browsers (Playwright).
Whatever AI tool you pick up later, these three ideas (the agent, the skill, the connector) are the ones that keep showing up. The setup differs slightly per tool, but the shape is always the same.