2s

2s

Pay-per-call AI agent APIs on Base via x402. Multiple tools across patents, law, AI, geo, weather, crypto, and more. Always growing.

Category
Visit Server

README

2s.io SDK

Client SDK + MCP server for 2s.io — a unified JSON REST API for AI agents, paid per call in USDC on Base 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 viem āœ… x402 + bearer
TypeScript / Node @2sio/mcp npx @2sio/mcp āœ… MCP server, x402 + bearer
Python 2sio pip install "2sio[x402]" āœ… x402 + bearer
Go github.com/2s-io/sdk/packages/go go get github.com/2s-io/sdk/packages/go 🚧 bearer ready, x402 pending
Rust twosio cargo add twosio 🚧 bearer ready, x402 pending

No accounts. No API keys. No credit cards. Buyers sign an EIP-3009 USDC authorization on-the-fly, the Coinbase CDP facilitator verifies + settles in ~2 seconds on Base mainnet, and the API returns typed data. Prices start at $0.001/call.

30-second demo

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.hits[0].title)

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"])

30-second Claude Desktop install

{
  "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, crypto.address-validate, and 30+ other paid tools — paying per call, no human in the loop.

What's behind the API

39 endpoints across:

  • AI: webpage summarization, translation, typed extraction, image description, screenshots
  • Patents: USPTO Open Data Portal search + full file-wrapper detail + document list
  • Law: federal/state case search, citation verification, OFAC sanctions screening, Federal Register, opinions
  • Geo / weather: forward + reverse geocoding, US weather by ZIP, NOAA tides, sunrise/sunset, climate stations, recent earthquakes, IP geolocation
  • Internet: DNS lookup, RDAP whois, URL unfurl (Open Graph), URL → clean Markdown
  • Wikipedia / academic papers: summaries, multi-source paper search (arXiv + PubMed + Semantic Scholar)
  • Crypto: multi-chain address validation (BTC, ETH, SOL, LTC, TRX, XRP, BCH), live EVM gas oracle
  • Airports: lookup by IATA/ICAO, nearest-airport-to-coord (OurAirports CC0, ~85k airports)
  • Utilities: hash computation, image compression, barcode/QR generation, countdown GIFs
  • Census: US Census ACS 5-year demographics by ZCTA
  • Account: balance + create (bearer mode)

Live catalog: https://2s.io/api/directory. OpenAPI 3.1: https://2s.io/api/openapi. Machine-discovery manifest: https://2s.io/.well-known/x402.

Safety

  • The SDK refuses to sign payments above a configurable maxPriceUsd (default $0.10).
  • Every x402 payment is a single-use EIP-3009 authorization with a 60-second deadline. No allowances are issued; a leaked key can only spend what's in the wallet at the moment of signing, only at advertised prices.
  • Optional onPaymentRequested hook lets callers approve/deny each call programmatically.

Repo layout

packages/
ā”œā”€ā”€ 2s-sdk/     @2sio/sdk — typed client
└── 2s-mcp/     @2sio/mcp — MCP server (depends on 2s-sdk)
examples/sdk/   minimal paying-agent samples + Claude Desktop wiring

License

MIT. See LICENSE.

Links

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured