npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

apifare-mcp

v0.5.1

Published

Give your AI agent a prepaid balance for API calls: search the web, fetch a URL, and pay for APIs mid-conversation.

Readme

apifare-mcp

apifare — "API fare: the fare an agent pays." One key, every API your agent needs, under hard caps and a kill switch. There is no separate provider account or provider API key for eligible capabilities; one apifare account gives your agent a capped, auditable budget. The agent discovers APIs, calls them, and pays per call from the balance — mid-conversation.

Human home: apifare.com / apifare.ai. Live API: https://apifare.com (legacy alias https://apipay.fly.dev).

Legacy install ids (not the product name): env APIPAY_TOKEN, token prefix apipay_, npm id apipay-mcp, and MCP server name apipay still work. New installs should use apifare-mcp + APIPAY_TOKEN.

Five tools: search_apis, call_api, check_balance, get_vault_link, topup. When the balance runs out, the agent receives a machine-readable payment link to hand to you.

1. Get a token (shown once)

curl -X POST https://apifare.com/v1/signup \
  -H "content-type: application/json" \
  -d '{"email":"[email protected]"}'

New accounts start with 500 trial credits (1 credit = $0.01).

2. Install

Claude Code

claude mcp add apifare -e APIPAY_TOKEN=<your-token> -- npx -y apifare-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "apifare": {
      "command": "npx",
      "args": ["-y", "apifare-mcp"],
      "env": { "APIPAY_TOKEN": "<your-token>" }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "apifare": {
      "command": "npx",
      "args": ["-y", "apifare-mcp"],
      "env": { "APIPAY_TOKEN": "<your-token>" }
    }
  }
}

3. Use it

First ask (no user key):

search the web for X

The agent will search_apis, then call_api with slug dataforseo and {q} (count/country/language optional). That path is resold — live Google via DataForSEO SERP, 0.3 credits, no user search key. Do not ask for a Brave key unless the user wants the BYOK web-search slug.

Second no-key: fetch a URL. slug scrape with {url} (0.3 credits) — DataForSEO On-Page markdown, no user scrape key. Do not ask for a ScrapingBee key unless the user wants the BYOK scrapingbee slug.

Weather is the cheap third no-key demo: slug open-meteo (0.1 credits). Ask "what's the weather in London" ({lat, lon, forecast?}, London is ~51.51, -0.13). Do not ask for an Open-Meteo or OpenWeather key unless the user wants the BYOK weather slug. Open-Meteo results include attribution (CC BY 4.0); keep Weather data by Open-Meteo.com next to any weather you display.

The per-call cost and remaining balance come back with every result. Top up any time at the link check_balance returns. For BYOK catalog APIs, use get_vault_link so the key never transits chat.

Env vars: APIPAY_TOKEN (required; legacy name), APIPAY_BASE_URL (optional override, defaults to the hosted gateway).

If your token leaks

Rotate it immediately — the old token stops working the instant the new one is issued; your balance, account id, and vaulted keys are untouched:

curl -X POST https://apipay.fly.dev/v1/token/rotate \
  -H "Authorization: Bearer <your-current-token>"

The response contains your new token (shown once). Update APIPAY_TOKEN in your MCP config afterwards. You can also remove a vaulted provider key at any time with DELETE /v1/keys/<provider-slug> using the same auth header.

Native API calls (transparent proxy)

Your agent can also skip the catalog schema entirely and call supported providers in their native API language through the apifare proxy — one bearer token, provider docs apply verbatim, native error codes come back untouched:

POST https://apipay.fly.dev/proxy/dataforseo/v3/serp/google/organic/live/advanced
Authorization: Bearer <APIPAY_TOKEN>
Content-Type: application/json

[{"keyword":"apifare prepaid balance","location_code":2840}]

apifare injects the provider credential (its own for dataforseo / open-meteo / apify; your vaulted key for brave / scrapingbee / openweather / fal), enforces your per-agent caps before forwarding, and meters the prepaid balance (x-apipay-credits-charged / x-apipay-balance response headers). The proxy_call MCP tool wraps exactly this.