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.

By Lanka Thilina | Published May 31, 2026 | 5 min read

TinyFish + OpenCode: Free Web Search for AI Agents

Your local AI coding agent has one problem it can never solve on its own: it doesn't know what happened after training ended.

View Social Post Source

Every time you ask it about a framework update, a new package, or a changed API, it's guessing. Sometimes it guesses well. Often it fabricates an answer that sounds completely right and is completely wrong.

TinyFish helps with this. Its Search and Fetch tools give AI agents a way to search the live web and read specific pages before answering. In the current TinyFish setup, the MCP connector can also expose Browser and Agent tools, but this guide focuses on the two free-to-start pieces most coding agents need first: Search and Fetch. Check your TinyFish dashboard for current usage limits before heavy use. Fewer stale answers. Fewer hallucinated install commands.

This guide covers the setup for the archived opencode-ai OpenCode project, Crush, and the current OpenCode CLI naming confusion that can trip people up in 2026. It includes clean config examples, test prompts, and honest limits so you know exactly what you're getting.

  • Free to start: TinyFish Search and Fetch access can start free; check dashboard limits before heavy use
  • 2 tools: Search and Fetch: the two free-to-start TinyFish tools most coding agents need first
  • 10 min: Setup time from TinyFish sign-in to first live web search inside your coding agent

Why Local AI Coding Agents Break on Current Information

A local coding agent running on LM Studio or Ollama is genuinely useful for a lot of tasks. File operations, code generation, refactoring, and debugging all work well when the answer is self-contained.

The problem surfaces the moment the task requires knowledge from outside the model. Package versions change. APIs deprecate methods. New frameworks release with different setup steps than what the model remembers. The model doesn't know this. So it fills the gap with whatever it learned during training, which could be months or years out of date.

This is not a failure of the model. It's a structural limitation of training-only knowledge.

The fix is giving the agent a way to check. When the agent can search the web and read documentation pages before responding, it's working with current evidence instead of memory. That's a different class of tool.

Direct answer: TinyFish adds web search and page fetch to OpenCode and Crush through MCP. The current recommended MCP path uses a remote TinyFish MCP URL with OAuth in supported clients, while API keys are mainly for REST API and CLI workflows. It does not update the model's training data; it gives the agent a live tool that still needs tool-calling support and good prompting.

What TinyFish Actually Is (and What It's Not)

TinyFish is a web-agent infrastructure service. For this guide, the important parts are Search and Fetch, because those are the tools that help a coding agent check current information before it edits or explains code. TinyFish also has Browser and Agent capabilities for more advanced web automation, but those are outside the simple setup path here.

Search and Fetch do different things.

Web Search

Web Search lets the agent send a query to the live web and receive structured results: titles, URLs, and summaries. Use it when you don't already have the page and you need the agent to find relevant sources on its own.

Good for: comparing frameworks, finding current documentation, checking what tools exist for a specific use case, verifying that a library is still maintained.

Web Fetch

Web Fetch lets the agent read a specific URL you provide. It returns cleaner page content for the agent to read, depending on the page and the output format the tool provides. Use it when you already know the page and want the agent to extract information from it accurately.

Good for: reading official docs, extracting setup steps from a GitHub README, pulling installation commands from a package page, summarizing release notes.

The practical pattern is to use Search to find the right pages, then Fetch to read them cleanly. That two-step process produces much better results than broad search alone.

Capability Search Fetch
When you don't have a URL
When you have a specific URL
Returns multiple sources
Returns clean page content Summaries
Best for documentation Discovery Deep read
Context impact Varies by result count Can be high on long pages

OpenCode, Crush, and the 2026 Naming Reality

Before setting anything up, a quick clarification that saves confusion later.

The original OpenCode project at opencode-ai/opencode on GitHub had more than 12,000 stars by 2026. It became popular because it supported multiple model providers and MCP servers early.

That repository is now archived. The original author's continuation is Crush, built with the Charmbracelet team. Treat Crush as the active continuation of that original project, not as the same config file with a new logo.

The reason this matters for this guide: config names are easy to mix up. The archived OpenCode project used .opencode.json and mcpServers. Crush uses crush.json or .crush.json with the mcp key. The separate current OpenCode CLI at opencode.ai uses opencode.json with the mcp key.

Quick reference: archived OpenCode: .opencode.json + mcpServers. Crush: crush.json or .crush.json + mcp. Current OpenCode CLI: opencode.json + mcp.

Short caution: archived OpenCode may not handle every current remote MCP or OAuth behavior reliably. If the remote TinyFish URL fails there, try Crush or the current OpenCode CLI before spending too long debugging an archived client.

Step 1: Create Your TinyFish Account and Choose the Right Setup Path

  • Step 1 of 3 — Create your account and sign in

    Go to agent.tinyfish.ai/api-keys and create a free account if you don't have one. Stay signed in before you connect the MCP server, because the first connection normally opens an OAuth flow in your browser.

    If you plan to use the REST API or TinyFish CLI, create an API key and store it in a password manager. For the normal remote MCP setup, you usually connect through OAuth instead of pasting the key into your config file.

  • Step 2 of 3 — Confirm which path you are using

    The recommended TinyFish MCP setup uses a remote URL, so there is no local npx tinyfish-mcp server to install. Node.js is only needed if you use the TinyFish CLI path instead.

    For MCP, your main requirement is an MCP-compatible client that supports remote MCP and OAuth. For CLI use, install Node.js first, then install @tiny-fish/cli from npm.

  • Step 3 of 3 — Note your config file path

    You'll need to edit your agent's config file in the next step. Know where it is before you start.

    • Archived opencode-ai OpenCode: $HOME/.opencode.json (global) or .opencode.json in your project directory (local)
    • Crush: $HOME/.config/crush/crush.json (global), crush.json, or .crush.json in your project directory
    • Current OpenCode CLI: opencode.json with the mcp key, or use opencode mcp add

    A local config in your project directory usually takes priority over global config. Use global if you want TinyFish available in every project, and use local if you only want it inside one repo.

  • Step 2: Add TinyFish to Your OpenCode or Crush Config

    The current TinyFish MCP setup uses a remote server URL. Your client connects to TinyFish, then the browser-based OAuth flow handles authentication. You don't need to run a local TinyFish MCP process manually.

    Open your config file in any text editor. Add the TinyFish block under the right key for your client: mcpServers for the archived OpenCode config, or mcp for Crush and the current OpenCode CLI.

    For archived OpenCode (.opencode.json)

    Archived OpenCode — .opencode.json

    { "mcpServers": { "tinyfish": { "type": "sse", "url": "https://agent.tinyfish.ai/mcp" } } }

    For Crush (crush.json or .crush.json)

    Crush — crush.json

    { "$schema": "https://charm.land/crush.json", "mcp": { "tinyfish": { "type": "http", "url": "https://agent.tinyfish.ai/mcp", "timeout": 120 } } }

    For current OpenCode CLI (opencode.json)

    Current OpenCode CLI — opencode.json

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

    Important: If you already have other MCP servers or settings in your config file, do not replace the whole file. Merge the tinyfish block into your existing mcpServers or mcp section. Deleting existing entries will break your current setup.

    MCP safety note: Connect only MCP servers you trust. Review the tools a server exposes, and avoid auto-approve or yolo modes until you understand what the server can do.

    If you're not confident merging JSON manually, use your coding agent itself to do it. Paste both your current config and the TinyFish block into the chat and ask it to merge them safely into one valid JSON file.

    Prompt — Safe Config Merge

    Here is my current agent config file: [paste your current config] Here is the TinyFish MCP block I want to add: [paste the TinyFish remote MCP block] Merge them into one valid JSON file. Keep all my existing settings intact. Use the correct MCP key for this client: mcpServers for archived OpenCode, mcp for Crush or current OpenCode CLI. Return only the final merged JSON, no explanation needed.

    After saving the file, restart OpenCode or Crush. When the client first connects, it may open your browser to finish TinyFish OAuth. Once that completes, the TinyFish tools should appear in the available tools list.

    Step 3: Verify the Connection and Test Both Tools

    Before using TinyFish for real work, run a simple test to confirm it's connected. An unverified setup means you won't know if a gap in your answer came from the tool failing or the prompt being unclear.

  • Step 1 of 3 — Confirm tools are active

    Open your project in OpenCode or Crush. Look for the TinyFish server in the active tools or MCP panel. The exact label and location varies by version. In Crush, check the MCP/session area for connected servers. In current OpenCode CLI, use opencode mcp list or opencode mcp auth tinyfish if authentication is needed.

    If TinyFish doesn't appear, check that the config file was saved correctly, that the JSON structure is valid, and that the OAuth browser flow completed successfully.

  • Step 2 of 3 — Test Web Search

    Run this prompt to confirm web search is working:

    Web Search Test Prompt

    Use TinyFish Search to find the current latest stable version of Node.js. Return the version number and the official source URL you found it from. If TinyFish is not available, say the tool is not connected instead of answering from memory.

    The agent should call the TinyFish search tool and return a version number with a source. If it returns an answer without calling any tool, TinyFish is not connected correctly.

  • Step 3 of 3 — Test Web Fetch

    Run this prompt to confirm page fetch is working:

    Web Fetch Test Prompt

    Use TinyFish Fetch to read this page and summarize what it says in three bullet points: https://nodejs.org/en/about If TinyFish is not available, say the tool is not connected instead of answering from memory.

    The agent should fetch the page and return a short summary based on the live content. If this works, both tools are ready for real coding tasks.

  • Model Requirements: Tool Calling and Context Window

    TinyFish gives your agent access to the web. But the agent still needs to know how to use it. That depends entirely on the model you're running.

    Tool calling support is required

    MCP tools only work if the model actively calls them. A model that doesn't support tool calling or function calling will simply ignore TinyFish tools entirely. Before you blame the setup, check that your model supports tool use.

    In LM Studio, look for tool-calling support in the model details before loading a model. In Ollama, check the model page on ollama.com for tool support notes. Many Qwen, Mistral, and Llama tool-use variants can work with tools, but not every small or heavily quantized local model will follow tool calls reliably.

    Context window size matters more with web search

    This is the most common reason web search feels broken with local models. It isn't.

    When TinyFish returns search results or a fetched page, that content lands in your conversation context. A single web search can add 2,000 to 6,000 tokens depending on how many results come back. A fetched page can add more.

    If your local model has a 4K or 8K context window, one search fills it immediately. Your earlier instructions, your project context, and your follow-up prompts all get pushed out.

    The practical minimum for comfortable web search use is around 32K context. A 64K or larger context window gives you room to search, fetch, and still have working memory for your project. Set this in LM Studio before starting the local server.

    Context strategy: If you notice the agent losing track of earlier instructions after a search, start a new session. Don't try to continue in a context that's already saturated. Fresh sessions with targeted prompts produce better results than long saturated ones.

    Real Coding Use Cases Where TinyFish Makes a Difference

    Web search isn't useful for every coding task. These are the situations where it earns its place.

    Checking current documentation before writing code

    The most common case. You're building with a library and you want the agent to use the current API, not a version from a year ago.

    Prompt — Documentation Check

    Before writing the integration code, use TinyFish to fetch the current official docs for [library name]. Extract only the authentication setup steps and any methods that have changed since version 3. Then write the integration using what you find, not what you already know.

    Comparing tools before choosing one

    When you need a recommendation based on what's actually current, not what was popular two years ago.

    Prompt — Tool Comparison

    Use TinyFish web search to find the three most actively maintained open-source options for [task]. Focus only on repos with commits in the last 6 months. Compare them on setup complexity, free self-hosting, and TypeScript support. Show your sources.

    Verifying that an API method still exists

    APIs change. Methods get deprecated. Endpoints get renamed. Before the agent edits existing code, have it verify the API is still current.

    Prompt — API Verification

    Before editing this file, use TinyFish to verify that the [method name] method in [library] is still the current way to handle [task]. If it has been deprecated or replaced, tell me what replaced it and show me the source. Then update the code accordingly.

    Finding current install commands from the official source

    Install commands change more than you'd think. Package names get scoped, CLI tools get renamed, and setup steps change across major versions. Fetch the current install page instead of trusting the model's memory.

    Prompt — Install Commands

    Use TinyFish to fetch the official installation page for [tool or framework] and extract the exact current install commands for a [macOS / Linux / Windows] environment. Do not use commands from memory. Use only what the official page says.

    Token Management: The Thing That Will Break Your Setup If You Ignore It

    Web search is token-heavy by design. This is not a bug in TinyFish. It's physics: more information in the context means more tokens consumed.

    The patterns that will drain your context fastest are broad research questions and chained searches without summarization. A question like "search everything about GraphQL and compare all the major libraries" can fill a 32K context window in one turn.

    Focused prompts solve this. Instead of asking the agent to research broadly, ask it to answer a specific question using search. The narrower the query, the fewer tokens the results consume.

    A good rule: treat each web search prompt like it costs something, because with local models, it does. The cost isn't money. It's context space that you can't get back within a session.

    If you're running long research sessions with multiple searches and fetches, periodically summarize what you've gathered and start a new session with the summary. This keeps your working memory from filling up with search results you no longer need.

    Practical token guideline: Treat these as rough planning numbers, not fixed limits. A focused search may add a small amount of context. A long fetched page can add much more. On a 32K context model, keep search and fetch operations targeted, then summarize and restart when the session starts losing track.

    Adding an Instruction File for Consistent Tool Use

    By default, the agent decides when to call TinyFish based on how you phrase the prompt. That works, but it's inconsistent. Sometimes the agent answers from memory when it should search. Sometimes it searches when it could have answered directly.

    An instruction file removes that inconsistency. It tells the agent exactly when TinyFish should be used, when it shouldn't, and how to handle the results.

    In current OpenCode, you can use an instruction or rules file such as AGENTS.md. In Crush, you can use a skill or project instruction file. Keep it short. Long instruction files consume context before the session even starts.

    Instruction File — AGENTS.md or project instructions

    ## TinyFish Web Tool Rules Use TinyFish Search when: - The user asks about current versions, releases, or recent changes - The task requires comparing actively maintained tools - Install commands or setup steps may have changed - The answer depends on information newer than your training Use TinyFish Fetch when: - The user provides a specific URL to read - Official documentation needs to be checked before editing code - A GitHub README or release page should be the source of truth Do not use web search when: - The task is a local file edit, refactor, or code fix - The answer is self-contained in the existing code - The question has nothing to do with current external data After using web tools: - Prefer official sources and documentation over blog posts - Note if sources disagree and mention the uncertainty - Keep summaries focused on what the user actually asked - Do not fabricate commands that were not on the page

    Add this as AGENTS.md or your client's project instruction file. The goal is simple: make the agent search only when current external information actually matters.

    What This Setup Can't Do

    A realistic view of the limits saves time and prevents frustration.

    TinyFish Search and Fetch can find pages and read many of them cleanly. They are not a replacement for human review, private documentation access, or every JavaScript-heavy site. TinyFish also has Browser and Agent features for more advanced web interaction, but those are separate from the simple Search/Fetch workflow in this guide.

    The quality of web search results depends on the query. Vague queries return vague results. The model still has to interpret the fetched content correctly, which it sometimes does imperfectly on dense technical pages.

    And the model's ability to use the tools well still depends on the model. A small 7B model with limited instruction following will use TinyFish less reliably than a larger, better-aligned model. If your web search results are being ignored or badly interpreted, the model is often the constraint, not the tool.

    None of these limits mean the setup isn't worth using. They mean you should use it for the right tasks and calibrate your expectations to what the tool actually does.

    Final Verdict: My Practical Recommendation

    TinyFish Search and Fetch are practical additions to a local AI coding agent. The setup is simple when your client supports remote MCP, and the immediate benefit is real: your agent has a better chance of checking package names, current docs, and changed API methods before it answers.

    It's worth setting up if you regularly ask your agent about documentation, installations, API methods, or framework options. The small config step pays back quickly on the first task where the agent checks a page instead of guessing.

    It's less useful if your work is almost entirely local file editing and code refactoring. For those tasks, the agent doesn't need external access and won't use the tools anyway.

    The one genuine constraint is context window size. If you're running a model with 8K or less, web search will crowd out your project context fast. Upgrade the context window in LM Studio before using TinyFish heavily, or use very targeted prompts and restart sessions frequently.

    If you're using the archived opencode-ai project, move to Crush for that lineage. If you're using the current OpenCode CLI from opencode.ai, follow its opencode.json and mcp setup instead. The safest path is to match the config to the exact client you installed.

    Key Takeaways
    • TinyFish adds free-to-start web search and page fetch to OpenCode and Crush through MCP. Your local coding agent can now check current documentation and package pages instead of guessing from training data. Check current dashboard limits before heavy use.
    • The original opencode-ai/opencode repository is archived. Crush is its active continuation, while the separate current OpenCode CLI uses its own opencode.json config style.
    • The recommended TinyFish MCP setup uses the remote MCP URL https://agent.tinyfish.ai/mcp. Use OAuth for MCP in supported clients; use an API key mainly for REST API or CLI workflows.
    • Use Search when you don't have a URL and need the agent to find relevant sources. Use Fetch when you have a specific page and want clean content extracted from it. The two-step pattern (Search then Fetch) produces the most reliable results.
    • Tool calling support is required at the model level. If your local model doesn't support tool use, it will ignore TinyFish entirely. Check tool calling support before troubleshooting the setup.
    • Context window size is the biggest practical limit. Search and fetch results still enter the agent's working context, so targeted prompts and fresh sessions matter more than broad research prompts.
    • An instruction file prevents the agent from using web search on tasks that don't need it. A short rule set in your project instructions keeps token usage efficient and search behavior consistent.

    Set It Up Today

    Three Steps to a Web-Connected Local AI Coding Agent.

    TinyFish account. Remote MCP URL. OAuth. One test prompt. That's the setup. Your agent gains live documentation access without a long setup.

    1. Step 01 — Sign in to TinyFish

      Create a TinyFish account at agent.tinyfish.ai/api-keys and stay signed in. For MCP, expect OAuth. For CLI or REST API work, generate and store an API key securely.

    2. Step 02 — Add the remote MCP URL

      Open your .opencode.json, crush.json, or opencode.json. Add the TinyFish remote MCP block with https://agent.tinyfish.ai/mcp. Merge carefully if you already have other servers configured. Restart the agent.

    3. Step 03 — Test and start using it

      Run the Node.js version search test and the fetch test from this guide. Confirm both tools return live results and that OAuth completed. Then add the instruction file to your project and use TinyFish only when current docs actually matter.

    Open TinyFish Account Page