nearblocks-mcp
Provides read-only access to NEAR on-chain wallet data including account summary, transactions, activities, token transfers, and holdings via the NearBlocks API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nearblocks-mcpshow wallet activity summary for alice.near"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nearblocks-mcp
A small, remote MCP server that exposes read-only NEAR on-chain wallet data by
wrapping the public NearBlocks API. It speaks MCP over
Streamable HTTP, so it has a plain https://…/mcp URL — which is exactly what the
Agents Market connector model
("Private MCP servers") expects.
Why this exists: NEAR RPC (and RPC-based tools like
near-mcp) only expose an account's current state, never its transaction history — history lives in an indexer. NearBlocks is that indexer. This server makes it available to marketplace agents (e.g.wallet-activity-lookup) as a proper HTTPS connector, converting raw chain units to human values and stripping the bulky base64 token icons before anything reaches the model.
Tools
All tools take accountId (e.g. alice.near, a .tg name, or a 64-char implicit
address) and an optional network (mainnet default, or testnet). All are read-only.
Tool | What it returns |
| Current NEAR balance, staked amount, creation date/age, deletion status. |
| Paginated tx history (hash, ISO time, from/to, success, actions + NEAR deposits). |
| Balance-change feed: direction (in/out), counterparty, cause, time. |
| Fungible-token transfers: symbol, human amount, direction, counterparty, time. |
| Current holdings: FT balances + NFT contracts held now. |
| One-shot report — fetches state + a bounded window of txns/FT transfers/holdings and returns an aggregated, unit-converted summary (balance, in/out counts, NEAR value flow, top counterparties, top methods/contracts, token totals, holdings). |
Paginated tools accept perPage (1–50, default 25), cursor (from the previous
response), and order (desc/asc). near_wallet_activity_summary accepts txPages
(1–4, default 2). Figures in the summary cover the retrieved recent window, not the
account's lifetime — the response says so explicitly.
Related MCP server: MTRKR MCP Server
Run locally
Requires Node ≥ 20.
npm install
npm run build
cp .env.example .env # optionally set NEARBLOCKS_API_KEY; leave MCP_AUTH_TOKEN empty for local dev
npm start # POST http://localhost:8080/mcp · GET /healthEnvironment
Var | Required | Purpose |
| no (default 8080) | HTTP listen port (Railway/Fly inject this). |
| in production | Bearer token callers must send: |
| no | Raises NearBlocks rate limits. Works keyless at the free-tier limit. Server-side only. |
| no (default | Network used when a tool call omits |
Deploy
Any host that runs a container and gives you an HTTPS URL works (Railway, Fly, Render, …).
docker build -t nearblocks-mcp .
docker run -p 8080:8080 -e MCP_AUTH_TOKEN=$(openssl rand -hex 32) nearblocks-mcpSet MCP_AUTH_TOKEN (and optionally NEARBLOCKS_API_KEY) as service secrets. Your MCP
URL is https://<your-host>/mcp.
Wire it into the Agents Market
Deploy this server and copy its
https://<host>/mcpURL and theMCP_AUTH_TOKEN.On the platform, Building → Connectors → add a server:
url:
https://<host>/mcpauth:
static_token, header empty (⇒Authorization: Bearer), token = yourMCP_AUTH_TOKEN
In an agent's
agent.yaml, tick it underprivate_mcp_servers:private_mcp_servers: - name: nearblocks url: https://<host>/mcp auth: static_token description: NearBlocks MCP — read-only NEAR wallet state, history, transfers, holdings.
The wallet-activity-lookup agent is the intended first consumer: it can call
near_wallet_activity_summary in a single tool round instead of hitting the REST API by
hand.
MCP details
Transport: Streamable HTTP, stateless (a fresh server + transport per request — no session state to lose, ideal for a horizontally-scaled connector).
Endpoint:
POST /mcp.GET/DELETE /mcpreturn 405 (no server-initiated streams in stateless mode).GET /healthandGET /are unauthenticated.
License
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
Read-only MCP server: verify credentials and browse escrows on the Stellar testnet contract.
Free read-only crypto whale-tracking & market-data MCP tools across 14 chains. No auth.
MCP server for Fuse Network: balances, tokens, staking, DeFi data, swaps and on-chain transactions.
Related MCP Servers
- AlicenseAqualityDmaintenanceThe NEAR MCP Server enables AI agents to interact with the NEAR Protocol blockchain, providing smart contract interaction, transaction handling, and event listening with AI-driven processing.35 npm1ISC
- AlicenseAqualityDmaintenanceA read-only MCP server connecting AI agents to MTRKR wallet intelligence on MegaETH, enabling wallet portfolio, DeFi positions, security scanning, and transaction analytics.1410 npm4MIT
- AlicenseNot gradedqualityDmaintenanceRead-only MCP server for investigating Polymarket wallets, markets, and cross-wallet patterns using 21 tools backed by public APIs and an optional SQLite cache.MIT
- FlicenseBqualityDmaintenanceAn MCP server that enables Claude and other AI assistants to interact with NEAR Protocol wallets and blockchain data.13-