Abstraxn Agent Layer

io.github.sandeep-antier由 GitHub 账号 sandeep-antier 发布v1.0.0更新于 Oct 24, 2026

Abstraxn: public Web3 MCP server for read-only chain data and pay-per-call relays.

已验证Streamable HTTP可网页运行位置与生活网页搜索与抓取金融

概览

AI 生成的概览

公开的 Web3 MCP 服务器,提供只读链上数据、天气查询、未签名转账构建,以及由调用方钱包按次付费的查询。

可以做什么
  • 读取链上状态:区块高度或 Solana slot、交易状态、Gas 与 EIP-1559 费用提示、ERC-20 元数据、代币现货价格
  • 按显式指定的发送方构建未签名的原生、ERC-20 或 SPL 转账交易,不签名也不广播
  • 查询天气:当前天气、短期预报、天文、历史、海洋及地点搜索
  • 按次付费查询:加密市场数据,多链钱包、代币、ENS 与交易模拟,航班与酒店搜索,地点、太阳能与航拍视图,以及社交身份解析
适用场景
适合需要实时链上事实、费用估算或未签名转账草稿的助手,也适合回答天气、旅行或身份类问题,且用户愿意用自己的钱包以稳定币支付少量按次费用时使用。
运行要求
远程 streamable HTTP 端点;免费工具无需 API 密钥、账号或注册。付费工具需要能对 x402 支付挑战进行签名、以 USDC/USDm 付款的钱包客户端。自行部署需 Node.js 20+、PostgreSQL,以及 WEATHERAPI_KEY、WEATHERAPI_BASE_URL、UPSTREAM_RELAY_BASE_URL 和 ENRICHMENT_RELAY_BASE_URL 配置。
安装前请注意
付费工具按次从调用方钱包扣费(例如航班搜索每次 0.02 美元、地点搜索每次 0.08 美元),首次调用返回的是支付挑战而非错误。服务器本身不持有密钥也不签名,但钱包客户端会签名。自行部署时会把调用方 IP、付费钱包地址和付费调用记录存入 Postgres,天气工具还会把 WEATHERAPI_KEY 作为查询参数发给上游服务商。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Abstraxn Agent Layer,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.sandeep-antier%2Fabstraxn/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "abstraxn-agent-layer": {
      "type": "http",
      "url": "https://mcp.abstraxn.com/mcp"
    }
  }
}

README

Abstraxn Public Web3 MCP Service

[License: MIT] [Node]

A free, public MCP (Model Context Protocol) server for Web3 data. Point any MCP client — Claude Desktop, Cursor, your own agent — at it and it can read live chain data (block height, gas, transaction status, ERC-20 info, spot prices), look up weather forecasts, build unsigned EVM/Solana transfer transactions, and, for a handful of pay-per-call tools, look up market data, wallets/tokens/ENS, travel search, places/solar/aerial-view data, and social-profile identity.

No API key, no account, no signup. Free tools are open to anyone; paid tools are settled directly from the caller's own wallet via the x402 payment protocol — this service never holds or signs funds on your behalf.

Built on the official @modelcontextprotocol/sdk and NestJS 11.

Contents


Quick start

bash
git clone https://github.com/Abstraxn-Labs/abstraxn-agent-layer.gitcd abstraxn-agent-layernpm installcp .env.example .env# Edit .env: Postgres connection + UPSTREAM_RELAY_BASE_URL / ENRICHMENT_RELAY_BASE_URL# (each required for its own group of paid tools) + WEATHERAPI_KEY (required for weather.forecast)npm run start:dev
  • Health check: GET http://localhost:3011/health
  • MCP endpoint: POST http://localhost:3011/mcp
  • API docs (health only): http://localhost:3011/api/docs

Database migrations run automatically on boot — no separate CLI step needed.

Use it from Claude Desktop / Cursor

Add this to your MCP client's config (e.g. claude_desktop_config.json or Cursor's mcp.json):

json
{  "mcpServers": {    "abstraxn-public-web3": {      "url": "http://localhost:3011/mcp"    }  }}

Restart the client and the tools below become available to it — no further setup.

Available tools

ToolPaid?What it does
network.blocknumberNoCurrent EVM block number or Solana slot. Query one chain or all at once.
network.transaction_statusNoLook up a transaction/signature by hash on EVM or Solana.
network.gas_infoNoCurrent gas price + EIP-1559 fee hints for an EVM chain.
network.token_infoNoERC-20 name / symbol / decimals / total supply.
network.token_priceNoSpot price via CoinGecko (defaults to ETH/USD).
network.prepare_transferNoBuild an unsigned native/ERC-20/SPL transfer transaction from an explicit from/to/amount. Never signs or broadcasts.
weather.forecastNoCurrent conditions, forecast, astronomy, location search, historical, and marine weather lookups, 6 actions.
market.cryptoYesCrypto market-data lookups (CoinGecko-sourced), 6 actions.
web3.lookupYesMulti-chain wallet / token / ENS / tx-simulation lookups, 7 actions.
travel.searchYesFlight and hotel search, 2 actions.
places.lookupYesPlace / solar / aerial-view lookups, 11 actions.
social.profile_lookupYesPerson / social-profile identity resolution for a batch of records.

Tools are namespaced by area (network.*, market.*, web3.*, travel.*, places.*, social.*) so an MCP client can browse them as a tree rather than a flat list.

How paid tools work: call one with no payment, and you get back a paymentRequired challenge (not an error). Your wallet client signs it and retries the same call with paymentPayload set — your wallet pays directly; this service only relays the request.

Calling tools directly (curl)

Most people will use an MCP client (above), but the endpoint is plain JSON-RPC over HTTP if you want to script against it directly:

bash
BASE=http://localhost:3011ACCEPT='Accept: application/json, text/event-stream'   # required by the MCP spec
# 1. Initialize a sessioncurl -s -X POST "$BASE/mcp" -H 'Content-Type: application/json' -H "$ACCEPT" \  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0"}}}'
# 2. List available toolscurl -s -X POST "$BASE/mcp" -H 'Content-Type: application/json' -H "$ACCEPT" \  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
# 3. Call a toolcurl -s -X POST "$BASE/mcp" -H 'Content-Type: application/json' -H "$ACCEPT" \  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"network.token_price","arguments":{"symbol":"bitcoin"}}}'

GET /mcp returns 405 by design — every call is stateless, so there's no session to resume.

Configuration

Copy .env.example to .env. Everything has a safe default except the one marked required:

VariableRequiredDescription
PORTNoHTTP port (default 3011)
POSTGRES_HOST / PORT / USER / PASSWORD / DBNoPostgres connection, used only for abuse tracking
PUBLIC_MCP_RATE_LIMIT_PER_MIN / _WINDOW_MSNoGlobal per-IP rate limit (default 30/min)
CHAIN_RPC_*NoPer-chain EVM RPC overrides — public defaults are used if unset (see src/mcp/utils/chain-registry.util.ts)
SOLANA_RPC_URL / SOLANA_DEVNET_RPC_URLNoSolana cluster RPC overrides
WEATHERAPI_KEYYesFree API key for weather.forecast — get one at WeatherAPI.com's signup page (100K calls/month free tier, no paid features used). Without it, weather.forecast returns a clear error instead of failing the whole service.
WEATHERAPI_BASE_URLYesUpstream base URL for weather.forecast — no default is committed to source, so the tool fails cleanly until this is set (ships as https://api.weatherapi.com/v1 in .env.example; override to point at a mock/self-hosted mirror for local testing).
UPSTREAM_RELAY_BASE_URLYesBase URL for the upstream relay behind market.crypto / web3.lookup / travel.search — no default is committed, so those 3 tools fail until this is set
ENRICHMENT_RELAY_BASE_URLYesBase URL for the upstream relay behind places.lookup / social.profile_lookup — a separate upstream from UPSTREAM_RELAY_BASE_URL, no default is committed

How it works

MCP client (Claude Desktop, Cursor, your agent)    → POST /mcp  (this service, stateless — a fresh McpServer per request)    → free tools: direct chain RPC / CoinGecko calls    → paid tools: relayed upstream, settled by the caller's wallet via x402

This is a single, standalone deployable — it doesn't share a workspace or database with any other Abstraxn service. That's deliberate: several MCP registries expect a public MCP server to live in its own repo with one route and one fixed tool set, reviewable end to end.

Stack: Node.js 20+ · NestJS 11 · @modelcontextprotocol/sdk ^1.30.0 (official SDK) · PostgreSQL + TypeORM · @x402/core · viem (EVM) + raw JSON-RPC (Solana reads) · @solana/web3.js + @solana/spl-token (Solana transfer building) · @skalenetwork/bite (SKALE privacy-encrypted transfers) · helmet, @nestjs/throttler

Database

Postgres is used for abuse tracking only — no tenant, policy, or config tables exist:

TablePurpose
observed_ipsOne row per caller IP, with a running call count and last-seen time.
observed_walletsOne row per wallet address seen paying via x402.
public_mcp_transactionsAppend-only history of completed paid calls.

If Postgres is unreachable, a call still succeeds — tracking writes are best-effort and never block or fail a real MCP request.

Security

Since anyone can call this service with no key, a few invariants matter:

  • No SSRF surface: every outbound URL (chain RPC, upstream relay, CoinGecko) comes from server-side config — no tool accepts a caller-supplied URL.
  • Rate limiting is global and IP-keyed — the only lever available with no accounts. If you deploy behind a reverse proxy, set app.set('trust proxy', ...) in main.ts, or the limiter ends up rate-limiting the proxy instead of real callers.
  • No secrets beyond the DB password and WEATHERAPI_KEY, both env-only and never logged — weather.forecast builds its provider request URL with the key as a query param, but every log line only ever carries the action name and error message, never the URL itself.
  • CORS is wildcard by design — nothing tenant-specific ever crosses an origin here.

Found a security issue? See CONTRIBUTING.md before opening a public issue.

Scripts

ScriptDescription
npm run start:devRun in watch mode
npm run buildCompile to dist/
npm run start:prodRun the compiled build (dist/main)
npm run lintESLint
npm testJest — unit, SDK-level integration, and HTTP smoke tests

Contributing

Issues and PRs are welcome — see CONTRIBUTING.md for how to add a new tool and the project's definition of done.

License: MIT

来源:README.md,提交 46af949

工具

12

network.blocknumber

Get current block number / slot

Read the current chain head — EVM block number or Solana slot — for a supported network. Free, read-only, no wallet needed. Use this to confirm a network is progressing before submitting a transaction, correlate off-chain events with on-chain height, or choose a safe starting point when scanning logs. Pass `chain` as one of: solana, solana-devnet, ethereum, sepolia, polygon, amoy, bsc, bsc-testnet, base, base-sepolia, tempo, tempo-testnet, arbitrum-one, monad, skale-base-sepolia. Omit `chain` (or pass `all`) to query every resolvable chain in one call.

输入参数chain

network.transaction_status

Get transaction status

Check the status of a transaction. Supports both EVM (transaction hash) and Solana (signature). Free, read-only. Use this to confirm a transfer landed, debug a failed transaction, or report status to a user. Both `chain` and `transaction_hash` are required. Available chains: solana, solana-devnet, ethereum, sepolia, polygon, amoy, bsc, bsc-testnet, base, base-sepolia, tempo, tempo-testnet, arbitrum-one, monad, skale-base-sepolia.

输入参数chain必填transaction_hash必填

network.gas_info

Get gas price info

Get the current gas price and EIP-1559 fee hints for an EVM chain. Free, read-only, no wallet needed. Use this to estimate transaction cost or explain fees to a user before they send a transaction. `chain` is required. Supported chains: ethereum, sepolia, polygon, amoy, bsc, bsc-testnet, base, base-sepolia, tempo, tempo-testnet, arbitrum-one, monad, skale-base-sepolia.

输入参数chain必填

network.token_info

Get ERC-20 token info

Read ERC-20 token metadata — name, symbol, decimals, total supply — for a token contract on an EVM chain. Free, read-only. Pass `token` as a contract address (0x…) or symbol `USDC` / `USDC.e` on chains where a lookup is configured. This server never holds a caller wallet, so no balance is ever returned — only public token metadata. Both `chain` and `token` are required. Supported chains: ethereum, sepolia, polygon, amoy, bsc, bsc-testnet, base, base-sepolia, tempo, tempo-testnet, arbitrum-one, monad, skale-base-sepolia.

输入参数chain必填token必填

network.token_price

Get token spot price

Get a spot token price from a public market API (CoinGecko). Free — no payment or wallet needed. Defaults to ETH/USD.

输入参数symbolvsCurrency

network.prepare_transfer

Prepare an unsigned transfer transaction

Build an **unsigned** native or token transfer transaction for a supported chain, from an explicit sender you provide. Free, read-only against the chain (nonce/gas/fees are read live) — this tool never signs, broadcasts, holds a key, or enforces any allowlist/spend limit. This server never binds a caller wallet, so `from` is always required. Supported chains: solana, solana-devnet, ethereum, sepolia, polygon, amoy, bsc, bsc-testnet, base, base-sepolia, tempo, tempo-testnet, arbitrum-one, monad, skale-base-sepolia. Token (`token` field): - Solana: 'SOL' (native, default) or 'USDC'. - EVM: native symbol (default), 'USDC', 'USDC.e' where configured for the chain, or a raw 0x contract address (decimals are read live from the contract; `token_decimals` is only a fallback if that read fails). Gas: the sender pays gas in the chain's native token once they sign — this server never sponsors it. Raw calldata (EVM only): pass `data` (hex, 0x-prefixed) with `to` as the contract call target and `amount` as the native value to send (use "0" for a pure call). Privacy (`private`, EVM only): requests SKALE BITE encryption, only supported on skale-base-sepolia, where it defaults to true — pass `private: false` there for a plaintext transfer. Rejected on every other chain.

输入参数to必填datafrom必填chain必填tokenamount必填privatetoken_decimals

weather.forecast

Weather forecast and current conditions

Weather data from a global weather data provider — current conditions, short-range forecast, astronomy, historical, marine, and location search. Free, read-only, no wallet needed. Every action requires `q`, a location: a city name (e.g. "Paris"), "lat,lon" (e.g. "48.85,2.35"), a US/UK/Canadian postal code, or an IATA airport code. Pick one `action`: - current: current conditions for `q`. Optional `aqi` (default false) adds basic air quality data. - forecast: forecast for `q`. Optional `days` — this deployment runs on a data plan capped at 3 days, so only 1-3 is accepted; omit for the provider default. Optional `aqi`, `alerts` (default false, adds active weather alerts for the location where available). - astronomy: sunrise/sunset/moonrise/moonset/moon phase for `q` on `date` (required, YYYY-MM-DD). - search: resolve a fuzzy `q` into matching locations (name, region, country, lat/lon) — use this first if you only have an approximate place name and need to disambiguate. - history: past weather for `q` on `date` (required, YYYY-MM-DD, must be yesterday). This deployment enforces a free-tier data plan that only allows yesterday's date — any other date is rejected before a provider call is made. - marine: marine/sailing conditions for `q`. This deployment runs on a data plan limited to 1 day of data with no tide information. Results are for general informational purposes only — do not use them as the sole basis for decisions involving personal safety, aviation, marine navigation, or emergency planning.

输入参数q必填aqidatedaysaction必填alerts

market.crypto

Crypto market data (pay-per-call)

Crypto market-data lookups (CoinGecko-sourced pricing and market data), paid per call in USDC/USDm directly from the caller's own wallet via the x402 protocol — no Abstraxn account needed. Pick one `action`: - search ($0.001): fuzzy-search coins by name/symbol. Requires `q`. Call this first to resolve a coin id before using price_feed or historical_data, both of which need an id (e.g. "bitcoin"), not a ticker. - price_feed ($0.001): current price (and optionally 24h change / market cap) for one or more coins. Requires `ids` (comma-separated coin ids). Optional `currencies` (comma-separated fiat codes, default "usd"), `include_24h` (default true), `include_mcap` (default false). - market_data ($0.002): coins ranked by market cap (or another order) — use for "top N coins" / market overview questions. Optional `currency` (default "usd"), `category`, `order` (default "market_cap_desc"), `limit` (1-250, default 100), `page` (default 1). - historical_data ($0.003): historical price/market cap/volume series for one coin. Requires `id`. Optional `currency` (default "usd"), `days` (lookback window or "max", default 30), `interval` (e.g. "daily"). - trending ($0.001): currently trending coins by search interest. No extra parameters. - token_prices ($0.005): DEX-derived prices for up to 200 tokens in one call. Requires `tokens`, an array of `{chain, token_address}` objects. Prices above are indicative — the exact charge for a given call is always whatever the live payment challenge specifies for that request. The first call (no `paymentPayload`) returns `paymentRequired`; retry with the same arguments plus `paymentPayload` to complete payment and get the real result.

输入参数qididsdayspagelimitorderaction必填tokenscategorycurrencyinterval另有 4 个

web3.lookup

Wallet / token / ENS / tx-simulation lookups (pay-per-call)

Multi-chain wallet, token, ENS, and transaction-simulation lookups, paid per call in USDC/USDm directly from the caller's own wallet via the x402 protocol — no Abstraxn account needed. Pick one `action`: - wallet_balances ($0.005): token balances for a wallet across 20+ chains. Requires `chain` and `address`. - wallet_transactions ($0.005): transaction history with asset transfers for a wallet. Requires `address`. Optional `chain`, `limit`. - wallet_pnl ($0.01): realized and unrealized profit/loss per token for a wallet. Requires `chain` and `address`. - token_metadata ($0.002): name/symbol/decimals for a token contract. Requires `chain` and `address`. - ens_resolve ($0.001): resolve an ENS name to an Ethereum address. Requires `name`. - ens_reverse ($0.001): resolve an Ethereum address to its ENS name. Requires `address`. - tx_simulate ($0.01): simulate an EVM transaction before sending — gas estimate, execution trace, revert reason. Requires `network_id`, `from`, `to`. Optional `value`, `data`, `gas`. Prices above are indicative — the exact charge for a given call is always whatever the live payment challenge specifies for that request. The first call (no `paymentPayload`) returns `paymentRequired`; retry with the same arguments plus `paymentPayload` to complete payment and get the real result.

输入参数togasdatafromnamechainlimitvalueaction必填addressnetwork_idpaymentPayload

places.lookup

Places / solar / aerial-view lookups (pay-per-call)

Places, solar, and aerial-view lookups, paid per call directly from the caller's own wallet via the x402 protocol — no Abstraxn account needed. Pick one `action`: - text_search_full ($0.08): full-detail place text search. Requires `textQuery`. Optional `maxResultCount` (1-5, default 5), `excludeFields` (default ["photos"]), `pageToken`, `locationBias` ({circle:{center:{latitude,longitude},radius}}), `includedType`, `languageCode` (default "en"), `openNow`, `minRating` (0-5), `priceLevels`. - text_search_partial ($0.02): same as text_search_full but returns fewer fields per place — cheaper for quick lookups. Same parameters. - nearby_search_full ($0.08): full-detail search for places within a radius. Requires `locationRestriction` ({circle:{center:{latitude,longitude},radius (0-50000)}}) — do NOT send a bare top-level latitude/longitude/radius. Optional `includedTypes`/`excludedTypes` (max 50 each), `maxResultCount` (1-5, default 5), `excludeFields` (default ["photos"]), `languageCode` (default "en"), `rankPreference` (POPULARITY default, or DISTANCE). - nearby_search_partial ($0.02): same as nearby_search_full, fewer fields, cheaper. Same parameters. - place_details_full ($0.05): full details for one place. Requires `placeId` — the exact place id returned by an earlier text_search/nearby_search result; do not invent or guess it. Optional `excludeFields` (default ["photos"]), `languageCode` (default "en"). - place_details_partial ($0.02): same as place_details_full, fewer fields, cheaper. Same parameters. - solar_building_insights ($0.02): rooftop solar potential for one location. Requires `latitude` (-90..90) and `longitude` (-180..180). Optional `requiredQuality` (LOW/MEDIUM/HIGH, default HIGH). - solar_data_layers ($0.08): raw solar data layers for an area. Requires `latitude`, `longitude`. Optional `radiusMeters` (0.1-175, default 50), `view` (default "FULL_LAYERS"), `requiredQuality` (default HIGH), `pixelSizeMeters` (default 0.25, documented as one of 0.1/0.25

输入参数idcrophourviewlayermonthscaleaction必填formataddressopenNowplaceId另有 22 个

social.profile_lookup

Social / person profile lookup (pay-per-call)

Resolve person / social-profile identity for a batch of records, paid per call directly from the caller's own wallet via the x402 protocol — no Abstraxn account needed. Supports two modes per record: - Fuzzy match: supply `first_name` and/or `last_name` plus `emails` and/or `phones`. - Reverse lookup: supply only `emails` and/or `phones`, no name required. Every record needs a caller-chosen `record_id` (any string) to correlate it with its match in the response, plus at least one non-empty first_name/last_name, or at least one non-empty entry in emails, or at least one non-empty entry in phones — an empty array counts as not provided. Optional top-level `match_condition_fields` (e.g. `["linkedin_url"]`) restricts results to matches that include ALL of the named fields. The exact response shape (field names/nesting per match) is passed through unchanged from the upstream provider — read whatever comes back rather than assuming a fixed shape. Charges ~$0.02 per call — the exact charge for a given call is always whatever the live payment challenge specifies for that request. The first call (no `paymentPayload`) returns `paymentRequired`; retry with the same arguments plus `paymentPayload` to complete payment and get the real result.

输入参数records必填paymentPayloadmatch_condition_fields

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分