agent-data-tools
v1.4.1
Published
Data tools for AI agents, one call each: PDF to text, web page to Markdown, web search, news, token prices, OFAC sanctions checks, chain reads, IP geolocation, hosted pages. 3 free HTTP calls (25 over MCP), then card credits or x402.
Maintainers
Readme
agent-data-tools
Data tools for AI agents, one HTTP call each: PDF to text, web page to Markdown, web search, news, token prices, OFAC sanctions checks, chain reads on 18 networks, IP geolocation, hosted pages and about 550 more. No dependencies. 3 free calls over HTTP (25 over MCP) with no signup, then card credits or USDC per call; failed calls are not charged.
Use it in your AI client
One command per client. Each connects the client to the compact MCP server at https://agent-data-tools.revmesh2074.workers.dev/mcp/compact: three tools (find_tool, tool_details, call_tool) that find, describe and run any tool in the catalog, so the assistant does not carry several hundred tool definitions. Add --full to setup or mcp for the server that lists every tool as its own definition (https://agent-data-tools.revmesh2074.workers.dev/mcp).
npx agent-data-tools setup claude-code # prints the `claude mcp add --transport http ...` command to run
npx agent-data-tools setup claude-desktop # adds the server to claude_desktop_config.json
npx agent-data-tools setup cursor # adds the server to ~/.cursor/mcp.json
npx agent-data-tools setup vscode # adds the server to .vscode/mcp.json in the current folder--print shows the change without writing anything. When a file is changed, other servers in it are kept and the previous version stays next to it as .bak; a file that is not plain JSON is left alone and the lines to add are printed.
Without a key the server gives 3 free calls over HTTP (25 over MCP). With a prepaid key:
npx agent-data-tools credits # where to get a key (card or USDC)
npx agent-data-tools key adt_... # saves it to ~/.agent-data-tools/config.json
npx agent-data-tools key # shows the last 4 characters and the balance
npx agent-data-tools setup cursor --key adt_...setup --key puts the key into the client's own user-level configuration (a header for Claude Code and Cursor, the server's environment for Claude Desktop). It is never written to .vscode/mcp.json, which is a project file: there the entry is the local command below, which reads the saved key.
npx agent-data-tools mcp is a stdio MCP server that forwards to the remote one, for clients that only start local commands. It reads the key from --key, then AGENT_DATA_TOOLS_KEY, then ~/.agent-data-tools/config.json. The package holds no card or wallet credentials; wallet mode signs locally with the private key you supply.
From the command line and from code
npx agent-data-tools list pdf
npx agent-data-tools pdf_text url=https://arxiv.org/pdf/1706.03762 pages=2import { AgentDataTools } from "agent-data-tools";
const adt = new AgentDataTools();
const weather = await adt.call("/weather", { city: "London" });
const matches = await adt.tools({ search: "sanctions" });Read a list of web pages
One URL per line in a file (or on stdin); one JSON line per page comes out, 8 pages at a time by default:
npx agent-data-tools key adt_... # once
npx agent-data-tools read urls.txt > pages.jsonl
npx agent-data-tools read urls.txt --concurrency 16 --format text --max-chars 5000Each line is {url, ok, status, title, markdown, chars} or {url, ok: false, status, error}. Pages that block bots, need JavaScript, are empty or missing are reported and never charged; the run goes on. Pricing per page: https://agent-data-tools.revmesh2074.workers.dev/bulk-web-reader-api
Give the tools to a model
openAiTools() returns OpenAI function-calling definitions; examples/openai-agent.mjs is a complete loop in 30 lines.
const tools = await adt.openAiTools(["extract", "pdf_text", "search"]);
// When the model calls one:
const answer = await adt.call(call.function.name, JSON.parse(call.function.arguments));Paying
| How | Setup |
|---|---|
| Free calls | None. 3 successful calls per caller over HTTP, 25 over MCP; AI media, rendering and search tools are paid only. |
| Card credits | Buy a key at /credits, then npx agent-data-tools key adt_..., new AgentDataTools({ apiKey }) or the ADT_API_KEY environment variable. |
| USDC per call from your wallet, in your AI client | Start the MCP server with AGENT_DATA_TOOLS_WALLET_KEY set to the private key of a wallet that holds USDC on Base: npx agent-data-tools mcp. No account and no key to buy. After the free calls each call is paid at its listed price; failed calls are not charged. Limits: $0.10 a call and $1 a day, changed with AGENT_DATA_TOOLS_MAX_USD and AGENT_DATA_TOOLS_DAILY_USD. Use a wallet that holds only what you are willing to spend. |
| USDC per call (x402), from code | Pass a fetch that pays HTTP 402, such as @x402/fetch around your own wallet: new AgentDataTools({ fetch: paying }). Set your spending limits in that wrapper. |
When payment is needed and none is set up, call() throws PaymentRequired with priceUsd and buyUrl. Other failures throw ToolError with status and body. The package reads a wallet key only from AGENT_DATA_TOOLS_WALLET_KEY, only in mcp, and only to sign USDC payments on Base for the exact amount the service quoted; it never writes, prints or sends the key. Your API key goes only to the service origin.
Also
Full catalog and prices: /tools, /openapi.json. MCP servers: https://agent-data-tools.revmesh2074.workers.dev/mcp/compact (three tools for the whole catalog) and https://agent-data-tools.revmesh2074.workers.dev/mcp/all (every tool as its own definition). Terms: /terms.
