ASwarmApi
Live · USDC on Base · x402

Structured APIs for agents.
Priced per call.

SEC filings, news, hiring, web search, GitHub health, and package CVEs — returned as JSON your model can use. Connect with MCP or call the same routes over HTTP with the TypeScript SDK.

  • MCP: @swarm-api/mcp for Cursor, Claude Desktop, Continue.
  • HTTP + SDK: @swarm-api/sdk for backends and scripts.
  • Payment: per successful response in USDC via x402 (no vendor API keys).

9 production tools · $0.002–$0.05 per call · wallet is the only credential

Gateway: api.swarm-api.com. Hosted MCP registry: Smithery — swarm-api/swarmapi (https://smithery.ai/servers/swarm-api/swarmapi). Protocol: x402.

Proof · raw HTTP (try it)
curl -i "https://api.swarm-api.com/v1/github/repo?slug=facebook/react"

HTTP/1.1 402 Payment Required
Content-Type: application/json; charset=utf-8
Payment-Required: eyJ4NDAyVmVyc2lvbiI6MiwiZXJyb3IiOiJQYXltZW50IHJlcXVpcmVkIi…

{}

Unauthenticated clients get 402 with a Payment-Required payload (amount in atomic USDC, Base payee). Decode the header or pay through the SDK/MCP.

live
Revenue settled
$0
Paid calls
0
Unique payers
0
Endpoints live
9

Public aggregate metrics — no customer PII. Zeros only mean limited traffic on this slice, not that payments are disabled.

[01]
What you get

Two surfaces. One gateway.

Pick MCP for chat-native agents, or the SDK for anything that already speaks HTTP.

Agent tools (MCP)

Install @swarm-api/mcp. The host exposes nine paid tools that map 1:1 to gateway routes. Optional free probes: gateway_ping, gateway_catalog (no wallet).

HTTP API + TypeScript SDK

Call https://api.swarm-api.com directly or wrap it with @swarm-api/sdk — automatic 402 handling, signing, and retries.

Pay when data returns

x402 turns payment into part of the HTTP round-trip. How payment works →

[02]
Why teams use SwarmApi

Built for agents shipping real work.

Cheaper than enterprise data contracts when you meter by the task — not by the seat year.

$

Per-call vs. shelfware subscriptions

A full company pass — every tool once — is about $0.13 USDC. Enterprise comps often start at five figures a year for slower-moving bundles.

Fresher than the training cutoff

EDGAR indexing, GDELT-sized news windows, public job boards — structured so the model stops guessing whether a fact is stale.

🔑

No API keys

Fund a Base wallet with USDC. That wallet signs each micropayment — no signup wall, no rotating secrets in env vars for vendors.

{ }

JSON for tool-calling

Filings, insiders, articles, jobs, repo stats, CVE summaries — shapes meant for LLM consumption, not spreadsheet export.

Cursor- and Claude-ready

Same MCP config pattern as other production servers; ship prompts that chain resolve → filings → extract without custom middleware.

[03]
Catalog

Nine paid tools. Grouped by job-to-be-done.

Full JSON schemas and examples live in the Marketplace. MCP tool names match the rows below.

Example prompts: “Summarize material risks from AAPL's latest 10-K Item 1A.” · “What insider Form 4 activity hit NVDA this quarter?” · “Is facebook/react actively maintained and any critical CVEs on its npm deps?”

MCP-only free helpers (omit SWARMAPI_PRIVATE_KEY): gateway_pingGET /health, gateway_catalog GET /v1/catalog.

ToolPriceWhat it returns
resolve_company$0.002Resolve ticker, CIK, or company name to a canonical SEC record.
list_filings$0.005List recent SEC filings filtered by form type and date.
github_repo$0.005Stars, languages, license, last 10 commits, releases for a GitHub repo.
package_info$0.005npm/PyPI/cargo metadata plus OSV.dev CVE scan.
company_jobs$0.01Open postings from public Greenhouse and Lever boards.
web_search$0.01General web search via the Brave Search API.
company_news$0.02Recent news articles via GDELT 2.0, default 30-day window.
insider_transactions$0.03Form 4 trades for officers, directors, 10% holders.
extract_filing$0.05Parse 10-K, 10-Q, or 8-K into Item-level JSON.
SEC + insiders

Ticker → filings → narrative.

Resolve symbols to CIK, walk recent filings, lift 10-K / 10-Q / 8-K Items into JSON, decode Form 4 insider flows.

  • resolve_company$0.002Ticker / CIK / name → canonical SEC record.
  • list_filings$0.005Recent filings filtered by form type and date.
  • extract_filing$0.0510-K / 10-Q / 8-K parsed to Item-level JSON.
  • insider_transactions$0.03Form 4 trades for officers, directors, 10% holders.
Signals

News, hiring, open web.

GDELT-backed news, Greenhouse/Lever job boards where exposed, Brave-backed web search for the long tail query.

  • company_news$0.02Articles, default 30-day window.
  • company_jobs$0.01Open postings on Greenhouse + Lever.
  • web_search$0.01General web search via Brave.
Code intelligence

Repo health & supply chain.

Snapshot GitHub activity and inventory npm/PyPI/cargo packages with OSV.dev CVE context — one round-trip each.

  • github_repo$0.005Stars, languages, license, commits, releases.
  • package_info$0.005Registry metadata + OSV.dev CVE scan.

Full due-diligence pass — every paid tool once — about $0.13 USDC.

[04]
Protocol

Four beats: request, challenge, sign, settle.

x402 keeps settlement on Base while your integration stays plain HTTP + one signed header on retry.

1

Request

Agent calls the gateway — same verbs and paths as the MCP tool names imply.

GET /v1/github/repo?slug=owner/repo
2

Challenge

Gateway answers 402 Payment Required with machine-readable terms (Payment-Required header / payload).

402 + accepts[] · amount · asset · payTo
3

Sign

SDK or MCP runner signs an EIP-3009 USDC authorization for that quote and attaches it on retry.

X-Payment: …
4

Settle + respond

Gateway verifies, returns structured JSON, and the facilitator completes USDC settlement on Base.

200 OK · application/json
Technical details (EIP-3009 & facilitator)

Authorizations follow ERC-3009 transferWithAuthorization, letting the payer approve an atomic transfer referenced by the payment payload — no on-chain tx from your hot path before the retry. Coinbase CDP facilitates settlement on Base; USDC contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Read the x402 whitepaper (PDF) for the full handshake.

[05]
Integrations

Where SwarmApi plugs in.

MCP registries, packages, live ops — same gateway everywhere.

Install

Fast path: run the setup CLI, paste one JSON block into your MCP host, restart. Use the SDK when you are not inside an MCP runtime.

1

Cursor / Claude / Continue: run setup

$ npx -y @swarm-api/setup

Generates or imports a Base wallet, waits for USDC on Base if you choose, writes ~/.swarmapi/claude-desktop.json. Merge the mcpServers.swarmapi object into ~/.cursor/mcp.json or Claude's config — see the MCP readme.

2

Backend / script: SDK snippet

import { createAgentClient } from "@swarm-api/sdk";

const fetch = createAgentClient({
  privateKey: process.env.AGENT_PRIVATE_KEY,
  maxSpendPerRequest: 100_000n, // $0.10 cap (atomic USDC)
});

const res = await fetch(
  "https://api.swarm-api.com/v1/companies/filings?id=0000320193"
);
const body = await res.json();
Full CLI transcript & funding detail

Interactive setup output (abbreviated paths):

$ npx -y @swarm-api/setup

Wallet source:
  [1] Generate a fresh Base wallet   (recommended)
  [2] Use an existing private key    (0x-prefixed hex)
  [3] Use an existing BIP-39 mnemonic (12 or 24 words)

> 1
✓ Generated wallet: 0xAB12…CD34
✓ Wallet saved to ~/.swarmapi/wallet.json (chmod 600)

How would you like to fund the wallet?
  [1] Send USDC on Base from any wallet or exchange  (recommended)
  [2] Open coinbase.com — buy USDC there, then Withdraw/Send on Base
  [3] Skip — I'll fund later (then run with --reuse)

> 1
Send any amount of USDC on Base mainnet to:
  0xAB12…CD34

Polling Base mainnet for USDC balance (Ctrl-C is safe — wallet saved):
✓ Detected 10.000000 USDC.
✓ MCP config written to ~/.swarmapi/claude-desktop.json

Bring your own wallet, or generate a fresh one. The CLI accepts a raw private key (--key 0x...), a 12 or 24-word BIP-39 mnemonic (--mnemonic "..."), or generates one for you. Keys are written to ~/.swarmapi/wallet.json (chmod 600) before network calls — Ctrl-C during polling is safe.

Three ways to fund — pick any one:

  • Send on Base — the CLI prints your address and polls. Send USDC on Base from MetaMask, Coinbase (Withdraw → Base), Binance, Phantom, treasury, or hardware wallet.
  • Buy then withdraw — purchase USDC on an exchange and withdraw/send on Base to the printed address. Hosted card checkout needs a CDP sessionToken from your backend (docs); this CLI does not embed that flow.
  • Bridge or swap — bridge USDC or native assets to Base via Across, the official Base bridge, or a DEX aggregator, then send to the printed address.

Power flags: --reuse, --testnet, --json, --no-poll, --no-open, --gateway, --max-spend. Run npx -y @swarm-api/setup --help.

3

Merge MCP config & restart the host app.

Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\ (Windows). Paste swarmapi into mcpServers.

Cursor: same block under mcpServers in ~/.cursor/mcp.json.

4

Prompt with tools enabled.

"Pull the latest 8-K filings for AAPL and summarise material events."

Default MCP spend guardrails typically cap a single request near $0.10 USDC unless you raise them — tune SWARMAPI_MAX_SPEND_PER_REQUEST_ATOMIC / host docs for your risk.