Skip to main content
Glama
README.md
# NEAR Wallet MCP Server

An MCP (Model Context Protocol) server that enables Claude and other AI assistants to interact with NEAR Protocol wallets and blockchain data.

## Features

- **Account Operations**: Query balances, account info, access keys
- **Token Operations**: FT (NEP-141) balance and metadata queries
- **Staking**: Check staking pool positions and rewards
- **Contract Interaction**: Call view methods on any NEAR smart contract
- **Network Info**: Block data, validators, gas prices, protocol config
- **Transaction Tracking**: Look up transaction status and details
- **Explorer URLs**: Generate NearBlocks links for any entity

## Tools

| Tool | Description |
|------|-------------|
| `get_account_balance` | Get NEAR balance (available, staked, storage) |
| `get_account_info` | Detailed account info (code hash, storage) |
| `get_transaction_status` | Transaction details by hash |
| `get_access_keys` | List account access keys |
| `view_contract_method` | Call read-only contract methods |
| `get_block_info` | Block details (latest or by ID) |
| `get_validators` | Current validator set and stakes |
| `get_gas_price` | Current gas price |
| `get_protocol_config` | Protocol parameters |
| `get_ft_balance` | Fungible token balance |
| `get_ft_metadata` | Token metadata (name, symbol, decimals) |
| `get_staking_info` | Staking pool position |
| `near_explorer_url` | Generate NearBlocks URLs |

## Installation

```bash
npm install
npm run build
```

## Configuration

Set environment variables:

```bash
export NEAR_NETWORK=mainnet  # or testnet
export NEAR_NODE_URL=https://rpc.mainnet.near.org  # optional, auto-detected from network
```

## Usage with Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "near-wallet": {
      "command": "node",
      "args": ["/path/to/near-wallet-mcp/dist/index.js"],
      "env": {
        "NEAR_NETWORK": "mainnet"
      }
    }
  }
}
```

## Example Queries

Once configured, you can ask Claude:

- "What's the balance of alice.near?"
- "Show me the validators on NEAR mainnet"
- "Check the USDT balance of bob.near on usdt.tether-token.near"
- "What's the latest block on NEAR?"
- "Look up transaction 8xK2... from alice.near"

## License

MIT

TDQS

B3.4/5.0

Scored across 13 tools

Disambiguation4/5

Most tools target clearly distinct resources: account balance vs. FT balance vs. staking info, transaction status, access keys, contract view, block info, and validators. A few boundaries are slightly blurry, such as get_account_balance versus get_staking_info and get_account_info, since staked balance appears in multiple places.

Naming Consistency4/5

The set is mostly consistent snake_case with a get_verb_noun pattern across 11 of 13 tools. Minor deviations are view_contract_method and near_explorer_url, which use different verb/noun conventions but remain readable and purposeful.

Tool Count5/5

13 tools is well within the appropriate range and each tool appears to serve a distinct query need for NEAR account, token, staking, block, and network data. The server is not bloated, and no obvious redundant wrapper tools are present.

Completeness3/5

The read/query surface is broad, covering accounts, tokens, staking, blocks, validators, gas, protocol config, and explorer links. However, a wallet-oriented server lacks any write operations such as send/transfer, stake/unstake, access-key management, or transaction signing, which are notable gaps for a wallet domain.

Maintenance

ActivityInactive
ResponsivenessNo issues