Near Liquid Staking
БесплатноНе проверенA Model Context Protocol (MCP) server for interacting with liquid staking protocols on NEAR blockchain. Supports Meta Pool (stNEAR) and Linear Protocol (LiNEAR)
Описание
A Model Context Protocol (MCP) server for interacting with liquid staking protocols on NEAR blockchain. Supports Meta Pool (stNEAR) and Linear Protocol (LiNEAR).
README
A Model Context Protocol (MCP) server for interacting with liquid staking protocols on NEAR blockchain. Supports Meta Pool (stNEAR) and Linear Protocol (LiNEAR).
Features
- stake_near - Stake NEAR tokens to receive liquid staking tokens (stNEAR or LiNEAR)
- unstake - Request unstaking of liquid tokens (starts the unbonding period)
- withdraw - Withdraw NEAR after the unstaking period completes
- get_staking_info - Query a user's staking position, balances, and pending withdrawals
- get_pool_stats - Get pool statistics including APY, TVL, exchange rate, and fees
- list_validators - List validators used by each staking pool
Supported Protocols
| Protocol | Contract | Token | Typical APY |
|---|---|---|---|
| Meta Pool | meta-pool.near |
stNEAR | ~9-10% |
| Linear | linear-protocol.near |
LiNEAR | ~10% |
Installation
npm install
npm run build
Usage
As MCP Server
Start the server:
npm start
# or
node dist/index.js
The server communicates over stdio using the MCP protocol.
MCP Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"near-liquid-staking": {
"command": "node",
"args": ["/path/to/mcp-near-liquid-staking/dist/index.js"]
}
}
}
Tools
stake_near
Stake NEAR tokens on Meta Pool or Linear.
{
"protocol": "meta-pool",
"amount": "100",
"accountId": "your-account.near"
}
Returns transaction data ready for signing. Estimated liquid tokens to receive are calculated based on current exchange rate.
unstake
Request unstaking. Initiates the unbonding period (~48 hours / 4 epochs).
{
"protocol": "linear",
"amount": "50",
"accountId": "your-account.near"
}
withdraw
Withdraw NEAR after the unstaking period completes.
{
"protocol": "meta-pool",
"accountId": "your-account.near"
}
get_staking_info
Get user's complete staking position.
{
"protocol": "meta-pool",
"accountId": "your-account.near"
}
Response includes:
stakedBalance- Total NEAR equivalent stakedliquidTokenBalance- stNEAR/LiNEAR balancependingWithdrawal- Amount in unbondingwithdrawableBalance- Ready to withdrawepochsUntilWithdrawable- Epochs remaining until withdrawal
get_pool_stats
Get pool statistics and current rates.
{
"protocol": "linear"
}
Response includes:
totalStaked- Total NEAR staked in poolexchangeRate- Current NEAR per liquid token rateapy- Annual percentage yieldtvlNear- Total value lockedfee- Protocol fee percentagevalidatorCount- Number of validators
list_validators
List validators used by the staking pool.
{
"protocol": "meta-pool"
}
Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Run tests
npm test
# Build
npm run build
Testing
npm test
Tests cover:
- Pool stats retrieval for both protocols
- Staking info queries
- Stake/unstake/withdraw transaction preparation
- Validator listing
- Edge cases (small/large amounts)
Architecture
src/
├── index.ts # MCP server entry point with tool handlers
└── near-client.ts # NEAR RPC client for staking operations
The server uses:
@modelcontextprotocol/sdk- MCP server implementationnear-api-js- NEAR blockchain interactionzod- Input validation
Notes
- Transaction Signing: This server prepares transaction data but does not sign transactions. The consuming application must handle wallet integration and signing.
- RPC Endpoints: Uses public NEAR RPC endpoints. For production, consider using a dedicated RPC provider.
- Exchange Rates: Liquid token amounts are calculated based on current exchange rates which may vary slightly at execution time.
License
MIT
Установка Near Liquid Staking
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/jim-agent/mcp-near-liquid-stakingFAQ
Near Liquid Staking MCP бесплатный?
Да, Near Liquid Staking MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Near Liquid Staking?
Нет, Near Liquid Staking работает без API-ключей и переменных окружения.
Near Liquid Staking — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить Near Liquid Staking в Claude Desktop, Claude Code или Cursor?
Открой Near Liquid Staking на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Notion
Read and write pages in your workspace
автор: NotionLinear
Issues, cycles, triage — from Claude
автор: LinearGoogle Drive
Search and read your Drive files
автор: Googlemindsdb/mindsdb
Connect and unify data across various platforms and databases with [MindsDB as a single MCP server](https://docs.mindsdb.com/mcp/overview).
автор: mindsdbCompare Near Liquid Staking with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории productivity
