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 "Install 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.
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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pavliuko/nearblocks-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server