{
  "markdown": "# Abstraxn Public Web3 MCP Service\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Node](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](package.json)\n\nA free, public **[MCP](https://modelcontextprotocol.io) (Model Context Protocol) server** for\nWeb3 data. Point any MCP client — Claude Desktop, Cursor, your own agent — at it and it can read\nlive chain data (block height, gas, transaction status, ERC-20 info, spot prices), look up\nweather forecasts, build unsigned EVM/Solana transfer transactions, and, for a handful of\npay-per-call tools, look up market data, wallets/tokens/ENS, travel search, places/solar/aerial-view\ndata, and social-profile identity.\n\n**No API key, no account, no signup.** Free tools are open to anyone; paid tools are settled\ndirectly from the caller's own wallet via the [x402](https://www.x402.org) payment protocol —\nthis service never holds or signs funds on your behalf.\n\nBuilt on the official [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)\nand [NestJS](https://nestjs.com) 11.\n\n## Contents\n\n- [Quick start](#quick-start)\n- [Use it from Claude Desktop / Cursor](#use-it-from-claude-desktop--cursor)\n- [Available tools](#available-tools)\n- [Calling tools directly (curl)](#calling-tools-directly-curl)\n- [Configuration](#configuration)\n- [How it works](#how-it-works)\n- [Database](#database)\n- [Security](#security)\n- [Scripts](#scripts)\n- [Contributing](#contributing)\n\n---\n\n## Quick start\n\n```bash\ngit clone https://github.com/Abstraxn-Labs/abstraxn-agent-layer.git\ncd abstraxn-agent-layer\nnpm install\ncp .env.example .env\n# Edit .env: Postgres connection + UPSTREAM_RELAY_BASE_URL / ENRICHMENT_RELAY_BASE_URL\n# (each required for its own group of paid tools) + WEATHERAPI_KEY (required for weather.forecast)\nnpm run start:dev\n```\n\n- Health check: `GET http://localhost:3011/health`\n- MCP endpoint: `POST http://localhost:3011/mcp`\n- API docs (health only): `http://localhost:3011/api/docs`\n\nDatabase migrations run automatically on boot — no separate CLI step needed.\n\n## Use it from Claude Desktop / Cursor\n\nAdd this to your MCP client's config (e.g. `claude_desktop_config.json` or Cursor's `mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"abstraxn-public-web3\": {\n      \"url\": \"http://localhost:3011/mcp\"\n    }\n  }\n}\n```\n\nRestart the client and the tools below become available to it — no further setup.\n\n## Available tools\n\n| Tool | Paid? | What it does |\n|------|-------|--------------|\n| `network.blocknumber` | No | Current EVM block number or Solana slot. Query one chain or all at once. |\n| `network.transaction_status` | No | Look up a transaction/signature by hash on EVM or Solana. |\n| `network.gas_info` | No | Current gas price + EIP-1559 fee hints for an EVM chain. |\n| `network.token_info` | No | ERC-20 name / symbol / decimals / total supply. |\n| `network.token_price` | No | Spot price via CoinGecko (defaults to ETH/USD). |\n| `network.prepare_transfer` | No | Build an unsigned native/ERC-20/SPL transfer transaction from an explicit `from`/`to`/`amount`. Never signs or broadcasts. |\n| `weather.forecast` | No | Current conditions, forecast, astronomy, location search, historical, and marine weather lookups, 6 actions. |\n| `market.crypto` | Yes | Crypto market-data lookups (CoinGecko-sourced), 6 actions. |\n| `web3.lookup` | Yes | Multi-chain wallet / token / ENS / tx-simulation lookups, 7 actions. |\n| `travel.search` | Yes | Flight and hotel search, 2 actions. |\n| `places.lookup` | Yes | Place / solar / aerial-view lookups, 11 actions. |\n| `social.profile_lookup` | Yes | Person / social-profile identity resolution for a batch of records. |\n\nTools are namespaced by area (`network.*`, `market.*`, `web3.*`, `travel.*`, `places.*`,\n`social.*`) so an MCP client can browse them as a tree rather than a flat list.\n\n**How paid tools work:** call one with no payment, and you get back a `paymentRequired` challenge\n(not an error). Your wallet client signs it and retries the same call with `paymentPayload` set —\nyour wallet pays directly; this service only relays the request.\n\n## Calling tools directly (curl)\n\nMost people will use an MCP client (above), but the endpoint is plain JSON-RPC over HTTP if you\nwant to script against it directly:\n\n```bash\nBASE=http://localhost:3011\nACCEPT='Accept: application/json, text/event-stream'   # required by the MCP spec\n\n# 1. Initialize a session\ncurl -s -X POST \"$BASE/mcp\" -H 'Content-Type: application/json' -H \"$ACCEPT\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"my-client\",\"version\":\"1.0\"}}}'\n\n# 2. List available tools\ncurl -s -X POST \"$BASE/mcp\" -H 'Content-Type: application/json' -H \"$ACCEPT\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/list\"}'\n\n# 3. Call a tool\ncurl -s -X POST \"$BASE/mcp\" -H 'Content-Type: application/json' -H \"$ACCEPT\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":3,\"method\":\"tools/call\",\"params\":{\"name\":\"network.token_price\",\"arguments\":{\"symbol\":\"bitcoin\"}}}'\n```\n\n`GET /mcp` returns `405` by design — every call is stateless, so there's no session to resume.\n\n## Configuration\n\nCopy [`.env.example`](.env.example) to `.env`. Everything has a safe default except the one\nmarked **required**:\n\n| Variable | Required | Description |\n|----------|----------|--------------|\n| `PORT` | No | HTTP port (default `3011`) |\n| `POSTGRES_HOST` / `PORT` / `USER` / `PASSWORD` / `DB` | No | Postgres connection, used only for abuse tracking |\n| `PUBLIC_MCP_RATE_LIMIT_PER_MIN` / `_WINDOW_MS` | No | Global per-IP rate limit (default 30/min) |\n| `CHAIN_RPC_*` | No | Per-chain EVM RPC overrides — public defaults are used if unset (see `src/mcp/utils/chain-registry.util.ts`) |\n| `SOLANA_RPC_URL` / `SOLANA_DEVNET_RPC_URL` | No | Solana cluster RPC overrides |\n| `WEATHERAPI_KEY` | **Yes** | Free 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. |\n| `WEATHERAPI_BASE_URL` | **Yes** | Upstream 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). |\n| `UPSTREAM_RELAY_BASE_URL` | **Yes** | Base 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 |\n| `ENRICHMENT_RELAY_BASE_URL` | **Yes** | Base URL for the upstream relay behind `places.lookup` / `social.profile_lookup` — a separate upstream from `UPSTREAM_RELAY_BASE_URL`, no default is committed |\n\n## How it works\n\n```\nMCP client (Claude Desktop, Cursor, your agent)\n    → POST /mcp  (this service, stateless — a fresh McpServer per request)\n    → free tools: direct chain RPC / CoinGecko calls\n    → paid tools: relayed upstream, settled by the caller's wallet via x402\n```\n\nThis is a single, standalone deployable — it doesn't share a workspace or database with any\nother Abstraxn service. That's deliberate: several MCP registries expect a public MCP server to\nlive in its own repo with one route and one fixed tool set, reviewable end to end.\n\n**Stack:** Node.js 20+ · NestJS 11 · [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)\n`^1.30.0` (official SDK) · PostgreSQL + TypeORM · [`@x402/core`](https://www.x402.org) ·\n`viem` (EVM) + raw JSON-RPC (Solana reads) · `@solana/web3.js` + `@solana/spl-token` (Solana\ntransfer building) · `@skalenetwork/bite` (SKALE privacy-encrypted transfers) · `helmet`,\n`@nestjs/throttler`\n\n## Database\n\nPostgres is used for abuse tracking only — no tenant, policy, or config tables exist:\n\n| Table | Purpose |\n|-------|---------|\n| `observed_ips` | One row per caller IP, with a running call count and last-seen time. |\n| `observed_wallets` | One row per wallet address seen paying via x402. |\n| `public_mcp_transactions` | Append-only history of completed paid calls. |\n\nIf Postgres is unreachable, a call still succeeds — tracking writes are best-effort and never\nblock or fail a real MCP request.\n\n## Security\n\nSince anyone can call this service with no key, a few invariants matter:\n\n- **No SSRF surface:** every outbound URL (chain RPC, upstream relay, CoinGecko) comes from\n  server-side config — no tool accepts a caller-supplied URL.\n- **Rate limiting is global and IP-keyed** — the only lever available with no accounts. If you\n  deploy behind a reverse proxy, set `app.set('trust proxy', ...)` in `main.ts`, or the limiter\n  ends up rate-limiting the proxy instead of real callers.\n- **No secrets beyond the DB password and `WEATHERAPI_KEY`**, both env-only and never logged —\n  `weather.forecast` builds its provider request URL with the key as a query param, but every\n  log line only ever carries the action name and error message, never the URL itself.\n- **CORS is wildcard** by design — nothing tenant-specific ever crosses an origin here.\n\nFound a security issue? See [CONTRIBUTING.md](CONTRIBUTING.md#reporting-bugs--security-issues)\nbefore opening a public issue.\n\n## Scripts\n\n| Script | Description |\n|--------|-------------|\n| `npm run start:dev` | Run in watch mode |\n| `npm run build` | Compile to `dist/` |\n| `npm run start:prod` | Run the compiled build (`dist/main`) |\n| `npm run lint` | ESLint |\n| `npm test` | Jest — unit, SDK-level integration, and HTTP smoke tests |\n\n## Contributing\n\nIssues and PRs are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) for how to add a new tool\nand the project's definition of done.\n\n**License:** [MIT](LICENSE)\n",
  "bytes": 9740,
  "sha": "0aef2285e0a6ea6563543b65c3ada9ed5545255b75a768f2fb0b140e27dcd3df",
  "repo_slug": "abstraxn-labs/abstraxn-agent-layer",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_sandeep_antier_abstraxn_5491f03c/readme"
}