clawifi
[PyPI]
[Python]
[License]
[MCP]
[GitHub stars]
Official Python SDK, CLI, and MCP server for Clawifi, web search and page reading for AI agents: search many engines as one, read pages and PDFs, map and crawl sites, and get back only the passages that answer the question, each with its source. One typed API and MCP surface for all of it.
This package is a thin client over the hosted Clawifi API (hosted API version 1.7.2 at time of release); the Clawifi server is not included. Docs, pricing and status: clawifi.dev/docs · clawifi.dev/pricing · clawifi.dev/status · clawifi.dev/security.
One-click install (hosted server, no key needed to try)
[Add to Cursor]
[Install in VS Code]
Both add the hosted remote server https://api.clawifi.dev/mcp. No key needed to try: 4 tools, 50 calls a day per address. Add your API key for the full toolset (get a free key).
Install
Get an API key
This creates an account, grants 1,000 free credits, and prints an API key. Export it:
Quicktest
Set up your MCP client
finds the MCP clients installed on this machine (Claude Code, Codex, Cursor, Claude Desktop, VS Code) and prints, for each one, the install line for the local server (clawifi-mcp, stdio) and for the remote server, followed by a first call to try. It only prints; it never shows your key, only $CLAWIFI_API_KEY or a masked clawifi_live_****. clawifi init --all shows every client, found or not.
To have it edit a config file for you:
--write asks before it changes anything and copies the existing file to <file>.bak-<timestamp> first. Claude Code, Codex and VS Code have their own install commands, which init prints.
For Claude Code, for example:
Use as an MCP server
The local MCP server runs as:
reading CLAWIFI_API_KEY from the environment. clawifi mcp config prints a minimal config for it. Every tool carries a title and the MCP hints readOnlyHint, destructiveHint, idempotentHint and openWorldHint; none is destructive.
The billable tools (fetch, scrape, extract, map_site, crawl, search_free) take their common options as parameters and any other API field in options, which is merged into the request body. They refuse dry_run: use the estimate tool to price a call. Arguments a tool does not declare are refused rather than ignored.
Remote MCP
Clawifi also runs a hosted MCP server, so nothing needs installing:
- URL:
https://api.clawifi.dev/mcp (streamable HTTP)
- Auth:
Authorization: Bearer <your key>, or the X-Clawifi-Api-Key: <your key> header
The old host api.clawifi.qzz.io (API and /mcp) keeps working, so CLAWIFI_API_BASE=https://api.clawifi.qzz.io and existing remote configs need no change.
Without a key the remote server offers a keyless tier of four tools, search_free, fetch_url, scrape_url and map_site, at 12 calls a minute and 50 a day per address. With a key you get the full tool list.
Credits
Calls are charged per operation (a plain fetch is 1 credit, a browser render 3, a crawl 1 per page, and so on). See clawifi.dev/pricing, or print the current table, which needs no key:
The credits MCP tool and client.credits() show your own usage and balance instead.
Use as a Python SDK
An async client is also available as clawifi.AsyncClawifi.
search_content searches and reads the top results; it is compact by default and full=True returns the full output:
Responses are returned as the API sends them, so fields such as published_at, modified_at and fetched_at come through untouched.
Estimates (hosted API 1.7.0 and later)
estimate() and dry_run=True work for fetch, scrape, extract, map, crawl, search_free and search_content. Before the first dry run the client checks the API version at /product/manifest; an API older than 1.7.0 would ignore dry_run and run (and bill) the call, so the client raises ClawifiDryRunUnsupportedError and sends nothing. Pre-releases such as 1.7.0rc1 count as older than 1.7.0.
dry_run is sent only when it is True, and only as the JSON boolean true: a normal call, or dry_run=False, has no dry_run key in its body, and a value that is not a bool raises TypeError before anything is sent. The API answers any dry_run key (even false) on a route that cannot dry-run with a 422, so schema_assist drops dry_run=False and refuses dry_run=True.
The estimate MCP tool does the same from an agent: estimate(operation="fetch", args={"url": "https://example.com"}).
Rate limits
A 429 raises ClawifiAPIError with retry_after (seconds, from the Retry-After header) and limit_scope (which limit was hit, from details.limit_scope). Retryable calls wait out a Retry-After of up to 10 seconds before retrying; a longer one is raised straight away.
MCP tools
Documentation
See clawifi.dev/docs for the full API reference, MCP tool list, and CLI command reference.
License
MIT