@vitalpoint/mcp-near-staking
v1.0.0
Published
MCP server for NEAR staking operations
Maintainers
Readme
MCP NEAR Staking
An MCP server for NEAR blockchain staking operations. Manage your staked NEAR, browse validators, and track rewards.
Features
- list_validators - Browse validators with stake amounts, fees, and estimated APY
- check_stake - Check your staking status across validators
- stake - Stake NEAR with a validator pool
- unstake - Unstake NEAR (4 epoch ~52h withdrawal period)
- view_rewards - View accumulated staking rewards
Installation
npm install
npm run buildConfiguration
Environment variables:
# Network selection
export NEAR_NETWORK=mainnet # or testnet
# Optional: Custom RPC
export NEAR_RPC_URL=https://rpc.mainnet.near.org
# Required for stake/unstake operations - path to your key file
export NEAR_KEY_PATH=~/.near-credentials/mainnet/myaccount.near.jsonKey File Format
The key file should be JSON with this structure (standard NEAR credential format):
{
"account_id": "myaccount.near",
"public_key": "ed25519:...",
"private_key": "ed25519:..."
}Usage with Claude Desktop
Add to your Claude Desktop configuration:
{
"mcpServers": {
"near-staking": {
"command": "node",
"args": ["/path/to/mcp-near-staking/dist/index.js"],
"env": {
"NEAR_NETWORK": "mainnet",
"NEAR_KEY_PATH": "/path/to/your/key.json"
}
}
}
}Example Queries
Read-Only (no key required)
- "List the top 10 validators by stake"
- "Check my staking status for alice.near"
- "View rewards for bob.near from astro-stakers.poolv1.near"
Transactions (requires NEAR_KEY_PATH)
- "Stake 100 NEAR with aurora.pool.near for my account"
- "Unstake all from figment.poolv1.near"
Understanding Staking
How Rewards Work
NEAR staking rewards are auto-compounded. Your staked balance grows automatically as rewards are added. There's no separate "claim" action - rewards are continuously added to your stake.
Validator Selection
Consider these factors when choosing a validator:
- Fee: Lower fee = higher returns for you
- Uptime: Higher uptime = more consistent rewards
- Stake size: Very large pools may have slightly lower rewards due to seat allocation
- Reputation: Established validators with good track records
Withdrawal Period
Unstaking takes approximately 4 epochs (~52 hours) before funds become withdrawable. This is a network security feature.
License
MIT
