OpenCode MCP Setup: Web Search, Fetch and Browser Automation with TinyFish

Ninad Pathak
Connect OpenCode to TinyFish — TinyFish Insights

OpenCode has web search and built-in page fetching. However, its built-in fetch doesn't run a page's JavaScript, so content loaded that way can be missing.

You can upgrade web access across all your tool-enabled OpenCode models with tools like TinyFish: an MCP server that packs search, JavaScript-enabled fetch and a managed web agent into one connection. With it, your coding agent can find the relevant documentation, extract useful content from JavaScript-heavy pages and delegate work that needs navigation, filters or forms.

We’re TinyFish, obviously, so we’d rather directly show you what it’s got. To do so, we used OpenCode to research an Express upgrade and check a proposed route fix in an interactive browser tool. That gave Search, Fetch and the Web Agent a job to do in the same workflow, which you can find below.

In this article, we walk you through how to get TinyFish on all your OpenCode models, explain how MCP and the tools work, and then show that Express upgrade workflow step by step.

Connect TinyFish to OpenCode

You'll need OpenCode 2.x, a configured model that supports tool calling, and a TinyFish account. Check your version with opencode --version. Our setup screenshots use OpenCode 2.2.7.

From your project folder, add TinyFish with the command in TinyFish's OpenCode setup instructions:

bash
opencode mcp add tinyfish --url https://agent.tinyfish.ai/mcp
A real OpenCode 2.2.7 terminal capture showing the TinyFish MCP add command and confirmation that the server was added. Personal prompt and path details are blurred.

Run the authentication command and complete the sign-in in your browser:

bash
opencode mcp auth tinyfish

Then check the connection:

bash
opencode mcp list
A real terminal capture showing OAuth completion, followed by opencode mcp list and the status tinyfish connected. Personal prompt details are blurred.

Look for tinyfish with a connected status. Start OpenCode in that folder with opencode, then ask:

Use TinyFish search to find the official Express 5 migration guide. Return its title and URL.

Search and Fetch are free within published limits. However, Web Agent and Browser usage draws from a prepaid TinyFish Wallet – you’ll need to top that up if the Web Agent is necessary for your workflow. See current pricing and limits.

How MCP works in OpenCode

MCP lets OpenCode discover and call tools supplied by a server. Upon being prompted, the model chooses a tool for the task, OpenCode sends the request, and the tool's result returns to the conversation. The MCP works across your OpenCode models as long as they can use tools.

Where the connection is saved

When added, TinyFish's connection details are saved in your current project folder.

For a connection across every project, run this version of the add command in your terminal instead. You can run it from any folder:

bash
opencode mcp add tinyfish --url https://agent.tinyfish.ai/mcp --global

The --global option saves the connection in your personal OpenCode settings, so you don't need to add TinyFish separately in each project. The usual locations are:

  • Project: opencode.json in your project folder.
  • Global: ~/.config/opencode/opencode.json.

OpenCode also accepts files with the .jsonc extension. If your existing configuration uses that extension, keep using it. The configuration guide covers other locations and how settings combine.

What the command saved

The add command wrote this entry to opencode.json in our project folder. The "type": "remote" line tells OpenCode to connect to TinyFish at the URL below:

json
{
  "mcp": {
    "servers": {
      "tinyfish": {
        "type": "remote",
        "url": "https://agent.tinyfish.ai/mcp"
      }
    }
  }
}

This uses OpenCode 2.x's configuration format. You can also add this entry manually. If the file already exists, add tinyfish inside its existing mcp.servers object and preserve your other settings. Then complete the sign-in and connection check from the setup section.

Where the server runs

TinyFish is a remote MCP server: TinyFish hosts it, and OpenCode connects to its URL. Its configuration entry uses "type": "remote" and a url field. That's why the command above uses --url.

A local MCP server runs on your computer. Its entry uses "type": "local" and a command array containing the program and arguments OpenCode should start. Follow that server's installation instructions when adding it.

Authentication and connection

TinyFish uses browser sign-in through OAuth, and OpenCode stores those credentials outside the project configuration.

To check connection status, use opencode mcp list. Inside OpenCode, /mcps lets you view and manage the connections. See OpenCode's MCP documentation.

Control tools for each agent

Once TinyFish is connected, Build and Plan can normally use its tools. You don’t need to change any permissions to follow this guide.

If you want more control, you could require Plan to ask before using the paid Web Agent, while keeping Search and Fetch available.

Select Build and ask:

Update this project’s OpenCode settings so Plan must ask for my approval before starting a TinyFish Web Agent task. Keep TinyFish Search and Fetch available, preserve my other settings, and show me what you changed.

This changes Plan’s permissions. Other agents keep their existing settings.

How to call the right TinyFish web tool

Your model decides which available tool to call based on your request, but naming a tool makes your intended choice clearer. Here are your TinyFish web tools:

Tool Use it when
search You need to find a source. It returns titles, snippets and URLs.
fetch_content You have a URL and need its content. It can render JavaScript-heavy pages and return clean Markdown, HTML or JSON.
run_web_automation The job needs website interaction. Give the Web Agent a URL and a goal involving navigation, controls, forms or pagination.

For a dependency upgrade, Search finds the official migration guide. Fetch reads the guide and package page. If the information requires interaction, such as applying filters or clicking “load more”, the Web Agent can interact with the page directly.

Use Fetch when you only need page content. Our What is TinyFetch guide explains what it extracts and returns.

For an interactive task, TinyFish's Web Agent performs the actions, and TinyFish's Browser supplies the managed session. Your OpenCode model sets the goal and uses the result. The Web Agent handles the web steps with TinyFish's own web-agent model.

TinyFish also provides deep research tools for reports with citations and browser sessions you can control with Playwright or CDP. Both are paid capabilities; see the MCP reference and current pricing.

An example workflow: research an Express upgrade

We asked OpenCode to research an Express 4-to-5 upgrade. One change in the upgrade involves catch-all routes – the rules an app uses to handle requests across multiple web addresses.

Express 5 requires different syntax for these rules. But there’s a detail to get right: a rule that works for /docs might not cover the homepage, /.

We wanted to check that the suggested fix covered both addresses before changing the app. Each tool handled a different part of that job:

  • Search found the official upgrade instructions.
  • Fetch read what needed changing.
  • Web Agent entered the old and new code into an online tester and checked the results.
Search finds the official Express 5 guide; Fetch reads breaking changes and the Node.js requirement; Web Agent enters routes and paths in the playground and reads test results.

We ran this in OpenCode Desktop 2.3.0 with DeepSeek V4.1 Flash Free on 14 November 2026, then repeated the same task with GPT-6.1 Sol. The browser step used the paid Web Agent, which draws from the prepaid Wallet; see current pricing.

Here’s the task we gave OpenCode:

We're upgrading an Express app from v4 to v5. Use only the tinyfish MCP tools for web access.
1. Use search to find the official Express 5 migration guide.
2. Use fetch_content to read it. Explain the changes needed for app.del(), req.param() and wildcard routes such as '/*', plus the Node.js requirement.
3. Use run_web_automation at https://bjohansebas.github.io/playground-router/ to test the wildcard change in the browser. Keep the Version selector on Express v5 and keep the default options. Enter these Route / Path pairs in order: '/*' with '/docs'; '/*splat' with '/'; '/{*splat}' with '/'; '/{*splat}' with '/docs'. For each pair, read and report the displayed match result or error. Return the version shown and the browser actions completed. Capture screenshots if supported. Use one Web Agent run, limited to 300 seconds; if it returns a pending run, check that same run rather than starting another.
Keep the final answer under 350 words with source URLs and a compact table of the four browser results. Report failures plainly. Do not use OpenCode's own browser, run shell commands, edit files, install packages, sign in or submit changes to any account. This is read-only research.

Search found the upgrade instructions

OpenCode called search and found the official Express 5 migration guide. We hadn't supplied its URL. Search gave OpenCode the source to read next.

Fetch read what needed changing

OpenCode called fetch_content with the guide's URL and returned these changes:

  • Use Node.js 18 or higher.
  • Replace app.del() with app.delete().
  • Read parameters explicitly from req.params, req.query or req.body.
  • Give wildcards a name.

DeepSeek's first Fetch call missed required options. OpenCode checked the tool's inputs and retried successfully, then reread the relevant parts of the guide.

The Web Agent checked the route fix

The guide explained the new syntax. To check how it behaved, OpenCode called run_web_automation. The Web Agent entered the four pairs in the Express Playground Router, with Express v5 selected:

A genuine OpenCode screenshot summarizes four browser checks: the unnamed wildcard produces a missing parameter name error, the named wildcard does not match the root path, and the optional named wildcard matches both the root path and slash docs.

The useful finding is the difference between /*splat and /{*splat}. Both name the wildcard, but the braces let the catch-all handle / too. Fetch supplied the migration instructions; the Web Agent checked that behavior by changing the form inputs and reading each result.

This is where the browser step added something: it tested the inputs rather than just reading the page. The task ended with upgrade notes and the four browser results. It didn't change the app or install packages.

Grading the same workflow with two models

We then gave GPT-6.1 Sol the exact same workflow prompt in a new conversation. DeepSeek V4.1 Flash Free ran through OpenCode's free provider; GPT-6.1 Sol ran through OpenRouter. We kept the project and TinyFish connection the same.

Both found the guide, read the migration changes and completed all four browser checks. Both reported the same results: /* caused an error, /*splat missed the homepage, and /{*splat} matched both paths.

Both models found the guide, read changes and checked four route pairs. DeepSeek V4.1 Flash Free: 22s search, 27s fetch, 5m10s Web Agent, 6m11s total. GPT-6.1 Sol: 9s, 6s, 2m3s, 2m27s. One saved run each.

Times include OpenCode's model handling, tool discovery and retries. The full response also includes the final write-up.

For an OpenCode user who switches models, the same TinyFish connection supplied the web tools in both runs. We gave each model the job in plain English; we didn't write a browser script.

How does OpenCode perform without TinyFish? A separate check against built-in fetch

We asked GPT-6.1-sol and DeepSeek V4 Flash to read the Express npm page and update a test project's dependency from 4.17.1. Both ran through OpenRouter in OpenCode 2.2.7, with shell commands and npm lookups ruled out.

With TinyFish: Both models read the page and updated the dependency to 5.3.0, the version returned at test time. The same TinyFish connection worked with both models.

With OpenCode's built-in fetch: GPT-6.1-sol received an HTTP 403 and left the dependency unchanged. DeepSeek V4 Flash read the page and updated it.

Starting with Express 4.17.1, GPT-6.1-sol with built-in fetch received HTTP 403 and left the version unchanged. The other three model/tool combinations updated to 5.3.0. One recorded run per combination.

Troubleshoot the connection and tool calls

The model cannot use tools

The AI model you select in OpenCode needs to know how to request TinyFish tools and use their results.

With MythoMax L2 13B, for example, asking OpenCode to find the official Express 5 migration guide using TinyFish returned the error “No endpoints found that support tool use.”

If you see this error, switch to a model and provider that support tool calling. You don’t need to reinstall TinyFish.

See TinyFish's integration docs for this requirement. After switching models, repeat the short search from the setup section.

OAuth opens the wrong account or does not finish

The sign-in flow uses your default browser. Check which TinyFish account is signed in there, complete authorization and return to the terminal. If the browser does not open, use the authorization link printed by OpenCode.

To change accounts, run opencode mcp logout tinyfish, then opencode mcp auth tinyfish. For SSH or a remote machine, follow OpenCode's remote sign-in instructions for returning the callback URL.

A configuration change has not taken effect

In the terminal where you normally start OpenCode, run pwd to see which folder you're in. Open the opencode.json file in that folder and check that your changes were saved there.

If you added TinyFish with --global, check ~/.config/opencode/opencode.json instead. If your existing file ends in .jsonc, use that file. See OpenCode's configuration guide for other locations.

Then, from your project folder, run:

bash
opencode reload

OpenCode 2 can reload configuration without restarting the server. If you need to restart the background service, wait for your active work to finish, then use opencode service restart. These are documented in the CLI commands reference. Recheck the connection and try the short search afterward.

Turn off servers you're not using

If you've connected several MCP servers, you can disconnect the ones you don't need. Type /mcps inside OpenCode to open the server menu, then select a server and disconnect it. This leaves its saved configuration unchanged. See OpenCode's server-management instructions.

To keep a server switched off, you can ask OpenCode to change the configuration for you:

Disable the MCP server named [server name] in this project's configuration. Keep its connection details so I can enable it again later, and show me what you changed.

Try TinyFish in OpenCode

Connect TinyFish to OpenCode, then try it on a dependency upgrade or SDK error. Ask OpenCode to find the official docs and explain what to do next, with links to its sources.

Use TinySearch to discover the right documentation, then TinyFetch to read the page content, including JavaScript-rendered pages. For an upgrade, ask for the breaking changes, version requirements and tests you should run. Your chosen OpenCode model can use that evidence to plan the next code changes.

When the answer depends on interacting with a site, give TinyAgent a specific URL and goal. Try a focused check like the route-testing example above: choose the inputs, describe the expected output, and ask it to report what the page actually shows. TinyAgent handles the browser steps and returns results for OpenCode to use.

If you haven’t connected yet, follow the TinyFish MCP setup guide and select OpenCode. Once connected, give your agent the For Coding Agents documentation for a reference to the available tools. You can keep using the same connection when switching between models that support tool calling.

TinySearch and TinyFetch are free within published limits, with no credit card required to get started. TinyAgent and Browser usage draws from your prepaid Wallet; the pricing page lists current allowances and rates.

Create your free TinyFish account, connect OpenCode, and give your next development task access to the live web.

AI disclosure

Content on this website may be created or refined with the assistance of AI tools and is subject to human editorial review.

FAQ

Questions, answered.

Do I need a TinyFish API key for this setup?

Can I use a local model?

Is the TinyFish MCP server free to use?

Can I keep my existing web-search provider?

Get started

Start building.

No credit card. No setup. Run your first operation in under a minute.

Get $8 in Wallet fundsRead the docs