Skip to main content
Glama

MCP Server: NEAR Liquid Staking

An MCP (Model Context Protocol) server that enables Claude to interact with NEAR liquid staking protocols - Meta Pool (stNEAR) and Linear Protocol (LiNEAR).

Features

  • Compare LST Providers - Side-by-side comparison of Meta Pool vs Linear Protocol

  • Balance Checking - Query stNEAR/LiNEAR balances for any account

  • Exchange Rates - Real-time LST to NEAR conversion rates

  • Staking Transactions - Generate transactions to stake NEAR for LSTs

  • Unstaking - Both instant and delayed unstaking options

  • DeFi Integration - Find yield opportunities for LSTs

  • APY Tracking - Estimated staking rewards

Related MCP server: MCP NEAR Wallet Server

Supported Protocols

Protocol

Token

Contract

Features

Meta Pool

stNEAR

meta-pool.near

Instant unstake, META governance, largest TVL

Linear

LiNEAR

linear-protocol.near

Auto-compounding, decentralized validators

Installation

npm install
npm run build

Usage with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "near-liquid-staking": {
      "command": "node",
      "args": ["/path/to/mcp-near-staking/dist/index.js"]
    }
  }
}

Available Tools

compare_lst_providers

Compare APY, rates, and features across liquid staking providers.

{ "network": "mainnet" }

get_lst_balance

Check LST token balances for an account.

{
  "account_id": "user.near",
  "protocol": "all",
  "network": "mainnet"
}

lst_to_near_rate

Get current exchange rates.

{
  "protocol": "all",
  "amount": "100",
  "network": "mainnet"
}

stake_for_lst

Generate a staking transaction.

{
  "protocol": "meta-pool",
  "amount": "10",
  "network": "mainnet"
}

unstake_lst

Generate an unstaking transaction.

{
  "protocol": "meta-pool",
  "amount": "10",
  "instant": false,
  "network": "mainnet"
}

lst_defi_options

Find DeFi opportunities for LST tokens.

{
  "lst_token": "stNEAR",
  "network": "mainnet"
}

get_staking_apy

Get estimated staking APY.

{
  "protocol": "all",
  "network": "mainnet"
}

Example Conversations

User: "Compare liquid staking options on NEAR" Claude: Uses compare_lst_providers to show Meta Pool vs Linear comparison

User: "How much is my stNEAR worth?"
Claude: Uses get_lst_balance and lst_to_near_rate to calculate value

User: "I want to stake 100 NEAR with Meta Pool" Claude: Uses stake_for_lst to generate transaction details

User: "What can I do with my LiNEAR tokens?" Claude: Uses lst_defi_options to suggest yield strategies

DeFi Integrations

The server knows about these protocols that accept LSTs:

  • Ref Finance - Swapping and LP farming

  • Burrow - Lending and borrowing

  • Pembrock Finance - Leveraged yield farming

Development

# Install dependencies
npm install

# Build
npm run build

# Run directly
npm start

# Development mode
npm run dev

License

MIT

Available Tools

7 tools
compare_lst_providersA

Compare NEAR liquid staking providers (Meta Pool, Linear) - shows APY, rates, features, and recommendations

ParametersJSON Schema
NameRequiredDescriptionDefault
networkNoNEAR network (default: mainnet)

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. It indicates a read-only comparison by saying 'shows APY, rates, features, and recommendations,' which implies no side effects. However, it does not describe how recommendations are determined, whether live data is fetched, or any limitations beyond the listed output.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that conveys the core purpose and expected outputs without excess words. Every component adds useful information, and there is no padding or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple, optional-parameter tool, the description is nearly complete: it identifies the providers, the output categories, and the recommendation aspect. The absence of an output schema is mitigated by listing what the tool shows, though details about return format or recommendation criteria are not provided.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with a single optional network parameter fully documented in the schema. The description adds no additional meaning about the network parameter or its default behavior, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Compare'), a clear resource ('NEAR liquid staking providers'), and names the providers (Meta Pool, Linear). It also lists what the tool shows: APY, rates, features, and recommendations. This clearly distinguishes it from the sibling tools like get_lst_balance or get_staking_apy.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for comparing providers, but it gives no explicit guidance on when to choose it over siblings such as get_staking_apy or lst_defi_options. There are no stated exclusions, prerequisites, or alternative routing, so an agent must infer the appropriate context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_lst_balanceA

Check liquid staking token balances (stNEAR, LiNEAR) for an account

ParametersJSON Schema
NameRequiredDescriptionDefault
networkNoNEAR network (default: mainnet)
protocolNoWhich protocol to check (default: all)
account_idYesNEAR account ID to check balances for

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of disclosure. 'Check' implies a read-only operation and the scope is clear, but the description does not disclose default behavior (e.g., network defaults to mainnet, protocol defaults to all) or what happens for invalid accounts. It is adequate but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence that states the action, resource, and scope with no filler. Every word contributes meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The definition is sufficient for a simple balance lookup, and parameters are fully schema-documented. However, with no output schema and no annotations, the description could usefully state what the response contains (e.g., balance values per token) and confirm default network/protocol behavior. These gaps keep it from being fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds value beyond the schema by mapping stNEAR and LiNEAR to the protocol enum values (meta-pool and linear), which helps an agent select the correct protocol without prior domain knowledge.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Check') and a clear resource ('liquid staking token balances ... for an account'), naming concrete tokens (stNEAR, LiNEAR). This clearly distinguishes it from sibling tools that handle rates, staking/unstaking, APY, and provider comparisons.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The intended use is implied: call this tool when you need an account's liquid staking token balances. However, it does not explicitly state when not to use it or mention alternatives, leaving the agent to infer routing from the tool name and sibling list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_staking_apyB

Get estimated APY/rewards rate for liquid staking protocols

ParametersJSON Schema
NameRequiredDescriptionDefault
networkNoNEAR network (default: mainnet)
protocolNoWhich protocol to check (default: all)

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The word 'estimated' discloses that the value is not guaranteed, and 'Get' implies a read-only operation. However, with no annotations, the description does not disclose data source, freshness, failure behavior, or output shape. This is acceptable for a simple read but not highly transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single tight sentence with no filler. The core action and subject are front-loaded, and every word contributes to meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only tool with two optional enum params, the description is nearly sufficient. However, it does not indicate what the return value looks like (e.g., a number, a map keyed by protocol), and it does not distinguish itself from the sibling comparison tool, leaving some context gaps given there is no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and both parameters have self-explanatory enums and defaults. The description adds no parameter-level meaning, so the baseline of 3 applies since the schema carries the full burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states a specific verb and object: getting an estimated APY/rewards rate for liquid staking protocols. It is clear about the resource, but it does not explicitly distinguish itself from the sibling compare_lst_providers, which could plausibly return similar APY data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given about when to use this tool versus compare_lst_providers, lst_defi_options, or other siblings. The description only implies the domain (liquid staking) but never states exclusions or conditions that would route an agent to an alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lst_defi_optionsA

Find DeFi opportunities for liquid staking tokens - where to use stNEAR/LiNEAR for additional yield

ParametersJSON Schema
NameRequiredDescriptionDefault
networkNoNEAR network (default: mainnet)
lst_tokenNoWhich LST token to find options for (default: all)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description must carry the behavioral disclosure burden. 'Find' implies a read-only lookup and 'where to use' describes the output nature, but it does not explicitly state that no transactions are executed or describe the result format. The absence of safety annotations makes this a modest gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence conveys action, resource, tokens, and purpose with no filler. Every phrase earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple lookup with two optional enums, the description explains the output ('where to use...') and the tool's purpose, while the schema covers the remaining parameter details. Without an output schema, a bit more detail on the returned structure could be added, but the current description is sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers both parameters with clear descriptions and enums, so the description need not repeat them; this maps to the baseline 3. The description adds no extra parameter meaning beyond naming the tokens that align with the lst_token enum.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Find') on a specific resource ('DeFi opportunities for liquid staking tokens') and names the exact tokens (stNEAR/LiNEAR) and goal (additional yield). This clearly distinguishes it from siblings like stake_for_lst, unstake_lst, and get_staking_apy.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context: use this when you want to identify where LSTs can be deployed for additional yield. It does not explicitly name alternative tools or exclusion conditions, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lst_to_near_rateA

Get current exchange rate between LST tokens and NEAR (how much NEAR your stNEAR/LiNEAR is worth)

ParametersJSON Schema
NameRequiredDescriptionDefault
amountNoAmount of LST to convert (in human-readable format, e.g., "100"). If not provided, shows rate for 1 token.
networkNoNEAR network (default: mainnet)
protocolNoWhich protocol to check (default: all)

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the behavioral disclosure burden. The verb 'Get' strongly implies a read-only operation, and the description clarifies the rate semantics and the optional amount behavior. However, it does not disclose data sources, freshness, failure modes, or any operational constraints, leaving some behavioral uncertainty for a tool with zero annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single focused sentence that front-loads the core action and result. The parenthetical clarification ('how much NEAR your stNEAR/LiNEAR is worth') earns its place by making the tool's value concrete. There is no redundant text, and it is highly scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple rate-query tool with three optional parameters and full schema coverage, the description is nearly complete. It explains the core return concept and the optional-amount behavior. The lack of an output schema and any mention of return format is a minor gap, but the tool's purpose is straightforward enough that an agent can invoke it confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3 even without additional parameter explanation in the description. The description adds minor value by naming stNEAR/LiNEAR as concrete LST examples, but the amount, network, and protocol semantics are already fully documented in the input schema. No parameter meaning is missing or obscured.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: 'Get current exchange rate between LST tokens and NEAR.' It also grounds the abstraction with concrete examples ('stNEAR/LiNEAR'), making it clear this is a rate-conversion tool rather than a balance, staking, or APY tool. This distinguishes it from the related sibling tools without requiring the agent to open any schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains what the tool does but provides no guidance on when to choose it over siblings such as compare_lst_providers or get_staking_apy. There is no mention of when this tool is appropriate versus when another tool would be better, and no exclusions or alternative routing. Usage must be inferred entirely from the tool name and the sibling list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stake_for_lstA

Generate a transaction to stake NEAR for liquid staking tokens (stNEAR or LiNEAR). Returns transaction details for signing.

ParametersJSON Schema
NameRequiredDescriptionDefault
amountYesAmount of NEAR to stake (in human-readable format, e.g., "10" for 10 NEAR)
networkNoNEAR network (default: mainnet)
protocolYesWhich liquid staking protocol to use

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of safety disclosure, and it does so by clarifying that the tool only 'generate[s] a transaction' and 'returns transaction details for signing' rather than broadcasting or executing the stake. This prevents the agent from assuming an on-chain side effect has occurred. It does not detail prerequisites or transaction format, but the core behavior is transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with no filler; the key action ('generate a transaction') is front-loaded and the signing-return behavior is stated immediately after. Every clause adds information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 3-parameter transaction generator, the description covers the essential workflow: build a stake transaction and return details for signing. There is no output schema, so the high-level return description is necessary and present; it could add an explicit statement about which protocol yields stNEAR vs LiNEAR, but the schema and token names make the tool usable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the schema already documents amount, network, and protocol. The description adds a useful hint that the staking tokens are stNEAR or LiNEAR, but it does not map those tokens to the protocol enum values or add further param-level meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: it 'generate[s] a transaction to stake NEAR for liquid staking tokens' and names the two token outputs (stNEAR or LiNEAR). This clearly separates it from sibling tools such as unstake_lst, get_lst_balance, and compare_lst_providers.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The intended use is explicitly stated: stake NEAR for stNEAR/LiNEAR via a chosen protocol. It gives no explicit when-not-to-use guidance or alternative routing (e.g., to unstake_lst for the reverse operation), so it stops short of a 5, but the context is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

unstake_lstA

Generate a transaction to unstake LST tokens back to NEAR. Supports delayed unstaking (better rate) or instant unstaking (with fee).

ParametersJSON Schema
NameRequiredDescriptionDefault
amountYesAmount of LST tokens to unstake (in human-readable format)
instantNoUse instant unstaking if available (may have fees). Default: false (delayed unstaking)
networkNoNEAR network (default: mainnet)
protocolYesWhich protocol to unstake from

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the behavioral burden. It does disclose that the tool generates a transaction and explains the delayed/instant rate-vs-fee tradeoff. However, it doesn't clarify whether the transaction is signed, submitted, or just constructed, nor does it mention auth requirements or fallback behavior if instant unstaking is unavailable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two tight sentences with no filler. The primary purpose is front-loaded, and the mode distinction is placed immediately after, giving an agent the essential decision-relevant information efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter transaction-generating tool with no output schema and no annotations, the description covers the core operation and the key mode decision. It does not specify the return value shape, whether the transaction is signed or submitted, or any prerequisites, so it is adequate but not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds meaningful parameter-level context for the `instant` flag by explicitly contrasting 'better rate' for delayed unstaking against 'with fee' for instant unstaking, which goes beyond the schema's generic 'may have fees' note.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('unstake') on a specific resource ('LST tokens back to NEAR') and clearly differentiates this from sibling tools like stake_for_lst and balance/rate queries. The purpose is unambiguous and actionable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly conveys when to use the tool: when a transaction to unstake LST back to NEAR is needed. It also gives a concrete choice between delayed and instant unstaking with tradeoffs. It doesn't explicitly name sibling alternatives or exclusion cases, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv1.0.0
    • First observedcompare_lst_providers
    • First observedget_lst_balance
    • First observedget_staking_apy
    • First observedlst_defi_options
    • First observedlst_to_near_rate
    • First observedstake_for_lst
    • First observedunstake_lst

TDQS

A3.9/5.0

Scored across 7 tools

Disambiguation4/5

Most tools are clearly distinct by action (stake, unstake, balance, rate, DeFi), but compare_lst_providers overlaps somewhat with get_staking_apy and lst_to_near_rate since it also surfaces APY and rates. Descriptions are clear enough that an agent can usually pick correctly.

Naming Consistency4/5

All names use lowercase snake_case and share the lst/staking vocabulary, with clear action verbs like get, stake, unstake. A few names (lst_to_near_rate, lst_defi_options) omit a leading verb, but the pattern is still predictable.

Tool Count5/5

Seven tools is well-scoped for a liquid staking server: discovery, balances, rates, staking, unstaking, and DeFi opportunities all have a dedicated tool. No tool feels redundant enough to remove.

Completeness5/5

The set covers the full user journey for NEAR liquid staking: choosing a provider, checking APY/rates, staking, monitoring balances, unstaking (delayed/instant), and exploring DeFi yield. There are no obvious dead ends or missing lifecycle steps.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers