A restricted TinyFish MCP gateway for free search and fetch capabilities.
Project description
microfish
中文文档: README_cn.md
microfish is a restricted TinyFish MCP gateway. It exposes only the allowlisted TinyFish Search and Fetch related tools.
Tools
Retained tools:
- search
- fetch_content
- get_search_usage
- list_fetch_usage
Blocked tool groups:
- Agent automation
- Batch automation
- Browser sessions
Authentication and running modes
microfish only exposes TinyFish Search and Fetch related APIs. TinyFish Agent, Browser, batch, and run lifecycle APIs are intentionally not registered.
Get a TinyFish API key
Generate your API key at https://agent.tinyfish.ai/api-keys.
Client-owned single key
Leave TINYFISH_KEYS unset. Each MCP client sends Authorization: Bearer <YOUR_TINYFISH_API_KEY>. microfish forwards that value to TinyFish as X-API-Key for the current request only.
Server-managed single key
Set TINYFISH_KEYS to one TinyFish API key. MCP clients do not receive the TinyFish key. If MCP_AUTH_TOKEN is set, clients send Authorization: Bearer <YOUR_MCP_AUTH_TOKEN>; if MCP_AUTH_TOKEN is unset, the MCP entrypoint is not protected by a bearer token.
Server-managed key pool
Set TINYFISH_KEYS to multiple comma-separated TinyFish API keys. microfish assigns requests in order. When a whole upstream request fails, it tries the next key, stopping after all available keys for that call are tried or after three extra retries.
Server configuration
microfish reads runtime settings from environment variables:
MICROFISH_HOST: bind host for the HTTP server. Defaults to0.0.0.0.MICROFISH_PORT: bind port for the HTTP server. Defaults to8000.MICROFISH_MCP_PATH: HTTP path that exposes the MCP entrypoint. Defaults to/mcp.MICROFISH_TRANSPORT: transport for the server. Use http for the HTTP service or stdio for local coding agent subprocesses. Defaults to http.TINYFISH_KEYS: comma-separated TinyFish API keys; presence selects server-managed mode.MCP_AUTH_TOKEN: optional bearer token required from MCP clients in server-managed mode.
Client configuration
microfish supports two transports:
- HTTP transport (
MICROFISH_TRANSPORT=http, the default): run microfish as an HTTP service and connect clients tohttp://localhost:8000/mcp. - stdio transport (
MICROFISH_TRANSPORT=stdioor--transport stdio): launchuvx microfish --transport stdioas a local subprocess for coding agents.
For the HTTP transport, the value of Authorization: Bearer depends on your running mode:
- Client-owned single key: set it to your TinyFish API key.
- Server-managed single/multiple keys with
MCP_AUTH_TOKEN: set it to the MCP auth token. - Server-managed keys without
MCP_AUTH_TOKEN: omit the Authorization header entirely.
The stdio transport requires TINYFISH_KEYS because there is no separate Authorization header on local subprocess pipes.
Claude Code
HTTP transport:
# Without auth header
claude mcp add --transport http microfish http://localhost:8000/mcp
# With auth header
claude mcp add --transport http microfish http://localhost:8000/mcp \
--header "Authorization: Bearer <YOUR_MCP_OR_TINYFISH_TOKEN>"
stdio transport:
TINYFISH_KEYS=<YOUR_TINYFISH_API_KEY> \
claude mcp add microfish --env TINYFISH_KEYS -- uvx microfish --transport stdio
Codex
HTTP transport:
[mcp_servers.microfish]
url = "http://localhost:8000/mcp"
bearer_token_env_var = "MICROFISH_MCP_BEARER"
Set MICROFISH_MCP_BEARER in your shell environment to your TinyFish API key (client-owned mode) or MCP auth token (server-managed mode).
stdio transport:
[mcp_servers.microfish]
command = "uvx"
args = ["microfish", "--transport", "stdio"]
env = { TINYFISH_KEYS = "<YOUR_TINYFISH_API_KEY>" }
Cursor
HTTP transport:
{
"mcpServers": {
"microfish": {
"url": "http://localhost:8000/mcp",
"headers": {
"Authorization": "Bearer ${env:MICROFISH_MCP_BEARER}"
}
}
}
}
Set MICROFISH_MCP_BEARER in your environment to your TinyFish API key (client-owned mode) or MCP auth token (server-managed mode). If no auth token is required, remove the headers block.
stdio transport:
{
"mcpServers": {
"microfish": {
"command": "uvx",
"args": ["microfish", "--transport", "stdio"],
"env": {
"TINYFISH_KEYS": "<YOUR_TINYFISH_API_KEY>"
}
}
}
}
Run locally
uv sync
uv run microfish
Or run directly without cloning via uvx microfish.
Docker
Two compose files are provided:
docker-compose.ymlpulls the published imageghcr.io/vvtommy/microfish:${MICROFISH_IMAGE_TAG:-latest}from GHCR.docker-compose_build.ymlbuilds the local Dockerfile.
Both expose microfish on port 8000. Do not put TinyFish keys directly in compose files; pass them through your deployment environment.
docker compose up -d
claude mcp add --transport http microfish http://localhost:8000/mcp \
--header "Authorization: Bearer <YOUR_MCP_OR_TINYFISH_TOKEN>"
Releasing
Push a SemVer tag of the form vX.Y.Z to trigger publish workflows:
.github/workflows/pypi.ymlbuilds and publishes the Python package to PyPI via PyPI OIDC trusted publishing..github/workflows/docker.ymlbuilds and publishesghcr.io/vvtommy/microfishDocker images with version tags andlatest.
MCP endpoint
http://localhost:8000/mcp
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file microfish-0.1.0.tar.gz.
File metadata
- Download URL: microfish-0.1.0.tar.gz
- Upload date:
- Size: 340.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc2d7cabcc04c847e18bc3c2aead08fb2118375d53b25a9dc3bdd05d14ffe425
|
|
| MD5 |
8a285094f97cda6856ef878be2649201
|
|
| BLAKE2b-256 |
23d1dd6c3a0bc7486a3fbdbf9a2a22d902f74dfcb721ab7d1adcbe4b7fc5e606
|
Provenance
The following attestation bundles were made for microfish-0.1.0.tar.gz:
Publisher:
pypi.yml on vvtommy/microfish
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
microfish-0.1.0.tar.gz -
Subject digest:
bc2d7cabcc04c847e18bc3c2aead08fb2118375d53b25a9dc3bdd05d14ffe425 - Sigstore transparency entry: 1483209251
- Sigstore integration time:
-
Permalink:
vvtommy/microfish@caa35cb76d85464c85a54a329de9a510e3e28b52 -
Branch / Tag:
refs/tags/v1.1.0-beta.2 - Owner: https://github.com/vvtommy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@caa35cb76d85464c85a54a329de9a510e3e28b52 -
Trigger Event:
push
-
Statement type:
File details
Details for the file microfish-0.1.0-py3-none-any.whl.
File metadata
- Download URL: microfish-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a52d39e6de45a803f8c4dee267d6cec158107465c7b652f28fdf1196e931e21c
|
|
| MD5 |
7ed2311570ea97fc8fd9ff774844cdd3
|
|
| BLAKE2b-256 |
e11965383f589e2decb873856f32b9562c26a25d16acbbadb755cb0c2474cfbd
|
Provenance
The following attestation bundles were made for microfish-0.1.0-py3-none-any.whl:
Publisher:
pypi.yml on vvtommy/microfish
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
microfish-0.1.0-py3-none-any.whl -
Subject digest:
a52d39e6de45a803f8c4dee267d6cec158107465c7b652f28fdf1196e931e21c - Sigstore transparency entry: 1483209388
- Sigstore integration time:
-
Permalink:
vvtommy/microfish@caa35cb76d85464c85a54a329de9a510e3e28b52 -
Branch / Tag:
refs/tags/v1.1.0-beta.2 - Owner: https://github.com/vvtommy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@caa35cb76d85464c85a54a329de9a510e3e28b52 -
Trigger Event:
push
-
Statement type: