AI App StudioGOOGLE PREFERRED SOURCEAdd AI App Studio

TinyFish + OpenCode: Free Web Search for AI Agents

Add free live web search and page fetch to OpenCode or Crush using TinyFish MCP. Step-by-step setup guide — config file, API key, and prompt examples included.

TinyFish + OpenCode: Free Web Search for AI AgentsFIELD GUIDE / 001
Image: AI App Studio
On this page
  1. What TinyFish adds to OpenCodeHello
  2. Before you start
  3. Step 1: Check whether OpenCode web search already works
  4. Step 2: Create your TinyFish account
  5. Step 3: Open the correct OpenCode config file
  6. Step 4: Back up the file before editing
  7. Step 5: Add the TinyFish MCP configuration
  8. Step 6: Restart OpenCode Desktop
  9. Step 7: Complete TinyFish OAuth authentication
  10. Step 8: Test Search and Fetch separately
  11. Step 9: Prepare a local model for web research
  12. The best TinyFish workflow for coding research
  13. Copy-paste prompt for safe web research in OpenCode
  14. Optional: Install the TinyFish skill
  15. How to keep token use under control
  16. Does web search stop AI hallucinations?
  17. Troubleshooting
  18. A 15-minute setup plan
  19. Your next step
  20. Final verdict: a small setup that buys you control

Your local model can write a clean function and still hand you an install command for a package that changed months ago. It sounds equally sure either way. Training data has a cutoff, and live web access gives the model a way to check what is true today.

TinyFish adds that check to OpenCode Desktop through MCP. Its Search tool finds current pages and returns titles, snippets, and URLs. Its Fetch tool takes a URL you already have and returns clean page content instead of raw HTML.

Search and Fetch cost 0 credits on every TinyFish plan. Rate limits still apply, and they are generous enough for normal research.

This guide covers the OpenCode desktop app. Windows paths come first, with macOS and Linux right after. Your model can be a cloud model, an LM Studio model, or an Ollama model, as long as it supports tool calling. Yoooooooooooooooooooooooooooooooooo

Hello Broooooo
Hello Broooooo
⚡ Direct answer

To connect TinyFish to OpenCode Desktop, add the TinyFish remote MCP server to your opencode.jsonc file, fully quit OpenCode, then trigger a TinyFish tool call. OpenCode opens your browser for TinyFish OAuth, so no API key belongs in the config file.

Use Search when you need to discover current sources and Fetch when you already have the URL. Both are free. TinyFish Agent and Browser are separate products that spend credits, so name the tool you want in your prompt.

Check one thing first: OpenCode ships with a webfetch tool, and a websearch tool that only appears on the OpenCode provider or with the OPENCODE_ENABLE_EXA environment variable set.

What TinyFish adds to OpenCode

Hello

TinyFish exposes 4 web tools through one MCP connection, and they are not interchangeable.

ToolUse it forCost
SearchFinding current pages, titles, snippets, and URLsFree
FetchReading and cleaning content from URLs you already haveFree
AgentCompleting multi-step actions on a website1 credit per step
BrowserOpening a remote browser session for direct control1 credit per 4 browser-minutes

OpenCode registers MCP tools with the server name in front, so the tool calls in your session will read tinyfish_search and tinyfish_fetch_content rather than the product names. Worth knowing before you go looking for a tool called Fetch.

For normal research or coding work, Search and Fetch are usually enough. A good pattern looks like this:

  1. Search for the best current sources.
  2. Keep the 2 to 4 most useful URLs.
  3. Fetch those pages.
  4. Ask the model to compare the evidence.
  5. Make code changes only after the evidence is clear.

That uses far less context than fetching every result, and it gives a small local model a much easier job.

Before you start

You need:

  • OpenCode Desktop installed and opening normally.
  • A working model selected inside OpenCode.
  • A free TinyFish account. Sign-up takes no card, and new accounts start with 500 credits for the paid tools.
  • A text editor such as Notepad, VS Code, or Notepad++.
  • A backup copy of your OpenCode config.
  • A default browser where you can sign in to TinyFish.

Running a local model? Start the LM Studio or Ollama server before you test the MCP connection.

Dependable tool calling matters more here than raw model quality. OpenCode's own provider guide warns that some local models handle tool calls far better than others.

Step 1: Check whether OpenCode web search already works

Open a new OpenCode session and try this:

Use the built-in websearch tool to find the current official OpenCode MCP server documentation. Return the page title and URL.

If the model calls websearch and gives you the official OpenCode page, you already have basic live search.

Websearch is not always there

The webfetch tool is built in and always available. The websearch tool only appears when you use the OpenCode provider, or when you launch OpenCode with OPENCODE_ENABLE_EXA set to a truthy value. On a local model with no OpenCode Zen key, that test prompt will fail.

Terminal
OPENCODE_ENABLE_EXA=1 opencode

You may still prefer TinyFish when:

  • Your local model ignores the built-in tool.
  • You want TinyFish Fetch for cleaner page retrieval.
  • You use TinyFish in other MCP-compatible tools and want one consistent workflow.
  • You want your web research tools kept separate from OpenCode's built-in ones.
  • You need the structured Search and Fetch behavior TinyFish returns.

Avoid enabling several overlapping search MCPs without a reason. Every MCP server adds its tool descriptions to the model's context, and OpenCode's docs flag that this piles up quickly.

Step 2: Create your TinyFish account

Go to agent.tinyfish.ai and create an account. No credit card is required, and Search and Fetch work straight away.

You do not need to create an API key for this MCP setup. TinyFish's REST API uses API keys, while its MCP endpoint uses OAuth 2.1. The browser login connects OpenCode to your TinyFish account and caches the authorization for later sessions.

Search and Fetch sit at 0 credits on every plan. What changes between plans is how fast you can call them.

PlanSearch rate limitFetch rate limit
Pay as you go (free to start)30 requests per minute150 URLs per minute
Starter, $15 per month60 requests per minute300 URLs per minute
Pro, $150 per month120 requests per minute600 URLs per minute

Going over the limit returns a 429 error rather than an unexpected charge. For one developer doing manual research, the free tier is plenty.

Step 3: Open the correct OpenCode config file

Windows

1
Shut down

Fully close OpenCode Desktop

The desktop app runs a local OpenCode server in the background, so closing the window is not the same as quitting. Check the system tray and end it properly.

2
Shortcut

Press Windows + R

This opens the Run box.

3
Path

Paste this path: %USERPROFILE%\.config\opencode\opencode.jsonc

This is the Windows location OpenCode's current desktop troubleshooting guide uses for the global config.

4
Open

Press Enter

5
Edit

Open the file in a text editor

If the file does not exist, check whether you have opencode.json in the same folder. OpenCode accepts both JSON and JSONC.

macOS and Linux

Open:

Config path
~/.config/opencode/opencode.jsonc

Some older installations keep it here instead:

Older installs
~/.local/share/opencode/opencode.jsonc

Global or project-only setup?

The global config makes TinyFish available across all your OpenCode projects.

You can also create an opencode.json file in one project's root folder, which keeps TinyFish limited to that project. OpenCode merges its config sources, so project settings override conflicting global keys without deleting unrelated values.

For a first setup, the global config is simpler.

Step 4: Back up the file before editing

Copy opencode.jsonc and rename the copy to something like:

Backup file
opencode-backup-before-tinyfish.jsonc

Do not delete your existing config and replace it blindly. Your current file may already contain:

  • Your LM Studio or Ollama provider.
  • A default model.
  • Other MCP servers.
  • Permissions.
  • Plugins.
  • Compaction settings.
  • Project instructions.

The safe job is to add the tinyfish entry inside the configuration you already have.

Step 5: Add the TinyFish MCP configuration

If your config is empty or only contains the schema line, use this:

opencode.jsonc
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "tinyfish": {
      "type": "remote",
      "url": "https://agent.tinyfish.ai/mcp",
      "enabled": true
    }
  }
}

OpenCode requires every remote MCP entry to include type: "remote" and the server URL. The current TinyFish MCP endpoint is https://agent.tinyfish.ai/mcp.

Two URLs float around

The TinyFish cookbook README shows mcp.tinyfish.ai in one snippet, while the MCP integration docs use https://agent.tinyfish.ai/mcp for every client they list. Use the docs URL, and treat a connection failure on the other one as expected.

If you already have an mcp object, add TinyFish inside it:

opencode.jsonc
{
  "$schema": "https://opencode.ai/config.json",
  "model": "your-existing-provider/your-existing-model",
  "mcp": {
    "your-existing-server": {
      "type": "remote",
      "url": "https://example.com/mcp",
      "enabled": true
    },
    "tinyfish": {
      "type": "remote",
      "url": "https://agent.tinyfish.ai/mcp",
      "enabled": true
    }
  }
}

Keep your real provider, model, plugin, permission, and instruction settings. The example only shows where the TinyFish entry belongs.

Common JSON mistakes

Watch for:

  • A missing comma before "tinyfish".
  • Two separate top-level "mcp" objects.
  • Smart quotes copied from a formatted document.
  • A closing brace in the wrong place.
  • Deleting an existing provider block.
  • Saving the file as opencode.jsonc.txt.

JSONC allows comments and trailing commas. The object structure still has to be valid.

Step 6: Restart OpenCode Desktop

Save the config, close the editor, and launch OpenCode Desktop again.

A full restart matters because OpenCode loads MCP configuration when it starts. If the app was only minimized to the system tray, quit it completely and reopen it.

Open a fresh project session after the restart.

Step 7: Complete TinyFish OAuth authentication

Use a prompt that clearly names the TinyFish tool:

Use TinyFish Search only. Find the current official OpenCode MCP server documentation and return the title, URL, and publication or update date if shown. Do not use TinyFish Agent or Browser.

On the first TinyFish call, OpenCode should detect that the remote MCP needs authorization and open your browser. Then:

1
Sign in

Sign in to TinyFish

TinyFish recommends being signed in at agent.tinyfish.ai in your default browser before the flow starts, since that is where the redirect lands.

2
Review

Review the authorization request

3
Approve

Approve it

4
Return

Return to OpenCode

5
Retry

Run the same prompt again if it does not continue automatically

OpenCode handles OAuth for compatible remote MCP servers on its own. It detects the 401 response, registers itself with the server automatically where that is supported, and stores the tokens in ~/.local/share/opencode/mcp-auth.json for later sessions.

If the browser never opens, you can start the flow by hand:

Terminal
opencode mcp auth tinyfish
No API key in the config

Nothing goes in the JSONC file for this method. The MCP endpoint authenticates over OAuth 2.1, and the API key you see in the TinyFish dashboard is for the REST API.

Step 8: Test Search and Fetch separately

Testing one tool at a time makes problems much easier to spot.

Search test

Use TinyFish Search only. Find 3 current official sources about the latest stable version of [FRAMEWORK OR TOOL]. Return the title, publisher, date if shown, URL, and one sentence explaining why each source matters. Do not use TinyFish Agent or Browser.

A successful result shows a TinyFish Search tool call and returns several URLs.

Fetch test

Choose one URL from the Search result and use:

Use TinyFish Fetch only to read this URL: [PASTE URL]. Summarize the page in 5 bullets. Separate confirmed facts from your interpretation. Include the source URL. Do not use TinyFish Agent or Browser.

A successful result shows the Fetch tool reading that specific page.

Search is for discovery. Fetch is for retrieval. TinyFish's API guide draws the same line, and so does OpenCode's own tools page.

Step 9: Prepare a local model for web research

A model can be strong at chat and code generation and still be poor at tool calling. TinyFish cannot fix that half.

LM Studio

Confirm that:

  • The model is loaded.
  • The local server is running.
  • OpenCode points to http://127.0.0.1:1234/v1.
  • The model supports tool or function calling.

When tool calls keep failing, load a model with stronger tool support. OpenCode's docs point to Qwen-Coder or DeepSeek-Coder variants as reliable choices.

Ollama

Confirm that:

  • Ollama is running.
  • OpenCode points to http://localhost:11434/v1.
  • The selected model supports tools.
  • The context window is large enough for the task.

These are the current default local endpoints shown in OpenCode's provider documentation. Ollama can also configure itself for OpenCode through its own integration docs, which saves you writing the provider block by hand.

How much context do you need?

There is no universal minimum of 64,000 tokens. A practical starting point:

  • 16K to 32K: simple searches, 1 or 2 fetched pages, short coding questions.
  • 64K: safer for multi-source research, long documentation, and codebase comparison.
  • Above 64K: useful only when your model and hardware can handle it without becoming painfully slow.

OpenCode's Ollama guidance suggests raising num_ctx and starting around 16K to 32K when tool calls are failing. More context helps, and it also increases RAM or VRAM use and slows local generation.

Context size is a poor substitute for a controlled workflow. Search first, fetch only the best pages, and ask for a focused answer.

The best TinyFish workflow for coding research

The cleanest workflow is a small research funnel.

1. Define the exact question

Weak: Search the web and tell me about React.

Better: Find the current official React documentation for server components and identify the API changes that affect this project.

2. Search official sources first

Ask TinyFish Search to prioritize:

  • Official documentation.
  • Official release notes.
  • Maintainer repositories.
  • Standards pages.
  • Original research.

3. Fetch only the useful pages

Do not fetch 10 pages because 10 appeared in the results.

Fetch 2 to 4 strong sources. A small model compares a few clean pages far more reliably than a huge pile of mixed-quality text. TinyFish Fetch accepts up to 10 URLs in a single request, which makes over-fetching easy, so set the limit yourself.

4. Compare the web evidence with your project

Ask the model to inspect the relevant files after it has read the current docs.

5. Require a plan before edits

This keeps a weak search result from turning into an immediate code change.

6. Verify the final change

Ask the model to state:

  • Which source supported the change.
  • Which files were edited.
  • What assumptions remain.
  • What test should confirm the result.

Copy-paste prompt for safe web research in OpenCode

Use this once TinyFish Search and Fetch are working.

Role: Act as a careful software research assistant inside OpenCode. You are good at checking current documentation, comparing it with an existing codebase, and separating facts from assumptions. Context: I am working on [PROJECT NAME] using [LANGUAGE, FRAMEWORK, AND VERSION]. I need current information before changing the code. The question is: [EXACT QUESTION]. Task: Use TinyFish Search to find the best current sources. Then use TinyFish Fetch on the 2 to 4 strongest pages. Compare the verified information with the relevant files in this project. Do not edit any file until you show me the evidence and a proposed plan. Inputs: Project folder: [PATH OR PROJECT NAME]. Relevant files: [FILES OR UNKNOWN]. Known URLs: [OPTIONAL URLS]. Target date or version: [DATE OR VERSION]. Constraints: Prefer official documentation, release notes, maintainer repositories, standards pages, and original sources. Use TinyFish Search and TinyFish Fetch only. Include direct URLs and visible dates. Keep fetched sources to 4 unless another source is required to resolve a conflict. What to avoid: Do not use TinyFish Agent or Browser. Do not answer only from model memory. Do not invent a version, citation, benchmark, or quote. Do not copy code from an older tutorial without checking compatibility. Do not edit files before approval. Output format: 1. Direct answer 2. Sources with title, publisher, date, and URL 3. Confirmed facts 4. Conflicts or uncertainty 5. Comparison with the current project 6. Proposed file changes 7. Risks and tests 8. Approval checkpoint Quality checks: Confirm that every important factual claim has a source. Check that source versions match the project. Flag missing dates and uncertain claims. Verify that the proposed code uses the current API. Stop before editing and ask for approval.

This prompt is deliberately strict. It keeps the local model focused, limits how much web content lands in the session, and lowers the chance that one weak result turns into a code change.

Optional: Install the TinyFish skill

TinyFish publishes an official use-tinyfish skill that teaches coding agents when to choose Search, Fetch, Agent, or Browser. The cookbook lists OpenCode among the supported coding agents.

The one-line installer:

Terminal
npx skills add github.com/tinyfish-io/tinyfish-cookbook --skill use-tinyfish

For a project-local manual install, the final file belongs here:

Project skill path
.opencode/skills/use-tinyfish/SKILL.md

OpenCode discovers project skills from .opencode/skills/<name>/SKILL.md and global ones from ~/.config/opencode/skills/<name>/SKILL.md. A stray skill.md in your project root does nothing, and the filename has to be in capitals.

The skill is optional. Skip it when your model already picks the correct TinyFish tools from clear prompts. Small models often benefit from the extra guidance, and every added instruction also spends context.

How to keep token use under control

Web access fills a local model's context quickly, and the search itself is rarely the only problem.

Your context window is one desk. Tool descriptions, search results, fetched pages, your project files, and the model's answer all have to fit on it at the same time.

Use these rules:

  1. Search before fetching.
  2. Fetch only 2 to 4 pages.
  3. Prefer official sources over 10 secondary summaries.
  4. Ask for a structured answer.
  5. Use one research question per session.
  6. Start a new session before implementation if the research session became large.
  7. Disable MCP servers you are not using.
  8. Avoid asking a small model to research, inspect an entire repository, edit files, and write documentation in one turn.
  9. Keep long generic skill files out of projects that do not need them.
  10. Tell the model to use Search and Fetch only when you want to avoid the paid TinyFish tools.

Rule 7 is easy to miss, and OpenCode gives you a clean way to do it. Disable a server's tools globally with a glob, then switch them back on for the one agent that needs them:

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "tools": {
    "tinyfish*": false
  },
  "agent": {
    "research": {
      "tools": {
        "tinyfish*": true
      }
    }
  }
}

OpenCode warns that MCP tools add to context, and that heavy servers can push a session past the limit on their own. A bigger context window gives you room. A cleaner workflow usually gives you a better answer.

Does web search stop AI hallucinations?

No.

Live web access lowers the chance of an answer being stale or invented from memory, and it gives the model evidence it can cite. The model can still:

  • Choose a weak source.
  • Misread a page.
  • Mix facts from different versions.
  • Treat a search snippet as full evidence.
  • Ignore a conflicting source.
  • Produce a citation that does not support the sentence.

For important coding, security, legal, medical, or financial decisions, open the source yourself and verify the critical claim.

Search for the source, fetch the actual page, show the URL, separate fact from inference, and flag uncertainty.

Troubleshooting

TinyFish does not appear or respond

Check:

  • The config file path is correct.
  • The file is named opencode.jsonc or opencode.json.
  • The TinyFish object sits inside "mcp".
  • The server type is "remote".
  • The URL is exactly https://agent.tinyfish.ai/mcp.
  • OpenCode was fully restarted.
  • The JSON braces and commas are valid.

This command lists every configured MCP server with its auth status, which settles most of the guesswork:

Terminal
opencode mcp list

Restore your backup if OpenCode stops opening after the edit.

The browser login does not open

Start a new session and ask explicitly for TinyFish Search. Then check that your default browser can reach TinyFish and that you are signed in there, because the OAuth redirect lands in whichever browser your system treats as default.

If authentication still fails, run the diagnostics rather than rewriting the config:

Terminal
opencode mcp auth list
opencode mcp debug tinyfish

The debug command shows the auth status, tests HTTP connectivity, and attempts the OAuth discovery flow.

The model answers without calling TinyFish

Say this:

Do not answer from memory. Call TinyFish Search first and show the source URLs.

If it still refuses, switch to a model with stronger tool-calling support. This is common with small local models.

The model calls TinyFish Agent or Browser

Stop the run if you only intended to use the free tools, then use explicit wording:

Use TinyFish Search and TinyFish Fetch only. Do not use run_web_automation or create_browser_session.

Agent costs 1 credit per run step and Browser costs 1 credit per 4 browser-minutes, while Search and Fetch stay at 0. Prompts are one layer of protection, and permissions are a firmer one:

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "tinyfish_run_web_automation": "ask",
    "tinyfish_create_browser_session": "ask"
  }
}

Now the paid tools need your approval before they run.

You get a 429 error

You reached the Search or Fetch rate limit. Wait for the limit window to reset, reduce repeated calls, and try again.

The free-tier limits are high enough for normal manual research. A looping agent can hit them in under a minute.

The context window fills too quickly

Reduce the number of fetched pages. Ask for shorter extracts. Start a new session after the research phase.

A 64K window helps with multi-source work, and it will not rescue an agent that fetches everything it sees.

A 15-minute setup plan

Minutes 0 to 3

  • Create or sign in to TinyFish.
  • Close OpenCode.
  • Find and back up opencode.jsonc.

Minutes 3 to 7

  • Add the TinyFish remote MCP object.
  • Validate the braces and commas.
  • Save the file.

Minutes 7 to 10

  • Restart OpenCode.
  • Open a fresh session.
  • Trigger TinyFish Search.
  • Complete browser authentication.

Minutes 10 to 15

  • Run the Search test.
  • Fetch one official page.
  • Try the safe research prompt on one real coding question.

Do not install the optional skill until the basic MCP connection works. That keeps setup problems separate from instruction problems.

Your next step

Back up your OpenCode config, add the TinyFish MCP entry, and run the Search-only test prompt.

Once it returns current official sources, fetch one of those pages and compare the result with your model's memory-only answer. That small test shows you whether TinyFish improves your actual OpenCode workflow before you add more skills, tools, or automation.

Final verdict: a small setup that buys you control

TinyFish is a useful OpenCode addition when you run local models, research fast-changing software, or want a predictable Search-and-Fetch workflow through MCP. The setup is small: one remote MCP entry, one restart, and one browser authorization.

Its strongest practical benefit is control. You can ask the model to discover sources first, read only the best pages, and show the evidence before it touches your project, which is far safer than letting a local model guess which API behavior is current.

I would skip it if OpenCode's built-in webfetch already covers your research and your model calls it reliably. Duplicate tools cost context even when they cost no money.

The main risk is tool confusion, since the same MCP connection exposes paid Agent and Browser tools beside the free Search and Fetch. Name the tools in your prompt, watch the tool name being called, and stop a run that reaches for a paid tool you did not request.

Start with 1 Search test, 1 Fetch test, and 1 real documentation question. Once those three work, you have a practical web research layer for OpenCode.

Key takeaways

  • TinyFish Search finds current URLs and TinyFish Fetch reads the pages you select, both at 0 credits on every plan.
  • Pay-as-you-go allows 30 Search requests and 150 fetched URLs per minute, so a 429 error means rate limiting rather than a surprise bill.
  • TinyFish Agent and Browser consume credits, so name the free tools in your prompt or set them to ask in your permissions.
  • OpenCode's webfetch is always built in, while websearch needs the OpenCode provider or OPENCODE_ENABLE_EXA, which is the main reason local-model users add TinyFish.
  • Back up opencode.jsonc and merge the tinyfish MCP entry into your existing config instead of replacing the file.
  • OpenCode handles TinyFish authentication through a browser OAuth flow, and opencode mcp auth, mcp list, and mcp debug fix most connection problems.
  • Search first and fetch only the best 2 to 4 pages, because a local model needs good tool calling and a clean workflow more than an enormous context window.
Start connecting

Give Your Local Model a Live Web Connection

More practical guides on wiring MCP servers, skills, and research workflows into your coding agents are on ai-app-studio.com.

Step 1 Back up your config Copy opencode.jsonc before you touch it, so a bad brace never costs you a working setup.
Step 2 Add one MCP entry Paste the tinyfish remote server block, restart OpenCode, and finish the browser sign-in.
Step 3 Read more agent guides Browse our AI Agents section for more workflows you can build this week.
Explore All AI Workflow Guides Best used when: you run a local model in OpenCode and need it to check live documentation before it edits your code.
QUICK ANSWERS

Questions readers usually ask

What are Oracle Cloud's current Ampere A1 Always Free limits in 2026?

Deploy a personal 24/7 AI agent on Oracle Cloud Free Tier using Hermes Agent, Coolify, and Telegram. Step-by-step with June 2026 Oracle limit updates.

What is Hermes Agent and who built it?

Hermes Agent is an open-source autonomous AI agent built by Nous Research, released under the MIT license. It connects to external model providers including Nous Portal, OpenRouter, and any OpenAI-compatible endpoint. It supports Telegram, Discord, Slack, and WhatsApp messaging through a persistent gateway process on your server.

Comment
READER NOTES

Discussion

?
Join the discussion

Sign in to leave a comment, reply, or vote on a reader note.

THE USEFUL AI NEWSLETTER

Liked the guide?
Keep the signal.

One sharp email each week: the AI news worth knowing, one workflow worth trying, and the apps that passed our test.

No spam. No recycled launch notes. Unsubscribe anytime.