This server gives Claude access to 40+ paid APIs settled in USDC on Base using the x402 protocol. You get patent search via USPTO, federal and state case law, OFAC sanctions screening, geocoding, weather, DNS lookups, webpage summarization, translation, image description, Wikipedia summaries, academic paper search, crypto address validation, airport lookups, and US Census demographics. No API keys or credit cards. Each call triggers an EIP-3009 payment authorization signed by your EVM wallet, verified and settled on-chain in about two seconds. Prices start at $0.001 per call with a default $0.10 safety cap. Useful when you want Claude to pull structured data from specialized sources without managing dozens of separate API accounts.
EVM_PRIVATE_KEY*secretHex-encoded EVM private key (0x-prefixed) used by the SDK to sign x402 EIP-3009 payment authorizations. Funds USDC on Base.
Client SDK + MCP server for 2s.io — a unified JSON REST API for AI agents, paid per call in USDC on Base or Solana via x402.
This repo ships SDKs for every major agent-development language plus an MCP server for any MCP-aware host:
| Language | Package | Install | Status |
|---|---|---|---|
| TypeScript / Node | @2sio/sdk | npm install @2sio/sdk | ✅ x402 |
| TypeScript / Node | @2sio/mcp | npx @2sio/mcp | ✅ MCP server, x402 |
| Python | 2sio | pip install 2sio | ✅ x402 |
| Python / LangChain | langchain-twosio | pip install langchain-twosio | ✅ Tool adapters |
| Python / LlamaIndex | llama-index-tools-twosio | pip install llama-index-tools-twosio | ✅ Tool adapters |
| Go | github.com/2s-io/sdk/packages/go | go get github.com/2s-io/sdk/packages/go | 🚧 x402 wire-up pending |
| Rust | twosio | cargo add twosio | 🚧 x402 wire-up pending |
No accounts. No API keys. No credit cards. Buyers sign an EIP-3009 USDC authorization (Base) or an SPL USDC transfer (Solana) on-the-fly, the facilitator verifies + settles in ~2 seconds on mainnet, and the API returns typed data. Prices start at $0.001/call.
Want to confirm an endpoint actually works before funding anything? Every endpoint serves one free real call per endpoint per hour — no key, no wallet, no signup. Add ?trial=1 (or header X-2s-Trial: 1), or flip the SDK into trial mode:
import { TwoS } from '@2sio/sdk'
const trial = new TwoS({ trial: true }) // no key required
const { data } = await trial.validate.iban({ iban: 'GB82WEST12345698765432' })
console.log(data.items[0].valid) // real result; response meta.trial = { free: true, ... }
from twosio import TwoS
trial = TwoS(trial=True) # no key required
print(trial.validate.iban(iban="GB82WEST12345698765432").data["items"][0]["valid"])
curl "https://2s.io/api/validate/iban?iban=GB82WEST12345698765432&trial=1"
npx -y @2sio/mcp --trial # MCP host with free trial calls; or set TWOS_TRIAL=1
The trial runs the real handler and returns real data. Once the hourly trial is used, the endpoint returns the normal 402 — drop trial and pass a privateKey/signer to pay per call for unlimited access.
TypeScript:
import { TwoS } from '@2sio/sdk'
import { privateKeyToAccount } from 'viem/accounts'
const client = new TwoS({ signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`) })
const { data } = await client.patents.search({ q: 'neural network', limit: 5 })
console.log(data.items[0].title) // normalized envelope: { ok, items, total, source, meta? }
Python:
from eth_account import Account
from twosio import TwoS
client = TwoS(signer=Account.from_key(os.environ["EVM_PRIVATE_KEY"]))
r = client.patents.search(q="neural network", limit=5)
print(r.data["hits"][0]["title"])
{
"mcpServers": {
"2sio": {
"command": "npx",
"args": ["-y", "@2sio/mcp"],
"env": { "EVM_PRIVATE_KEY": "0x..." }
}
}
}
Restart Claude. The model can now call patents.search, law.sanctions-check, ai.summarize, geocode.address, vehicle.vin-decode, agent.knowledge-delta, and 120+ other paid tools — paying per call, no human in the loop.
180+ endpoints (live count in the directory) across:
Live catalog: https://2s.io/api/directory. OpenAPI 3.1: https://2s.io/api/openapi. Machine-discovery manifest: https://2s.io/.well-known/x402.
maxPriceUsd (default $0.10).onPaymentRequested hook lets callers approve/deny each call programmatically.packages/
├── 2s-sdk/ @2sio/sdk — typed TypeScript client
├── 2s-mcp/ @2sio/mcp — MCP server (depends on 2s-sdk)
├── python/ 2sio — Python client
├── python-langchain/ langchain-twosio — LangChain tool adapters
├── python-llamaindex/ llama-index-tools-twosio — LlamaIndex tool adapters
├── go/ Go client (x402 wire-up pending)
└── rust/ Rust client (x402 wire-up pending)
examples/sdk/ minimal paying-agent samples + Claude Desktop wiring
MIT. See LICENSE.