On this page ⌄
- What TinyFish adds to OpenCodeHello
- Before you start
- Step 1: Check whether OpenCode web search already works
- Step 2: Create your TinyFish account
- Step 3: Open the correct OpenCode config file
- Step 4: Back up the file before editing
- Step 5: Add the TinyFish MCP configuration
- Step 6: Restart OpenCode Desktop
- Step 7: Complete TinyFish OAuth authentication
- Step 8: Test Search and Fetch separately
- Step 9: Prepare a local model for web research
- The best TinyFish workflow for coding research
- Copy-paste prompt for safe web research in OpenCode
- Optional: Install the TinyFish skill
- How to keep token use under control
- Does web search stop AI hallucinations?
- Troubleshooting
- A 15-minute setup plan
- Your next step
- 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

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.
| Tool | Use it for | Cost |
|---|---|---|
| Search | Finding current pages, titles, snippets, and URLs | Free |
| Fetch | Reading and cleaning content from URLs you already have | Free |
| Agent | Completing multi-step actions on a website | 1 credit per step |
| Browser | Opening a remote browser session for direct control | 1 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:
- Search for the best current sources.
- Keep the 2 to 4 most useful URLs.
- Fetch those pages.
- Ask the model to compare the evidence.
- 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:
If the model calls websearch and gives you the official OpenCode page, you already have basic live search.
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.
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.
| Plan | Search rate limit | Fetch rate limit |
|---|---|---|
| Pay as you go (free to start) | 30 requests per minute | 150 URLs per minute |
| Starter, $15 per month | 60 requests per minute | 300 URLs per minute |
| Pro, $150 per month | 120 requests per minute | 600 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
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.
Press Windows + R
This opens the Run box.
Paste this path: %USERPROFILE%\.config\opencode\opencode.jsonc
This is the Windows location OpenCode's current desktop troubleshooting guide uses for the global config.
Press Enter
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/opencode/opencode.jsonc
Some older installations keep it here instead:
~/.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:
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:
{
"$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.
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:
{
"$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:
On the first TinyFish call, OpenCode should detect that the remote MCP needs authorization and open your browser. Then:
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.
Review the authorization request
Approve it
Return to OpenCode
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:
opencode mcp auth tinyfish
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
A successful result shows a TinyFish Search tool call and returns several URLs.
Fetch test
Choose one URL from the Search result and use:
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.
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:
npx skills add github.com/tinyfish-io/tinyfish-cookbook --skill use-tinyfish
For a project-local manual install, the final file belongs here:
.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:
- Search before fetching.
- Fetch only 2 to 4 pages.
- Prefer official sources over 10 secondary summaries.
- Ask for a structured answer.
- Use one research question per session.
- Start a new session before implementation if the research session became large.
- Disable MCP servers you are not using.
- Avoid asking a small model to research, inspect an entire repository, edit files, and write documentation in one turn.
- Keep long generic skill files out of projects that do not need them.
- 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:
{
"$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.jsoncoropencode.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:
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:
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:
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:
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:
{
"$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
askin your permissions. - OpenCode's
webfetchis always built in, whilewebsearchneeds the OpenCode provider orOPENCODE_ENABLE_EXA, which is the main reason local-model users add TinyFish. - Back up
opencode.jsoncand merge thetinyfishMCP 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, andmcp debugfix 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.
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.
opencode.jsonc before you touch it, so a bad brace never costs you a working setup.
tinyfish remote server block, restart OpenCode, and finish the browser sign-in.
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.

