Skip to main content

🐟 microfish

中文

PyPI Docker License: MIT

Free-only MCP gateway for TinyFish — exposes just Search & Fetch, nothing else.

Why microfish?

Official MCP microfish
Search & Fetch (free) ✅ ✅
Agent / Browser / Batch (paid) ✅ exposed ❌ stripped
Agent accidentally calls paid tools ⚠️ possible 🚫 impossible
API key pool ❌ ✅ built-in
Rate limit single key pooled, higher throughput
  • 🔒 Free-only by design — Only search, fetch_content, get_search_usage, and list_fetch_usage are registered. Paid APIs are never exposed, so agents can't see or invoke them — no accidental charges, no wasted tokens.
  • ⚡ Built-in key pool — Supply multiple TinyFish API keys and microfish round-robins across them. If one key fails, it automatically falls back to the next (up to 3 retries), effectively bypassing single-key rate limits.

Quick Start

Get a free API key → https://agent.tinyfish.ai/api-keys

stdio (recommended)

Claude Code:

TINYFISH_KEYS=<KEY> \
  claude mcp add microfish --env TINYFISH_KEYS -- uvx microfish

Cursor / other MCP clients:

{
  "mcpServers": {
    "microfish": {
      "command": "uvx",
      "args": ["microfish"],
      "env": { "TINYFISH_KEYS": "<KEY>" }
    }
  }
}

HTTP

MICROFISH_TRANSPORT=http TINYFISH_KEYS=<KEY> uvx microfish
# endpoint: http://localhost:8000/mcp

Tools

✅ Available

Tool Description
search Web search (free)
fetch_content Fetch & extract page content (free)
get_search_usage Search usage stats
list_fetch_usage Fetch usage stats

🚫 Blocked

Agent automation · Batch automation · Browser sessions · Run lifecycle

Authentication

1. Client-owned key — Leave TINYFISH_KEYS unset. Each client passes its own key via Authorization: Bearer.

2. Server-managed single key — Set TINYFISH_KEYS=<key>. Optionally set MCP_AUTH_TOKEN to protect the endpoint.

3. Server-managed key pool ⚡ — Set TINYFISH_KEYS=k1,k2,k3. Requests are distributed in order; failures automatically fall back to the next key (up to 3 retries).

Configuration

Variable Default Description
TINYFISH_KEYS — Comma-separated API keys; enables server-managed mode
MCP_AUTH_TOKEN — Bearer token required from clients (server-managed mode)
MICROFISH_TRANSPORT stdio stdio or http
MICROFISH_HOST 0.0.0.0 Bind host (HTTP mode)
MICROFISH_PORT 8000 Bind port (HTTP mode)
MICROFISH_MCP_PATH /mcp MCP endpoint path (HTTP mode)

Client Examples

  • Claude Code

    HTTP:

    # Without auth
    claude mcp add --transport http microfish http://localhost:8000/mcp
    
    # With auth
    claude mcp add --transport http microfish http://localhost:8000/mcp \
      --header "Authorization: Bearer <YOUR_MCP_OR_TINYFISH_TOKEN>"
    

    stdio:

    TINYFISH_KEYS=<KEY> \
      claude mcp add microfish --env TINYFISH_KEYS -- uvx microfish
    
  • Codex

    HTTP:

    [mcp_servers.microfish]
    url = "http://localhost:8000/mcp"
    bearer_token_env_var = "MICROFISH_MCP_BEARER"
    

    Set MICROFISH_MCP_BEARER to your TinyFish API key (client-owned) or MCP auth token (server-managed).

    stdio:

    [mcp_servers.microfish]
    command = "uvx"
    args = ["microfish"]
    env = { TINYFISH_KEYS = "<KEY>" }
    
  • Cursor

    HTTP:

    {
      "mcpServers": {
        "microfish": {
          "url": "http://localhost:8000/mcp",
          "headers": {
            "Authorization": "Bearer ${env:MICROFISH_MCP_BEARER}"
          }
        }
      }
    }
    

    Drop the headers block if no auth is required.

    stdio:

    {
      "mcpServers": {
        "microfish": {
          "command": "uvx",
          "args": ["microfish"],
          "env": { "TINYFISH_KEYS": "<KEY>" }
        }
      }
    }
    

Deployment

Local

uvx microfish@latest              # run directly, no clone needed (fetches latest)

Docker

docker compose up -d       # pulls ghcr.io/vvtommy/microfish:latest
  • docker-compose.yml — pulls the published image
  • docker-compose_build.yml — builds from local Dockerfile

Contributing

PRs and issues are welcome. Please open an issue first for major changes.

Releasing

Push a vX.Y.Z tag to trigger: PyPI publish + GHCR image publish.

License

MIT

Readme(中文)

Metadata

Release files for microfish 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for microfish 1.1.2
File Size Uploaded
microfish-1.1.2.tar.gz 340.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for microfish 1.1.2
File Interpreter ABI Platform
microfish-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 353.4 kB

Release files / microfish-1.1.2.tar.gz

Download URL microfish-1.1.2.tar.gz
Size 340.1 kB
Tags Source
SHA-256 checksum
How to use checksums
eaa0b598206a1dcdaa14e9e982feb6a91ddb2873761b106f803bc034bd79af5b
BLAKE2b-256 checksum
How to use checksums
1b0f7f4618a74ac570d1043afba64920b35e2ac6b0efae82cf200dece3c94528
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log

Release files / microfish-1.1.2-py3-none-any.whl

Download URL microfish-1.1.2-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a13046e8c40ab3b353b20b8eb5ec1ec920c104b4a355266558c38a54ec82346c
BLAKE2b-256 checksum
How to use checksums
213f01d3d9e62bed593322e26da932bc6abfa824a6fb240810940735526fcdf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page