Skip to main content

iflow-search-mcp

PyPI - Version Python Versions

MCP stdio server for iFlow Search (心流搜索).

Exposes three MCP tools backed by the iflow-search core SDK:

  • iflow_web_search — web search
  • iflow_image_search — image search
  • iflow_web_fetch — fetch the readable contents of a URL

This package is a thin adapter. All HTTP, authentication, attribution-header construction, response normalization, and error mapping live in the iflow-search core SDK. This package owns only the MCP server wiring — tool definitions, tool dispatch, and the stdio entry point.

Install

pip install iflow-search-mcp

Installing pulls in the MCP Python SDK, which transitively depends on starlette, uvicorn, sse-starlette, python-multipart, pyjwt[crypto], and jsonschema — even though this server only uses stdio. There is no [stdio] extra on the upstream package.

Configure your MCP host

The server reads its configuration from environment variables only — no .env files, no CLI flags, no config files.

Variable Required Notes
IFLOW_API_KEY yes iFlow API key
IFLOW_BASE_URL no Override the platform base URL
IFLOW_TIMEOUT_MS no Request timeout in milliseconds (positive integer)
IFLOW_MCP_CLIENT no Identifier for the MCP host (e.g. claude-desktop); regex ^[a-z0-9._-]{1,64}$
IFLOW_MCP_CLIENT_VERSION no Version of the MCP host; only valid when IFLOW_MCP_CLIENT is set

Example: Claude Desktop / Claude Code

{
  "mcpServers": {
    "iflow-search": {
      "command": "iflow-search-mcp",
      "env": {
        "IFLOW_API_KEY": "sk-..."
      }
    }
  }
}

Claude Code 2.1.148 has been verified to discover and connect to the 0.1.0a0 artifact via claude mcp list / claude mcp get (stdio initialize + capability exchange). The wire protocol used by tools/call is exercised separately by the offline scripts/smoke_stdio.py and by a reference-client smoke against the live iFlow API; see docs/design/python-mcp-design.md §15 for the full record.

Example: OpenCode

OpenCode's MCP config schema differs from Claude Desktop's in a few small ways: the root key is mcp (not mcpServers), each server declares type: "local" for stdio transport, command is a string-array (not a string), and the env block is named environment (not env). OpenCode does not expand ${VAR} references in that block, but it does inherit the parent process env into the MCP child — so IFLOW_API_KEY belongs in the shell you launch opencode from, not in opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "iflow-search": {
      "type": "local",
      "command": ["iflow-search-mcp"],
      "enabled": true,
      "environment": {
        "IFLOW_MCP_CLIENT": "opencode"
      }
    }
  }
}

OpenCode 1.15.10 (installed via brew install sst/tap/opencode) has been verified to discover and connect to the 0.1.0a0 artifact via opencode mcp list — reports connected · local, and opencode --log-level DEBUG mcp list records toolCount=3 and successfully created client. opencode mcp debug is documented as an OAuth debugger for remote MCP servers and is not applicable to type: "local" (stdio) entries; the stdio health check is opencode mcp list itself. The wire protocol used by tools/call is exercised separately by the reference-client smoke against the live iFlow API; see docs/design/python-mcp-design.md §16 for the full record.

Behavior

  • Transport: stdio only. stdout is reserved for the JSON-RPC stream; all human-readable output (banner, errors) goes to stderr.
  • Exit codes: 0 on clean shutdown after SIGINT / SIGTERM, 1 on configuration or init error.
  • Errors: tool failures return isError: true results with a stable structuredContent.error.code (mirroring the core SDK's error contract).

License

MIT. See LICENSE.

Metadata

Release files for iflow-search-mcp 0.1.0

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

Source distribution (sdist)

Source distribution for iflow-search-mcp 0.1.0
File Size Uploaded Provenance
iflow_search_mcp-0.1.0.tar.gz 10.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-search-mcp 0.1.0
File Interpreter ABI Platform
iflow_search_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.2 kB

Release files / iflow_search_mcp-0.1.0.tar.gz

Download URL iflow_search_mcp-0.1.0.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2d4f5510d42c638fcea7c0383dcb348fefa32d081f50b3784641237379d2648c
BLAKE2b-256 checksum
How to use checksums
a46e3f0206c4db18f4344f355ebaf0d523c2280387e8745d41fbdea803ddaa44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / iflow_search_mcp-0.1.0-py3-none-any.whl

Download URL iflow_search_mcp-0.1.0-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b45e46dfae248637125da122c6a3d932a72d0f76c0071e9b7dff591041d3a83
BLAKE2b-256 checksum
How to use checksums
299ec8124087e33edf0ef58626894167b0caa49aa72d369a944ca3cd71410c8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for iflow-search-mcp 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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