tinyfish-search-fetch-mcp

tinyfish-search-fetch-mcp

A lightweight MCP server enabling web search and content fetching via TinyFish Free Access API with support for single and burst URL fetch.

Category
访问服务器

README

TinyFish Search/Fetch MCP Server

A lightweight, stdio-based Model Context Protocol (MCP) server designed to provide search and fetch capabilities through the TinyFish ecosystem.

Note: This MCP server provides access exclusively to the TinyFish Free Access API (Search & Fetch).

Overview

TinyFish Search/Fetch MCP Server is a standalone MCP server that offers web search via the TinyFish Search API and content fetching via the TinyFish Fetch API. It uses stdio transport for seamless integration with MCP-compatible clients such as Claude Desktop, Cursor, Windsurf, or any custom client supporting the stdio protocol.

Features

  • Search: Quickly find relevant information using TinyFish search capabilities.
  • Fetch: Retrieve content from web resources efficiently.
  • Burst Fetch: Fetch and extract clean content from up to 10 URLs in a single request.
  • Stdio Transport: Designed for seamless integration with MCP clients (e.g. Claude Desktop, Cursor).

Available Tools

search

Search the web using TinyFish Search API.

Parameters:

Parameter Type Required Description
query string Yes Search query. Search operators such as site:example.com may be used.
location string No Country code, e.g. JP, US, GB, FR.
language string No Language code, e.g. ja, en, fr.
max_results integer No Local truncation count for returned results. Must be positive.

Returns: JSON text containing the TinyFish search response.

fetch_content

Fetch and extract clean content from a single URL using TinyFish Fetch API.

Parameters:

Parameter Type Required Description
url string Yes URL to fetch. Must use http or https scheme.
format string No Output format: markdown (default), html, or json.
links boolean No Include extracted page links when supported. Default: false.
image_links boolean No Include extracted image links when supported. Default: false.

Returns: JSON text containing the TinyFish fetch response.

fetch_contents

Fetch and extract clean content from up to 10 URLs using TinyFish Fetch API.

Parameters:

Parameter Type Required Description
urls string[] Yes List of URLs to fetch. Maximum 10. Each must use http or https scheme.
format string No Output format: markdown (default), html, or json.
links boolean No Include extracted page links when supported. Default: false.
image_links boolean No Include extracted image links when supported. Default: false.

Returns: JSON text containing the TinyFish fetch response.

Tool Schemas

search

{
  "name": "search",
  "parameters": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "query": {
        "type": "string",
        "description": "Search query. Search operators such as site:example.com may be used."
      },
      "location": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Optional country code, e.g. JP, US, GB, FR."
      },
      "language": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Optional language code, e.g. ja, en, fr."
      },
      "max_results": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Optional local truncation count for returned results."
      }
    },
    "required": ["query"]
  }
}

fetch_content

{
  "name": "fetch_content",
  "parameters": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "url": {
        "type": "string",
        "description": "URL to fetch. Must be http or https."
      },
      "format": {
        "type": "string",
        "enum": ["markdown", "html", "json"],
        "default": "markdown",
        "description": "Output format: markdown, html, or json."
      },
      "links": {
        "type": "boolean",
        "default": false,
        "description": "Include extracted page links when supported."
      },
      "image_links": {
        "type": "boolean",
        "default": false,
        "description": "Include extracted image links when supported."
      }
    },
    "required": ["url"]
  }
}

fetch_contents

{
  "name": "fetch_contents",
  "parameters": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "urls": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "URLs to fetch. Maximum 10. Each must be http or https."
      },
      "format": {
        "type": "string",
        "enum": ["markdown", "html", "json"],
        "default": "markdown",
        "description": "Output format: markdown, html, or json."
      },
      "links": {
        "type": "boolean",
        "default": false,
        "description": "Include extracted page links when supported."
      },
      "image_links": {
        "type": "boolean",
        "default": false,
        "description": "Include extracted image links when supported."
      }
    },
    "required": ["urls"]
  }
}

Comparison with the Official Integration

While TinyFish provides an official MCP integration using OAuth 2.1 for secure authentication (which requires a browser-based flow for initial setup), this implementation uses a single TinyFish API Key. This makes it better suited for:

  • Headless Environments: Ideal for servers or environments where no web browser is available.
  • Free Access: Optimized specifically for usage with the TinyFish Free Access API.

Learn more about the official integration here.

Prerequisites

  • Python >= 3.11
  • An MCP-compatible client

Installation

Using uv (Recommended)

For a clean installation as a standalone tool with isolated dependencies, use uv:

uv tool install .

Using pip

If you are already working in a virtual environment:

pip install .

Usage

Before running the server, set your TinyFish API Key as an environment variable.

Linux / macOS (bash, zsh):

export TINYFISH_API_KEY="<your tinyfish api key>"

Windows PowerShell:

$env:TINYFISH_API_KEY="<your tinyfish api key>"

API keys are obtained by logging in at https://agent.tinyfish.ai/. Once your API key is set, the server can be invoked via its command-line entry point:

tinyfish-search-fetch-mcp

Integration with Claude Desktop

To use this server with Claude Desktop, add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "tinyfish-search-fetch": {
      "command": "tinyfish-search-fetch-mcp",
      "env": {
        "TINYFISH_API_KEY": "<your tinyfish api key>"
      }
    }
  }
}

Note: If you have already defined TINYFISH_API_KEY in your shell environment (e.g. via ~/.bashrc, ~/.zshrc), the "env" block above is optional and can be omitted.

If you installed via pip in a virtual environment, ensure the command points to the correct executable path.

Troubleshooting

Empty search query error

If you see an error such as valueerror: query must not be empty, ensure the query parameter contains non-whitespace characters. Leading or trailing whitespace is automatically trimmed.

Invalid URL scheme error

If you see an error such as valueerror: url scheme must be http or https, ensure the url parameter uses either http:// or https:// as the scheme.

Unsupported URL

If you see an error such as valueerror: url must include a host, the provided URL does not contain a valid hostname. Provide a full URL including domain (e.g. https://example.com).

Development

Local Installation

Clone and install this server in editable mode:

With pip:

git clone <repository-url>
cd tinyfish-search-fetch-mcp
pip install -e ".[dev]"

With uv:

git clone <repository-url>
cd tinyfish-search-fetch-mcp
uv pip install -e ".[dev]"

Running Tests

This project uses pytest. To run the test suite:

python -m pytest

Live tests exercise the real TinyFish Search/Fetch APIs. They require both network access and TINYFISH_API_KEY.

  • If TINYFISH_API_KEY is not set, live tests are skipped.
  • If CODEX_SANDBOX_NETWORK_DISABLED=1, live tests are skipped because outbound network access is unavailable.
  • With network access and an API key, the live tests call all three MCP tools and cover parameter variants such as location, language, max_results, format, links, and image_links.

Coding Standards

Use ruff for linting:

python -m ruff check src tests

License

This project is licensed under the MIT License - see the LICENSE file for details.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选