Skip to main content
Glama

MetaVault MCP

Multi-protocol yield intelligence for AI agents — covering Spectra Finance, Pendle, and Morpho via the Model Context Protocol.

55 tools · 3 protocols · 10+ chains · read-only · open emergence architecture · calibration intelligence · on-chain Curve quoting · Pendle logit AMM modeling · ERC-4626 health checks · yield curve term structure · historical eth_getLogs · full Pendle protocol parity (15 tools) · cross-protocol position map · cross-protocol Spectra↔Pendle comparison · veSPECTRA + vePENDLE governance · Pendle historical time-series · Morpho supply-side visibility with supplier cascade modeling · Morpho user positions & historical rates · Merkl campaign APR + expiry integration · entry path awareness · prescriptive observation boundaries · curator risk monitoring · withdrawal stress testing · rollover planning · multi-vault portfolio aggregation · pool expiry monitoring · zero web3 library dependencies

What This Does

Any AI agent (Claude, GPT, open-source) that supports MCP can query Spectra, Pendle, and Morpho in a unified interface to:

  • Discover the best fixed-rate yield opportunities across 10 chains simultaneously

  • Analyze specific PT/YT positions with full data (APY, TVL, liquidity, prices)

  • Calculate leveraged looping strategies (Spectra PT + Morpho collateral) with auto-detected borrow rates

  • Compare fixed vs. variable yields to make informed decisions

  • Track wallet portfolios across all Spectra positions (PT, YT, LP) with Merkl reward integration for complete PnL

  • Surface external Merkl campaign APR alongside pool and market data for both Spectra and Pendle

  • Monitor pool trading volume, individual transaction activity, and cross-pool address scanning

  • Quote PT trades with on-chain Curve get_dy() for exact output, falling back to math estimates

  • Simulate portfolio state after a hypothetical trade (BEFORE / TRADE / AFTER with deltas)

  • Scan all chains for capital-aware opportunities with price impact, effective APY, and Morpho looping analysis

  • Detect YT arbitrage opportunities where IBT APR diverges from YT implied rate

  • Compute real veSPECTRA boost multipliers per-pool using live on-chain data from Base, and vePENDLE voting power from Ethereum mainnet (with sPENDLE transition awareness)

  • Map your full cross-protocol position in one call — Spectra + Pendle + Morpho + governance (veSPECTRA + vePENDLE), with contradiction detection (unused boost, lending vs fixed rate spreads, concentration, looper detection, expiring positions across protocols)

  • Assess entry path complexity — automatically flags exotic underlyings, sw-wrapper hops, and mainnet gas friction so agents know the real cost of reaching advertised yields

  • Discover live MetaVaults across all chains — curator info, TVL, APY, positions, epoch history

  • Model MetaVault "double loop" strategies for curators — vault compounding + Morpho leverage with curator economics, auto-populated from live API data or manual parameters

  • Monitor MetaVault operational health — curator dashboard with vault allocation per position, depositor flows, fee revenue, bridge activity, and actionable alerts

  • Query Morpho lending markets for PT collateral opportunities, identify who supplies the lending liquidity, and discover vault allocations across markets

  • Query protocol stats, tokenomics, and governance data

  • Compare Spectra vs Pendle yield opportunities side-by-side with maturity-aware matching on overlapping chains

  • Scan both Spectra and Pendle for the best curator opportunities with capital-aware sizing and cross-protocol match tagging

  • Browse Pendle markets across all Pendle-supported chains (including Pendle-only chains like Mantle, Berachain, HyperEVM, Corn)

  • Analyze Pendle markets in full depth — market details, portfolio tracking, trade quoting, trade simulation, looping strategies, YT arbitrage, expiry monitoring, yield curves, capacity analysis, and protocol-wide stats (full parity with Spectra tools)

  • Assess pool depth with multi-size capacity curves — quote PT trades at geometric capital tiers ($1K→$1M) to find the sweet spot and exhaustion point on both Spectra and Pendle

  • Verify IBT health before deploying — on-chain ERC-4626 conversion rate, APR sustainability (organic vs incentive), pool balance, protocol recognition, liquidity

  • Visualize yield curves (term structure) for any underlying across all chains — all maturities sorted chronologically with curve shape analysis

  • Recover historical on-chain pool activity via eth_getLogs when API data has aged out — with dynamic RPC URL support for any chain

  • Monitor curator Morpho position health — liquidation distance, borrow rate drift, health factors across all chains

  • Stress-test MetaVault withdrawal scenarios — liquidity waterfall analysis (idle → maturing → LP removal → PT sale) with market stress simulation

  • Plan position rollovers for expiring MetaVault positions — cross-protocol candidate ranking with entry impact, yield gap, and overlap windows

  • Aggregate multi-vault curator portfolios — total AUM, blended APY, fee revenue projection, concentration analysis by underlying/chain

  • Monitor pool expiry across all chains with readiness assessment — successor pool detection, gauge status from governance API, and operator checklist (deploy pool / submit gauge / ready for migration)

  • Learn protocol mechanics on-demand via mv_get_protocol_context (PT/YT identity, Router batching, deposit paths, glossary, fees & costs, workflow routing, externalPositions registry)

  • Surface protocol YT fees (Spectra 3%, Pendle 5%) and Merkl campaign eligibility (POOL vs HOLD) directly in tool output so agents apply them without external lookups

The agent doesn't need to understand PT/YT mechanics -- it just calls spectra_scan_opportunities or pendle_scan_opportunities with its capital size and gets ranked, actionable data. For cross-protocol comparison, mv_scan_curator_opportunities ranks both protocols together. If it needs to understand why something works that way, it calls mv_get_protocol_context.

Related MCP server: NEXUS

Open Emergence Architecture

The server is designed so that AI agents can discover novel strategies without being taught specific strategies. Instead of hard-coding strategy identification logic, the system teaches protocol mechanics at three layers — and lets the agent compose building blocks into its own analysis.

The Three Layers

Layer 1: Protocol Context (mv_get_protocol_context tool + resources)
  → Teaches the "physics" of the protocol: PT/YT identity, Router batching, minting
  → Available as a callable tool (on-demand) and as MCP resources
  → Static knowledge — what CAN happen, not what IS happening

Layer 2: Tool Descriptions (every tool's description string)
  → Teaches domain-specific mechanics relevant to that tool's data
  → Cross-reference nudges: "use spectra_get_portfolio to check actual holdings"
  → Uses "could be" language, not "is" — preserves ambiguity where it exists
  → Calls out hidden mechanics that could mislead (e.g., AMM_ADD_LIQUIDITY can mint YT)

Layer 3: Structured Output Hints (computed at runtime in tool output)
  → Position Shape analysis in portfolio: balance ratios (e.g., "YT/PT 4:1")
  → Portfolio Signals: concentration, maturity alerts, strategy shape across positions
  → Volume Signals: volume/liquidity ratio, buy/sell skew, trend detection
  → Morpho Market Hints: capacity warnings, utilization alerts, spread analysis, reward incentives
  → Morpho Supply-Side Analysis: supplier identification (vault/EOA/looper), concentration metrics,
    supply gap warnings — surfaces where lending liquidity comes from and whether it's sufficient
  → Competing Interpretation Branches (A/B/C) in activity analysis per-address:
    multiple explanations for the same observable pattern, presented with equal weight.
    The agent must bring external evidence to collapse branches — the tension IS the info.
  → Statistical confidence boundaries: small-N cycle repetitions (≤5) flagged as
    insufficient for extrapolation, preventing false pattern-matching
  → Flow Accounting with competing hypotheses: YT-only, PT-only, fully exited positions
    each get multiple explanations that predict different future behavior
  → Address isolation mode: cycle detection, flow accounting, contract/EOA detection,
    pool impact warnings, gas estimates, pool context
  → Capital-aware warnings: short maturity, low liquidity, negative effective APY
  → Yield Dimensions in scan output: fixed, variable, LP, looping side-by-side
  → Strategy Tension: competing PT looping vs YT accumulation on same pool
  → On-chain quote source indicators: "(on-chain Curve get_dy)" vs "(estimated)"
  → Yield composition: IBT APR breakdown (organic base vs external incentives) in scans and quotes
  → Incentive sustainability: flags when >50% of IBT APR or LP APY comes from incentives,
    shows "organic only" APY so agents can assess yield durability without incentive assumptions
  → Pool reserves: IBT/PT amounts with ratio for AMM imbalance analysis
  → Merkl campaign APR: external incentive programs (e.g., KAT rewards) shown per-pool/market
    with double-counting avoidance (skips campaigns whose reward tokens are already displayed)
  → Merkl campaign eligibility: action type (POOL/HOLD) always shown, with explicit
    "[LP only — not for YT/PT holders]" flag on POOL campaigns to prevent misattribution
  → Protocol YT fees: Spectra 3% and Pendle 5% shown in every pool/market detail output
    so agents apply them to yield calculations without needing external lookups
  → Points multipliers: external programs (Drops, InfiniFi, Firelight) with amounts
  → "Could be" / "at current rates" language: preserves ambiguity in ranked output
  → Makes key signals SALIENT without prescribing interpretation

Layer 4: Observation Coverage (quantifies blind spots in tool output)
  → Value coverage: what % of an address's position is explained by observable activity.
    Low coverage means most behavior is invisible (direct mints, transfers, cross-chain).
  → Temporal coverage: active days vs dark periods with no observable events.
    Longest gap duration surfaced so the agent can reason about invisible activity.
  → Data source coverage: which of 5 available sources were consulted vs not.
    Explicitly lists what is invisible to the current analysis.
  → Activity diversity: single-type activity flagged as highest-ambiguity pattern.
  → Boundary marker: "Position sizing should assume this analysis is incomplete,
    not comprehensive." — a structural admission of domain-of-validity limits.
  → Coverage metrics bound ALL interpretations above them. High-confidence strategy
    assessment + low observation coverage = false confidence. The coverage section
    forces the agent to size its conviction to what it actually observed.

Design Principles

  • Teach mechanics, not conclusions. The server explains that AMM_ADD_LIQUIDITY could be a mint+LP batch operation — it doesn't conclude "this user is accumulating YT."

  • Present competing interpretations, not single narratives. Activity analysis outputs multiple interpretation branches (A/B/C) that predict different future behavior. The agent must bring external evidence to collapse them. This friction surface prevents premature pattern-matching — the most common failure mode in wallet strategy analysis.

  • Flag statistical insufficiency. Small repetition counts (≤5 cycle detections) are explicitly flagged as insufficient for extrapolation. The agent cannot treat N=3 as a confirmed pattern.

  • Every tool cross-references at least one other tool. This creates analytical workflows without dictating them. The agent learns to check spectra_get_portfolio after seeing activity patterns, not because it was told to.

  • Hidden mechanics are called out where they can mislead. The Spectra Router batches multiple operations atomically. A SELL_PT event might actually be YT acquisition via flash-mint. Tool descriptions teach this so agents don't draw wrong conclusions from pool data alone.

  • Full addresses in output, never truncated. When addresses appear in activity data, they're shown in full so the agent can pass them directly to spectra_get_portfolio without needing a block explorer.

  • Discovery tools warn about capital-awareness gaps. spectra_get_best_fixed_yields explicitly says "this ranks by raw APY — use spectra_scan_opportunities for capital-aware sizing."

  • Quantify blind spots, not just interpretations. Tools now output observation coverage metrics: what percentage of behavior is visible, what data sources were consulted vs available, and how long dark periods lasted. These are not interpretations — they're structural measurements of the analysis's own incompleteness. An agent that sees 35% value coverage should size its confidence accordingly, regardless of how coherent the best-fitting interpretation looks.

Why This Matters

A cold-start agent with zero prior knowledge of the protocols can:

  1. Call mv_scan_curator_opportunities — see cross-protocol (Spectra + Pendle) yield rankings with capital-aware metrics

  2. Call spectra_get_pool_activity — see trading patterns with ⚠ hints about ambiguous events

  3. Call spectra_get_portfolio and pendle_get_portfolio on flagged addresses — see Position Shape across both protocols

  4. Read the cross-reference nudges — compose its own analytical workflow spanning all three protocols

  5. Identify novel strategies the server was never explicitly programmed to detect

This was validated: a subagent spawned with zero priming correctly identified a mint-and-sell-PT loop strategy (YT accumulation via PT discount) in 3 tool calls, using only the mechanics taught in descriptions and the structured hints in output.

The competing-branch design was motivated by a real failure: an agent analyzing a multi-chain wallet collapsed all activity into "YT accumulator" despite different pools showing different patterns (spread capture, market making, LP cycling). The single-narrative failure mode — where the agent picks one interpretation and defends it — is the most dangerous because it looks like good analysis from inside.

The observation coverage layer addresses a deeper problem: even perfect interpretation of observed data is misleading when the data covers a minority of behavior. Competing branches solve the narrative problem (which story fits?). Coverage metrics solve the exposure problem (how much of the picture am I seeing?). An agent that picks the best interpretation branch but ignores 65% invisible activity is sizing conviction to coherence, not evidence.

Tools

Tool

Description

spectra_get_best_fixed_yields

Scan ALL chains for top fixed-rate opportunities. The main discovery tool. Supports compact mode.

spectra_list_pools

List all active pools on a specific chain, sorted by APY/TVL/maturity. Surfaces pool reserves, IBT APR composition, maturityValue, multipliers, and tags. Supports compact mode and include_expired flag.

spectra_get_pt_details

Deep dive on a specific Principal Token -- full data including maturityValue, multipliers (points programs), tags, pool reserves, IBT APR composition, and baseIbt for wrapper tokens.

spectra_compare_yield

Fixed (PT) vs. variable (IBT) yield comparison with spread mechanics and entry cost analysis.

spectra_get_looping_strategy

Calculate leveraged yield via PT + Morpho looping with effective liquidation margins, borrow rate sensitivity (+1/2/3%), break-even period, and failure scenario modeling. Auto-fetches live Morpho rates when a matching market exists.

morpho_list_markets

Find Morpho lending markets that accept Spectra PTs as collateral. Filter by chain or symbol. Shows reward incentives, vault supplier count per market. Cross-references Spectra PT addresses.

morpho_get_rate

Get live borrow rate, state, and supply-side context for a specific Morpho market. Includes PT spread analysis, top supplier identification, and vault allocation details (% of AUM, cap utilization).

morpho_get_market_suppliers

Supply-side analysis for a Morpho market: top suppliers ranked by size, vault vs EOA/looper identification, concentration analysis, supply gap warnings. Reveals where lending liquidity comes from.

morpho_list_vaults

List Morpho vaults on a chain with enriched allocations: Spectra PT tagging, live borrow rates and utilization per allocation, cap utilization percentages. Parallel-fetches market rates and PT addresses for zero-latency enrichment.

morpho_get_positions

Query a user's Morpho positions across markets and vaults on a chain (or all Morpho chains). Shows collateral, borrows, supply with USD values, vault deposits, health factors, looper detection, and position signals.

morpho_get_history

Historical rates and growth for a specific Morpho market. Shows borrow/supply APY, utilization, and TVL trends with min/avg/max/current stats. Includes rate stability signals, spike detection, and supply/demand squeeze alerts.

spectra_get_protocol_stats

SPECTRA tokenomics, emissions schedule, fee distribution, governance info.

spectra_list_chains

List available networks (10 chains).

spectra_get_portfolio

Wallet positions across PT, YT, and LP with USD values, claimable yield, and Merkl rewards (SPECTRA gauge emissions + incentive programs). Rewards matched to specific pools via reason key parsing.

spectra_get_pool_volume

Historical buy/sell trading volume for a specific pool. Accepts PT address or pool address.

spectra_get_pool_activity

Recent individual transactions (buys, sells, liquidity events) with filtering. Address isolation mode presents competing interpretation branches (A/B/C), statistical confidence boundaries on cycles, flow accounting with competing hypotheses, contract/EOA detection, gas estimates. Accepts PT or pool address.

spectra_get_address_activity

Cross-pool address scanner — finds all pools an address has interacted with on a chain (or all chains) in one call. Includes expired/matured pools via portfolio lookup. Per-pool breakdown + cross-pool aggregates.

spectra_quote_trade

PT trade quoting with on-chain Curve get_dy() for exact output (falls back to math estimate). Shows price impact, slippage, minOut, pool reserves with ratio, and IBT APR composition.

spectra_simulate_trade

Preview portfolio BEFORE/AFTER a hypothetical PT trade with deltas, warnings, and on-chain quoting.

spectra_scan_opportunities

Capital-aware opportunity scanner: price impact at your size, effective APY, Morpho looping, pool capacity, IBT APR composition, and points multipliers. Supports compact mode.

spectra_scan_yt_arbitrage

YT rate vs IBT rate arbitrage scanner -- finds pools where YT is mispriced relative to underlying yield. Includes IBT APR composition for spread sustainability analysis. Supports compact mode.

spectra_get_ve_info

Live veSPECTRA data from Base chain (total supply via on-chain read) + boost calculator with per-pool multipliers.

spectra_list_metavaults

List live MetaVaults across all chains (or a specific chain). Returns curator info, TVL, live APY, share price, active positions, and epoch history.

spectra_model_metavault

MetaVault "double loop" strategy modeler for curators. Live mode (chain + metavault_address) auto-fetches APY from API; manual mode accepts base_apy directly. Models curator economics (fee revenue, TVL creation, effective ROI).

spectra_get_curator_dashboard

Operational dashboard for MetaVault curators. Vault health, position status with vault allocation (when available) vs pool TVL, depositor flows, fee revenue estimates, bridge activity, and actionable alerts. Explicitly disambiguates vault allocation from pool-level TVL to prevent misinterpretation.

pendle_list_markets

List active Pendle markets on a given chain or all Pendle chains. Supports Pendle-only chains (Mantle, Berachain, HyperEVM, Corn). Supports compact mode.

pendle_get_market_details

Deep dive on a single Pendle market — implied APY, LP APY breakdown (swap fees + PENDLE incentives + boost), underlying variable APY, pool reserves, fee rate, Merkl campaigns.

pendle_get_best_fixed_yields

Scan all Pendle chains for top fixed-rate opportunities. Ranked by implied APY with TVL/liquidity filters. The Pendle equivalent of spectra_get_best_fixed_yields.

pendle_get_portfolio

Wallet positions across all Pendle chains — PT, YT, LP balances with USD values and implied APY per position.

pendle_scan_opportunities

Capital-aware Pendle opportunity scanner — price impact at your size using logit AMM model, effective APY, Morpho looping for Pendle PTs, Merkl campaigns. Supports compact mode.

pendle_get_market_capacity

Multi-size capacity curve for a Pendle market — quotes at geometric capital tiers using logit AMM model to find sweet spot and exhaustion point.

pendle_get_yield_curve

Term structure for a given underlying across Pendle chains. All maturities sorted chronologically with curve shape analysis (normal/inverted/flat), steepest segment, cross-chain pairs.

pendle_list_expiring_markets

Scan Pendle chains for markets approaching maturity. Groups by urgency (CRITICAL ≤7d, WARNING ≤14d, ALERT ≤threshold).

pendle_scan_yt_arbitrage

YT mispricing scanner — compares underlying variable APY vs implied rate. Pendle YT trades directly on AMM (simpler execution than Spectra's Router flash-mint/redeem).

pendle_get_protocol_stats

Protocol-wide aggregate stats — total TVL, market count, volume, avg APY across all Pendle chains with per-chain breakdown and Spectra overlap indicator.

pendle_get_looping_strategy

Leveraged PT + Morpho looping calculator for Pendle PTs — borrow rate sensitivity, break-even analysis, 30-day historical risk assessment with P(underwater) probability. Auto-detects Morpho markets.

pendle_quote_trade

PT trade quote using Pendle logit AMM model — expected output, price impact, effective APY after entry cost, min output with slippage tolerance.

pendle_simulate_trade

Portfolio impact simulation for Pendle PT trades — before/after position values, blended APY change, concentration analysis.

mv_compare_yield

Side-by-side Pendle vs Spectra yield comparison on overlapping chains (mainnet, base, arbitrum, optimism, sonic, bsc). Maturity-aware matching with configurable tolerance (exact ≤7d, close ≤30d, loose ≤90d).

mv_scan_curator_opportunities

Cross-protocol (Spectra + Pendle) capital-aware scanner for MetaVault curators. Price impact at your size, effective APY, Morpho looping (Spectra + Pendle), cross-protocol match tagging. Supports compact mode.

spectra_get_onchain_activity

Historical on-chain activity via eth_getLogs — recovers data when the API has aged out transactions. Supports dynamic rpc_url parameter for any chain, token_decimals for correct formatting (USDC=6, WBTC=8). Decodes Curve pool events (swaps, LP adds/removes) via pool_address AND Spectra PT vault events (Mint, Redeem, YieldClaimed) via pt_address. Both can be provided simultaneously for merged results.

spectra_get_pool_capacity

Multi-size capacity curve — quotes PT trades at geometric capital tiers to show price impact and effective APY degradation. Identifies sweet spot and exhaustion point. On-chain Curve quotes.

mv_check_ibt_health

Multi-signal IBT health assessment — on-chain ERC-4626 conversion rate, APR composition (organic vs incentive), pool balance ratio, protocol recognition, liquidity level. Returns HEALTHY/CAUTION/WARNING verdict.

spectra_get_yield_curve

Term structure for a given underlying across all chains. All maturities sorted chronologically with implied APY, TVL, liquidity. Curve shape analysis (normal/inverted/flat), steepest segment, cross-chain pairs.

morpho_monitor_risk

Liquidation risk monitor for curator Morpho positions — health factor, liquidation price, distance-to-liquidation, borrow rate drift, alert levels (ok/watch/warning/critical).

spectra_stress_test_vault

Withdrawal stress test for MetaVaults — liquidity waterfall (idle → maturing → LP removal → PT sale), cost to remaining depositors, maximum safe redemption size. Market stress mode (2x impact).

mv_plan_rollover

Position rollover planner for expiring MetaVault positions — scans Spectra + Pendle for replacement candidates, computes entry impact, yield gap, overlap windows, and net effective APY.

mv_get_curator_portfolio

Multi-vault portfolio aggregation — total AUM, blended APY, fee revenue projection, concentration by underlying/chain, cross-vault action items. Discovery mode (by curator address) or explicit mode.

mv_get_calibration

Calibration oracle — what does "normal" look like? Computes statistical baselines (percentiles, anomaly thresholds) from historical data for any Morpho market, Pendle market, or Spectra pool. Includes peer comparison and assertion-ready threshold language. The bridge between perception (monitoring) and specification (security assertions).

mv_get_position_map

Cross-protocol position map — sees the WHOLE wallet across Spectra + Pendle + Morpho + governance (veSPECTRA + vePENDLE) in one parallel call. Contradiction detection: unused governance boost, lending when fixed rates are higher, concentration risk, looper detection, expiring positions across protocols. Honest failure reporting (INCOMPLETE shown before numbers, not after). The first tool that sees the user, not just the protocol.

spectra_get_gauge_votes

Full veSPECTRA governance dashboard — gauge vote distribution, voting APRs, bribe incentives, SPECTRA emissions per pool. Shows where veSPECTRA holders direct votes, what rewards they earn, emission concentration, and bribe efficiency ($ per vote).

pendle_get_market_history

Historical time-series for any Pendle market — implied APY, TVL, volume, PT/YT prices over 7d/30d/90d/1y periods. First tool that answers "what happened over time?" for trend analysis, yield stability assessment, and anomaly detection.

spectra_list_expiring_pools

Scan all chains for pools approaching maturity (default 21-day threshold). Groups by urgency (CRITICAL ≤7d, WARNING ≤14d, ALERT ≤21d). Cross-references each expiring pool's IBT against all active pools for successor detection. Fetches gauge status from governance API. Per-pool readiness assessment (OK/CAUTION/WARNING). Operator checklist: deploy successor pool, submit gauge proposal, ready for migration.

mv_get_protocol_context

Returns protocol mechanics reference across 12 topics: pt_yt_mechanics, router_batching, position_analysis, looping, networks, deposit_path, glossary, fees_and_costs, pendle_morpho, workflow_routing, protocol_pulse (live TVL/emissions/expiring pools), and external_protocols (registry of non-Spectra protocols a MetaVault can hold via externalPositions — settlement windows, observation boundaries, mitigations per entry). Fees topic covers Spectra 3% / Pendle 5% YT fees, reward basis (held vs notional), Merkl campaign types, and external points program discovery.

Supported Chains

Spectra: Ethereum (mainnet), Base, Arbitrum, Optimism, Avalanche, Katana, Sonic, Flare, BSC, Monad, Hemi, HyperEVM, SEI

Pendle: Ethereum, Optimism, BSC, Sonic, Base, Arbitrum, Mantle, Berachain, HyperEVM, Corn

Morpho PT markets: Ethereum, Base, Arbitrum, Katana

Chain list maintenance (manual)

All three lists are hardcoded in src/config.ts and must be updated by hand when a protocol deploys on a new chain:

  • Spectra — edit SUPPORTED_CHAINS_INTERNAL (+ CHAIN_RPC_URLS, CHAIN_RPC_FALLBACKS, CHAIN_BLOCK_TIMES, CHAIN_GAS_ESTIMATES per-chain tables). Every Spectra-native tool (metavault list, pool list, expiring pools, protocol pulse, curator dashboard, etc.) reads from this list — so one edit propagates everywhere.

  • Pendle — edit PENDLE_CHAIN_IDS + PENDLE_CHAIN_NAMES. Source of truth: GET https://api-v2.pendle.finance/core/v1/chains.

  • Morpho — edit MORPHO_CHAIN_IDS. Source of truth: Morpho GraphQL morphoBlue queries per chain.

There is no automated canary. The CONFIG_VERIFIED_DATES map in config.ts emits a stderr warning at startup when a list is >120 days old, but that's a calendar alarm, not a "new chain appeared" alarm. Practical cadence: check monthly, or when a protocol team announces a new deployment.

Known drift to eventually reconcile: the comment in MORPHO_CHAIN_IDS mentions Morpho markets on hyperliquid(999) — which is the same chain as our newly-added hyperevm. If Morpho ships PT markets on HyperEVM and we want them scanned, add hyperevm: 999 to the Morpho map.

veSPECTRA Boost

The server reads live veSPECTRA total supply directly from the Base chain via raw eth_call (no ethers/viem dependency) and computes per-pool boost multipliers using the real Spectra formula:

B = min(2.5, 1.5 * (v/V) * (D/d) + 1)

v = your veSPECTRA balance
V = total veSPECTRA supply (read live from Base)
D = pool TVL
d = your deposit size

Full 2.5x boost when your share of total veSPECTRA >= your share of pool TVL.

Tools that accept ve_spectra_balance (spectra_scan_opportunities, spectra_scan_yt_arbitrage, spectra_compare_yield, spectra_get_ve_info) compute per-pool boost automatically. The veSPECTRA contract is an NFT-based voting escrow (veNFT) at 0x6a89228055c7c28430692e342f149f37462b478b on Base, sourced from spectra-core.

MetaVault Discovery & Strategy Modeling

MetaVaults are ERC-7540 curated vaults that automate LP rollover and compound YT yield back into LP positions. Two tools work together:

spectra_list_metavaults — Discovery tool. Fetches live MetaVault data from the API (/v1/{network}/metavaults), scanning a single chain or all chains in parallel. Returns curator info, TVL, live APY, share price, active positions with PT/pool details, and epoch rate history.

spectra_model_metavault — Strategy modeler with two modes:

  • Live mode: Provide chain + metavault_address to auto-fetch the vault's live APY as base_apy. All other parameters (borrow rate, LTV, curator fee) can still be overridden.

  • Manual mode: Provide base_apy directly for hypothetical or pre-launch modeling.

The "double loop" economics:

Layer 1 (inside vault):  Deposit → PT/LP allocation → YT yield → more LP (compounding)
Layer 2 (on top):        MV shares → Morpho collateral → borrow → deposit back (leverage)

The key insight: YT compounding raises the vault's base APY, and leverage multiplies that higher base. This creates a "double-loop premium" over raw PT looping that scales with leverage.

Curator economics are built in — the tool models fee revenue on external deposits, additional TVL created by looping, and effective ROI on the curator's own capital.

Setup

npm install -g metavault-mcp

Or run directly without installing:

npx metavault-mcp

Install from source

git clone https://github.com/Finanzgoblin/metavault-mcp.git
cd metavault-mcp
npm install
npm run build

Connect to Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "metavault-mcp": {
      "command": "npx",
      "args": ["metavault-mcp"]
    }
  }
}

Restart Claude Desktop. You'll see all 55 tools (Spectra, Pendle, Morpho, cross-protocol) available.

Connect to Claude Code

claude mcp add metavault-mcp -- npx metavault-mcp

Deep Analysis Prompts

The more context you give upfront, the deeper the agent can go. Each input unlocks a different tool chain:

Input

What it unlocks

Capital size ($200K)

Price impact at your size, pool capacity limits, effective APY

Wallet address (0x...)

Portfolio simulation, existing position context, Merkl rewards

veSPECTRA balance

Real per-pool boost (not min/max range)

Asset preference

Filtered yield curve, targeted scans

Strategy type

LP vs PT vs looping vs MetaVault — determines which tools get chained

Maturity window

Term structure analysis, rollover timing

The ideal prompt combines all of these. Here are examples that trigger 8-10 tool chains:

  • Yield hunter: "I have $50K USDC and 10,000 veSPECTRA. Find me the best risk-adjusted fixed yield for 60-180 days. Check IBT health, quote my exact entry, and show who else is in the pool."

  • Curator: "I'm building a USDC MetaVault on Base with $500K own capital, expecting $2M external. Model the double-loop economics and compare Spectra vs Pendle LP allocation."

  • Investigator: "Wallet 0xABC... is active on Spectra mainnet. Show me everything — portfolio, activity across all pools, sequence analysis, and what strategy they're running."

  • Term structure: "Show me the ETH yield curve across all chains. Where are the term premium anomalies? Quote pool capacity at $200K for the top 3 mispricings."

The cross-referencing between tools is where the real depth happens — no single tool tells the full story. The agent calls mv_get_protocol_context(topic="workflow_routing") to learn these compositions at runtime.

Example Queries

Once connected, you can ask Claude things like:

  • "What's the best fixed yield on USDC right now?"

  • "Show me all Spectra pools on Base with >$50k TVL"

  • "Calculate a 3x looping strategy for PT-USDC on Base using Morpho"

  • "Is the fixed rate on stETH better than the variable rate?"

  • "What Morpho markets accept Spectra PTs as collateral?"

  • "What's the borrow rate on that Morpho PT-USDC market?"

  • "What are the current SPECTRA emissions and lock rate?"

  • "Show me the portfolio for 0xABC...DEF across all chains — include any unclaimed Merkl rewards"

  • "What's the recent trading activity on this pool?"

  • "Scan all pools on mainnet for activity from address 0xABC...DEF"

  • "Check if address 0xABC...DEF is a contract or EOA and show their trading patterns"

  • "Quote buying 10,000 USDC worth of PT on this pool"

  • "What would my portfolio look like if I bought 50k of this PT?"

  • "I have $100K to deploy -- scan all chains for the best risk-adjusted yield"

  • "Scan for USDC opportunities sized for $500K with max 2% entry impact"

  • "Find YT arbitrage opportunities where the market is mispricing yield"

  • "I have 100K veSPECTRA -- what boost do I get on this pool with a $10K deposit?"

  • "Show veSPECTRA total supply and how much I need for max boost"

  • "What MetaVaults are live right now? Show me all of them across all chains"

  • "Show me the MetaVaults on Base -- what are the APYs and who are the curators?"

  • "Model a strategy for this MetaVault on Base" (auto-fetches live APY)

  • "Model a MetaVault with 12% base APY and 3% YT compounding, 10% curator fee -- what does looping look like?"

  • "Compare MetaVault looping vs raw PT looping at 12% base APY"

  • "I'm curating a vault with $100K own capital and $1M external deposits -- what's my effective ROI?"

  • "Compare Spectra vs Pendle yields on Base -- which protocol offers better rates for USDC?"

  • "I'm curating a MetaVault with $500K -- scan both Spectra and Pendle for the best opportunities"

  • "Show me all active Pendle markets on Arbitrum sorted by TVL"

  • "How much capital can I put into this pool before the price impact kills my yield?"

  • "Is the IBT behind this PT healthy? Check the conversion rate and APR composition"

  • "Show me the USDC yield curve -- what rates are available at each maturity?"

  • "Compare the 30-day vs 90-day vs 180-day rates for ETH across all chains"

  • "This address traded on Katana weeks ago but spectra_get_pool_activity shows nothing -- pull on-chain logs for the last 7 days"

  • "Fetch historical activity for this pool using my RPC URL: https://rpc.katana.network"

  • "Monitor my Morpho positions for liquidation risk -- show me the distance to liquidation for each"

  • "Stress test my MetaVault on Base -- what happens if 30% of depositors redeem in one epoch?"

  • "I have a position expiring in 14 days on my MetaVault -- plan the rollover and show me the best candidates"

  • "Aggregate my curator portfolio across all chains -- show me total AUM, blended APY, and concentration"

Architecture

Agent (Claude/GPT/etc)
  | MCP Protocol (stdio)
MetaVault MCP (this)
  | HTTP (15s timeout, 1 retry on 5xx/network errors)
  |
  +-- api.spectra.finance/v1/{chain}/pools
  +-- api.spectra.finance/v1/{chain}/pt/{address}
  +-- api.spectra.finance/v1/{chain}/portfolio/{wallet}
  +-- api.spectra.finance/v1/{chain}/pools/{pool}/volume
  +-- api.spectra.finance/v1/{chain}/pools/{pool}/activity
  +-- api.spectra.finance/v1/{chain}/metavaults
  +-- app.spectra.finance/api/v1/spectra/*
  +-- api.merkl.xyz/v3/userRewards (unclaimed Merkl rewards per wallet)
  +-- api.merkl.xyz/v4/opportunities (Merkl campaign APR per chain)
  +-- api.morpho.org/graphql (PT collateral markets, borrow rates)
  +-- api-v2.pendle.finance/core/* (Pendle market data for cross-protocol comparison)
  +-- mainnet.base.org (veSPECTRA on-chain reads via raw eth_call)
  +-- Chain RPCs: eth_call for Curve get_dy() quotes, eth_getCode for contract detection
  |   (mainnet, base, arbitrum, optimism, avalanche, sonic, bsc, flare)
  +-- Chain RPCs: eth_getLogs for historical pool activity (any chain via dynamic rpc_url)

Modular TypeScript server. Read-only — queries Spectra's existing API, Morpho's GraphQL API, chain RPCs for on-chain Curve get_dy() quotes and contract detection, and Base RPC for veSPECTRA data. No wallet, no transactions, no keys, no web3 libraries needed.

src/
  index.ts          Entry point, tool registration, Layer 1 resources (spectra-overview,
                      curator-strategy-guide), main(), graceful shutdown
  config.ts         Constants, chain config, Zod schemas, protocol parameters, veSPECTRA constants,
                      block time constants per chain, RPC URL resolution (hardcoded + dynamic override)
  types.ts          TypeScript interfaces (SpectraPt, MorphoMarket, ScanOpportunity, MerklTokenReward, MerklChainRewards, MerklCampaign, etc.)
  api.ts            Fetch helpers with retry, GraphQL sanitization, Morpho batch lookup,
                      veSPECTRA RPC with Promise-based dedup cache, 30s TTL pool data cache,
                      Curve get_dy() on-chain quoting, ERC-4626 convertToAssets() health check,
                      eth_getCode contract detection,
                      MetaVault multi-chain scanning, API response validation at system boundary,
                      chunked eth_getLogs with retry for historical event log fetching,
                      Merkl reward fetching and parsing (pool address extraction from reason keys,
                      BigInt wei→human conversion, matched/unmatched reward categorization),
                      Merkl v4 campaign APR fetching (60s TTL cache, inflight dedup, address-based lookup)
  primitives.ts     Format primitives (formatUsd, formatPct, formatDate, daysToMaturity,
                      estimatePriceImpact, chainIdToName) — HOME. Re-exported from formatters.ts
                      for backward compat with 42 consumer files.
  protocols/        externalPositions registry (plugin-style extension for Spectra's whitelisted
                      ERC-4626 modules). types.ts (SourcedValue/InterpretedValue/ProtocolMeta + zod),
                      metadata.ts (avant + pendle + _unknown), cost-models.ts (zero, lp_exit_samechain,
                      lp_exit_crosschain_cctp, liquidation), engine.ts (renderExternalPosition,
                      classifyForStress, generateActionItems, DriftCollector), registry.ts (getMeta +
                      freshness warnings), index.ts (barrel). Spec: docs/protocols-metadata-spec.md.
  formatters.ts     Formatting, BigInt LLTV parsing, closed-form leverage math,
                      price impact, fractional-day maturity, boost computation,
                      slim envelope helpers, token amount formatting (BigInt → human-readable),
                      cross-protocol maturity matching (normalizeUnderlyingSymbol, matchByAssetAndMaturity),
                      Layer 3 output hints (Position Shape, LP APY breakdown,
                      volume signals, Morpho market hints, portfolio signals,
                      competing interpretation branches, statistical confidence boundaries,
                      flow accounting with competing hypotheses),
                      Layer 4 observation coverage (value coverage, temporal gaps,
                      data source coverage, activity diversity, boundary markers),
                      Merkl reward display (per-position matched rewards, unmatched/exited rewards),
                      Merkl campaign APR display (formatMerklCampaignLines with double-counting avoidance)
  tools/            Layer 2: each tool description teaches domain-specific mechanics
    context.ts      mv_get_protocol_context (Layer 1 protocol mechanics, deposit paths, glossary, callable on-demand)
    pt.ts           spectra_get_pt_details, spectra_list_pools, spectra_get_best_fixed_yields, spectra_compare_yield
    looping.ts      spectra_get_looping_strategy
    portfolio.ts    spectra_get_portfolio (balance ratio strategy signals, portfolio-level hints, cross-ref nudges,
                      Merkl rewards integration — parallel fetch, per-position matching, unmatched rewards)
    pool.ts         spectra_get_pool_volume (with volume/liquidity hints), spectra_get_pool_activity (PT address resolution, Router batching,
                      address isolation w/ cycle detection, flow accounting, contract detection,
                      gas estimates, pool impact warnings, observation coverage metrics),
                      spectra_get_address_activity (cross-pool scanner with coverage boundary markers)
    morpho.ts       morpho_list_markets (with capacity/utilization hints), morpho_get_rate (with PT spread analysis)
    protocol.ts     spectra_get_protocol_stats, spectra_list_chains
    quote.ts        spectra_quote_trade (on-chain Curve get_dy() with math fallback)
    simulate.ts     spectra_simulate_trade (also uses on-chain quoting)
    strategy.ts     spectra_scan_opportunities (capital-aware, batch Morpho, negative-APY filtering, strategy tension)
    yt_arb.ts       spectra_scan_yt_arbitrage (YT execution mechanics, flash-mint/flash-redeem)
    ve.ts           spectra_get_ve_info
    metavault.ts    spectra_list_metavaults, spectra_model_metavault (live API + computational modeling),
                      spectra_get_curator_dashboard (vault allocation disambiguation, cross-chain position awareness)
    pendle.ts       pendle_list_markets, mv_compare_yield (maturity-aware cross-protocol yield comparison)
    curator_scan.ts mv_scan_curator_opportunities (cross-protocol capital-aware scanner for MetaVault curators)
    onchain.ts      spectra_get_onchain_activity (historical eth_getLogs, Curve pool + PT vault event decoding, dynamic RPC)
    capacity.ts     spectra_get_pool_capacity (multi-size quote ladder, sweet spot / exhaustion detection)
    ibt_health.ts   mv_check_ibt_health (ERC-4626 conversion rate, APR composition, pool balance, verdict)
    yield_curve.ts  spectra_get_yield_curve (term structure for a given underlying across all chains)
    risk_monitor.ts morpho_monitor_risk (liquidation distance, health factor, borrow rate drift, alert levels)
    stress_test.ts  spectra_stress_test_vault (withdrawal liquidity waterfall, market stress simulation)
    rollover.ts     mv_plan_rollover (expiring position rollover planner with cross-protocol candidates)
    curator_portfolio.ts mv_get_curator_portfolio (multi-vault aggregation, AUM, blended APY, concentration)
    expiry_monitor.ts spectra_list_expiring_pools (pool maturity monitoring, urgency grouping, successor cross-reference, gauge status, readiness assessment)
    gauge_votes.ts  spectra_get_gauge_votes (veSPECTRA governance: vote distribution, voting APRs, bribes, emissions)
    pendle_history.ts pendle_get_market_history (historical APY, TVL, volume, PT/YT prices time-series)
    position_map.ts mv_get_position_map (cross-protocol wallet view: Spectra + Pendle + Morpho + governance, contradiction detection)
test.cjs              Integration test suite (405 tests, McpTestClient over stdio)
test-agent.cjs        Agent reasoning test suite (82 assertions, McpTestClient over stdio)
AGENT-TESTS.md        38-question subjective test suite with grading rubrics (incl. open emergence, coverage, newcomer comprehension tiers)
EMERGENCE-AUDIT.md    Open Emergence audit — competing branches, observation coverage, anomaly detection gaps
CODE-REVIEW.md        Full codebase review (bugs, security, code quality, test coverage)
SECURITY-REVIEW.md    Security-focused review (SSRF, GraphQL injection, dependency vulnerabilities)
docs/
  recursive-meta-process.md    Open Emergence metaframework specification
  dissolution-conditions.md    Dissolution conditions for every structural decision
  architecture-review-agentic-accessibility.md    Agentic accessibility review with feature proposals

Each tool file exports a register(server) function. To add a new tool: create src/tools/newtool.ts, export register(), import and call it in index.ts.

All address parameters are validated (0x + 40 hex chars). All API calls have a 15-second timeout with automatic retry on transient failures (5xx, ETIMEDOUT, ENETUNREACH, ENOTFOUND). Cross-chain scans use Promise.allSettled so one chain failing doesn't block results from others. GraphQL inputs are sanitized to prevent injection. All error returns use MCP's isError: true flag for proper error signaling to agents.

Type Safety

  • API return types: fetchSpectra() and fetchMorpho() return Promise<unknown> (not Promise<any>), forcing explicit type assertions at every call site

  • Nullish coalescing: All decimal/balance fallbacks use ?? (not ||) to correctly handle 0-decimal tokens

  • Morpho state fields: Typed as number | null to match actual API behavior — prevents silent NaN propagation

  • JSON parsing: Body read as text first, then JSON.parse() — avoids stream double-consumption that masked error diagnostics

  • BigInt precision: veSPECTRA total supply parsed with 10n ** BigInt(18) to avoid float intermediate overflow. Trade quoting uses amountToBigInt() (string arithmetic) to avoid precision loss when amount * 10^decimals exceeds MAX_SAFE_INTEGER

  • Input validation: Zod schemas enforce .min() / .max() bounds on all numeric inputs to prevent invalid GraphQL queries

Technical Details

Precision & Correctness

  • Morpho LLTV: Parsed with BigInt arithmetic to avoid floating-point precision loss on 18-decimal raw values (e.g., 860000000000000000 → 0.86 exactly)

  • Leverage math: Closed-form geometric series (1 - ltv^(n+1)) / (1 - ltv) replaces iterative loop accumulation — numerically exact and O(1)

  • YT arbitrage: Uses fractional days-to-maturity for implied rate calculation, avoiding off-by-one annualization errors near expiry

  • Price impact: Zero-liquidity pools return 100% impact (not 0%), preventing false positives in opportunity scanners. Impact clamped to 99% max to prevent negative output in trade quotes

  • Negative-APY filtering: Opportunities where entry cost exceeds yield are filtered out before ranking, not sorted to the bottom

Resilience

  • Retry logic: Covers ECONNRESET, ETIMEDOUT, ENETUNREACH, ENOTFOUND, EPIPE, EHOSTUNREACH, EAI_AGAIN, and UND_ERR_SOCKET errors

  • Pool data cache: 30-second TTL per-chain with inflight request deduplication — repeated scans within 30s serve cached data

  • API validation: validatePtEntries() filters malformed API responses at system boundary (validates address, maturity, name fields)

  • veSPECTRA cache: Promise-based deduplication prevents duplicate RPC calls when multiple tools run concurrently (5-minute TTL)

  • Morpho batch limit: first parameter capped at min(addresses * 3, 500) to avoid GraphQL response limits

  • On-chain quoting: Curve get_dy() via raw eth_call on 8 chains with automatic fallback to math estimate on RPC failure

  • IBT health checks: ERC-4626 convertToAssets() via raw eth_call — graceful degradation when RPC unavailable (other health checks still run)

  • Historical event logs: Chunked eth_getLogs (2000 blocks/chunk) with per-chunk retry — failed chunks are skipped so partial results are still returned. Dynamic rpc_url parameter enables any chain without hardcoded RPCs

  • Contract detection cache: Permanent Map cache for eth_getCode results (contract code doesn't change)

  • Merkl rewards: Best-effort parallel fetch from Merkl API — failure does not block portfolio display. Pool address matching via regex extraction from reason keys. BigInt parseWei() conversion for safe 18-decimal arithmetic

  • Merkl campaigns: Best-effort v4 campaign APR fetch per chain (60s TTL cache with inflight dedup). Failure returns empty map — tool output is unchanged. Double-counting avoidance skips campaigns whose reward tokens are already displayed via native API data

  • MCP error signaling: All error catch blocks return isError: true so agents can distinguish errors from empty results

  • PT address resolution: Pool tools (spectra_get_pool_volume, spectra_get_pool_activity) accept either pool address or PT address and resolve automatically

  • Error logging: Catch blocks in Morpho lookups log to stderr instead of silently swallowing failures

  • Graceful shutdown: server.close() called before process.exit() on SIGTERM/SIGINT

Testing

From a source checkout:

# Full integration suite (405 tests, requires network)
npm test

# Schema/registration only (98 tests, no network)
npm run test:offline

# Unit tests (242 tests, no network)
npm run test:unit

# Agent reasoning tests (82 assertions, requires network)
npm run test:agent

Unit Tests (api.test.ts, formatters.test.ts, config.test.ts)

242 tests covering pure-function logic: GraphQL sanitization, Morpho field constants, Merkl reward parsing (pool address extraction from reason keys, wei-to-human conversion, matched/unmatched categorization), Merkl reward formatting, balance formatting, cross-protocol maturity matching (normalizeUnderlyingSymbol, matchByAssetAndMaturity), Pendle logit AMM price impact model (estimatePendlePriceImpact), Pendle date/maturity helpers (pendleDaysToMaturity), Pendle market formatters (compact + summary), and configuration validation. No network required.

Integration Tests (test.cjs)

405 tests covering tool registration, schema validation, API responses, on-chain Curve get_dy() quoting, cross-pool address scanning, address isolation mode, cross-protocol curator scanning, and malformed-address negative tests. Dynamically discovers pool and PT addresses from the live API, so tests won't go stale when pools mature.

Agent Reasoning Tests (test-agent.cjs)

82 assertions across multi-tool workflow tests that verify the "reasoning surface" — can an agent using these tools detect anomalies, cross-reference data, and avoid protocol-mechanic traps? Tests include:

  • Protocol context completeness — all topics present, Router batching ambiguities explained, cross-reference guidance included

  • Anomaly detection — raw APY vs capital-aware rankings produce different results (intentional divergence)

  • Cross-tool data consistency — APYs match between spectra_list_pools → spectra_get_pt_details → spectra_compare_yield

  • Router mechanics — mint-and-sell loop detection via pool activity → portfolio cross-reference

  • Router limitation — API resolves Router txns that eth_getLogs address filtering misses

  • MetaVault data integrity — curator info, TVL, APY, vault flows, expired position flagging

  • Expired pool discovery — spectra_list_pools returns only active pools; MetaVaults surface expired positions

  • veSPECTRA boost math — max boost (1M veSPECTRA + $1K) vs min boost (100 veSPECTRA + $1M)

  • Morpho looping fallback — graceful handling when no Morpho market exists for a PT

  • Morpho market classification — Spectra vs Pendle/Other labels, unsupported chain handling

  • MetaVault scan inclusion — include_metavaults flag correctly shows/hides MetaVault section

  • Pendle comparison — head-to-head matched pairs with delta, Pendle-only markets, aggregates

  • Surfaced API fields — maturityValue, multipliers (points programs), tags, pool reserves with ratio, IBT APR composition, baseIbt for wrapper tokens

  • Merkl rewards in portfolio — SPECTRA gauge emissions appear in portfolio output, graceful handling for empty wallets

Subjective Test Suite (AGENT-TESTS.md)

38 copy-pasteable questions across 11 tiers (basic tool usage → open emergence → newcomer comprehension) with grading rubrics for evaluating LLM agent quality when using the MCP tools. Tier 8 tests "open emergence" — the ability to hold competing interpretations without collapsing to a single narrative. Tier 11 tests newcomer comprehension — can the agent explain deposit paths, recognize conservative impact estimates, and route to the right scanner? These are designed to be run by spawning subagents and scoring responses manually or with LLM-as-judge.

API Reference

This server wraps these endpoints:

Endpoint

Used By

GET /v1/{chain}/pools

spectra_list_pools, spectra_get_best_fixed_yields, spectra_scan_opportunities, spectra_scan_yt_arbitrage, spectra_get_yield_curve (30s TTL cache)

GET /v1/{chain}/pt/{address}

spectra_get_pt_details, spectra_compare_yield, spectra_get_looping_strategy, spectra_quote_trade, spectra_simulate_trade, spectra_get_pool_capacity, mv_check_ibt_health, spectra_get_pool_volume/spectra_get_pool_activity (PT→pool resolution)

GET /v1/{chain}/portfolio/{wallet}

spectra_get_portfolio, spectra_simulate_trade, spectra_get_address_activity (expired pool discovery)

GET /v1/{chain}/pools/{pool}/volume

spectra_get_pool_volume

GET /v1/{chain}/pools/{pool}/activity

spectra_get_pool_activity, spectra_get_address_activity (active + expired pools)

GET /v1/{chain}/metavaults

spectra_list_metavaults, spectra_model_metavault (live mode)

GET api.merkl.xyz/v3/userRewards?user={address}&chainId={chainId}

spectra_get_portfolio (Merkl reward fetching — SPECTRA gauge emissions + incentive programs)

GET api.merkl.xyz/v4/opportunities?chainId={chainId}

spectra_list_pools, spectra_get_pt_details, spectra_compare_yield, pendle_list_markets, mv_compare_yield, spectra_scan_opportunities, mv_scan_curator_opportunities, spectra_scan_yt_arbitrage (Merkl campaign APR — 60s TTL cache)

GET api.spectra.finance/v1/governance/voting-incentives

spectra_list_expiring_pools (gauge status — pool address presence = gauge exists)

GET app.spectra.finance/api/v1/spectra/circulating-supply

spectra_get_protocol_stats

GET app.spectra.finance/api/v1/spectra/total-supply

spectra_get_protocol_stats

POST api.morpho.org/graphql

morpho_list_markets, morpho_get_rate, spectra_get_looping_strategy (auto-detect), spectra_scan_opportunities (batch)

POST mainnet.base.org (eth_call)

spectra_get_ve_info, spectra_scan_opportunities, spectra_scan_yt_arbitrage, spectra_compare_yield (veSPECTRA total supply)

POST {chain RPC} (eth_call: get_dy)

spectra_quote_trade, spectra_simulate_trade, spectra_get_pool_capacity (Curve StableSwap-NG on-chain quotes)

POST {chain RPC} (eth_call: convertToAssets)

mv_check_ibt_health (ERC-4626 IBT conversion rate health check)

POST {chain RPC} (eth_call: eth_getCode)

spectra_get_pool_activity (contract vs EOA detection in address mode)

POST {chain RPC} (eth_getLogs)

spectra_get_onchain_activity (historical Curve pool events + Spectra PT vault events — supports dynamic rpc_url override)

GET api-v2.pendle.finance/core/v2/{chainId}/markets/active

pendle_list_markets (Pendle market discovery)

GET api-v2.pendle.finance/core/v2/{chainId}/markets/active

mv_compare_yield (maturity-aware cross-protocol comparison)

GET api-v2.pendle.finance/core/v2/{chainId}/markets/active

mv_scan_curator_opportunities (cross-protocol capital-aware scanning — Spectra + Pendle)

Note: {chain} uses the slug mainnet for Ethereum (the alias ethereum is accepted by the server and mapped automatically).

Pendle Protocol Integration

13 Pendle tools provide full feature parity with the Spectra toolset, plus 2 cross-protocol tools for unified analysis:

Pendle-Native Tools (13)

Category

Pendle Tool

Spectra Equivalent

Discovery

pendle_list_markets

spectra_list_pools

Discovery

pendle_get_best_fixed_yields

spectra_get_best_fixed_yields

Analysis

pendle_get_market_details

spectra_get_pt_details

Analysis

pendle_get_market_capacity

spectra_get_pool_capacity

Analysis

pendle_get_yield_curve

spectra_get_yield_curve

Portfolio

pendle_get_portfolio

spectra_get_portfolio

Strategy

pendle_scan_opportunities

spectra_scan_opportunities

Strategy

pendle_scan_yt_arbitrage

spectra_scan_yt_arbitrage

Strategy

pendle_get_looping_strategy

spectra_get_looping_strategy

Trading

pendle_quote_trade

spectra_quote_trade

Trading

pendle_simulate_trade

spectra_simulate_trade

Monitoring

pendle_list_expiring_markets

spectra_list_expiring_pools

Protocol

pendle_get_protocol_stats

spectra_get_protocol_stats

Cross-Protocol Tools (2)

mv_compare_yield — Side-by-side comparison on overlapping chains with maturity-aware matching. Normalizes underlying symbols (wstETH↔stETH, USDC.e↔USDC) and matches by nearest maturity within configurable tolerance (exact ≤7d, close ≤30d, loose ≤90d). Shows match quality and maturity gap per pair.

mv_scan_curator_opportunities — Cross-protocol capital-aware scanner for MetaVault curators. Scans both Spectra and Pendle in parallel, computes price impact at your capital size, effective APY after entry cost, Morpho looping availability (both Spectra and Pendle PTs), and tags cross-protocol matches.

Pendle-Supported Chains

Overlapping with Spectra: Ethereum, Base, Arbitrum, Optimism, Sonic, BSC Pendle-only: Mantle, Berachain, HyperEVM, Corn

Key Differences from Spectra

  • AMM model: Pendle uses a time-decay logit AMM (not Curve StableSwap). The capacity and quote tools use a conservative scalarRoot=50 estimate.

  • YT trading: Pendle YT trades directly on the AMM (SY↔YT). Spectra YT trades indirectly via Router flash-mint/redeem.

  • Incentives: Pendle uses PENDLE token emissions + vePENDLE boosting (separate from Spectra's SPECTRA/veSPECTRA system).

  • Token wrapping: Pendle uses SY (Standardized Yield) tokens as the pool asset, not IBT (Interest-Bearing Token) like Spectra.

On-Chain Historical Activity

The Spectra REST API (/v1/{network}/pools/{pool}/activity) only retains a limited time window of recent transactions. When investigating addresses or pools with older activity, spectra_get_onchain_activity reads historical event logs directly from the blockchain via eth_getLogs.

Supports two contract types:

  • Curve pool (pool_address): TokenExchange, AddLiquidity, RemoveLiquidity, RemoveLiquidityOne

  • Spectra PT vault (pt_address): Mint (deposit IBT → PT+YT), Redeem (burn PT → IBT), YieldClaimed

Both can be provided simultaneously — events are fetched in parallel, merged, and sorted by block number.

Key features:

  • Dynamic RPC URL: Agent can pass any rpc_url parameter — works for chains without hardcoded RPCs (Katana, Monad)

  • Chunked fetching: 2000 blocks per chunk with per-chunk retry, best-effort (partial results on RPC issues)

  • Dual-contract decoding: Curve StableSwap-NG pool events AND Spectra PrincipalToken vault events

  • Block range control: Explicit from_block/to_block or lookback_hours (default 24h, max 720h/30 days)

  • Address filtering: Filter events by a specific address

  • No USD values: On-chain logs don't carry prices — token amounts are shown in human-readable form. Cross-reference with spectra_get_pt_details for price context

Composability with existing tools:

Agent flow: spectra_get_pool_activity → empty? → spectra_get_onchain_activity(pool_address=...) → pool events
Agent flow: portfolio shows PT but no pool trades → spectra_get_onchain_activity(pt_address=...) → vault events (mint/redeem)

Extending

Following the Open Emergence Pattern

When adding new tools, follow the three-layer architecture:

  1. Description (Layer 2): Teach any protocol mechanics that affect interpretation of the tool's data. Use "could be" language for ambiguous signals. Add cross-reference nudges to at least one related tool.

  2. Output (Layer 3): If the data contains signals that require domain knowledge to notice (e.g., a ratio that implies a strategy, an event that could mean different things), compute a structured hint and include it in the output. Make it salient but not prescriptive. When an observable pattern has multiple valid interpretations, present them as competing branches with equal weight — do not pick one. Flag small sample sizes as statistically insufficient.

  3. Coverage (Layer 4): If the tool's output covers only a subset of the address's or pool's full behavior, quantify the blind spots. Report value coverage (observable activity vs position size), temporal gaps, and which data sources were used vs available. End with a boundary marker: "Position sizing should assume this analysis is incomplete, not comprehensive." Coverage metrics bound ALL interpretation branches — high-confidence assessment + low coverage = false confidence.

  4. Resource (Layer 1): If the new tool introduces fundamental protocol concepts not covered by existing resources, update spectra-overview in index.ts.

  5. Dissolution condition: Document when the new structure would no longer serve, in docs/dissolution-conditions.md. Every Layer 3 hint, architectural pattern, and generative friction point carries a dissolution condition — a prompt for re-evaluation when circumstances change.

The goal: a cold-start agent reading only the tool descriptions and output hints should be able to use the tool correctly and compose it with other tools into novel analytical workflows.

Adding write capabilities (future)

To enable agents to actually execute strategies, you'd add tools that construct unsigned transactions via Spectra's Router contract. The agent would return the transaction calldata for the user to sign -- never holding keys.

Adding gauge/bribe data

Query the spectra-governance subgraph for current epoch votes, bribe amounts, and voter rewards. This is valuable for agents optimizing veSPECTRA voting strategies.

Not yet wired (API endpoints available)

These Spectra API endpoints are ready to be integrated. Create a new file in src/tools/, export register(), and import it in src/index.ts:

  • GET /v1/vision/{network}?tokens=... -- APR data for specific tokens

  • GET /v1/watch-tower/{network}/transactions -- Conditional order data

  • GET /v1/{network}/metavaults/bridge/transactions -- MetaVault cross-chain bridge transaction data (bridged volume, in-flight amounts)

License

MIT

Available Tools

56 tools
merkl_list_campaignsA

Discover live Merkl incentive campaigns on a given chain.

Returns all active Merkl campaigns with APR, reward tokens, daily rewards, TVL, and campaign type. Essential for understanding subsidized rates:

  • Morpho borrow campaigns: Merkl can PAY borrowers, making net borrow cost negative

  • LP campaigns: additional yield on top of base pool APR

  • HOLD campaigns: rewards for simply holding a token

Use this to verify whether a borrow rate is subsidized, find new incentive opportunities, or understand the full yield stack of any position.

Campaign types: CLAMM (concentrated LP), ERC20LOGPROCESSOR (Morpho/lending), MORPHOVAULT, etc. Action types: POOL (LP only), HOLD (token holders), BORROW, LEND.

Data completeness: the underlying Merkl API is fully paginated (all campaigns fetched, not truncated) and cached 15min in-memory + 30min on disk. Chains like Ethereum mainnet have 1,800+ campaigns — all are indexed. When asset_filter is provided, it also applies server-side filtering for targeted lookups.

When an agent says "no subsidy exists" — check here first. The subsidy layer is invisible to protocol-native tools unless explicitly integrated.

Inputs: chain (required), asset_filter, min_apr, top_n.

morpho_get_historyA

Historical rates and growth for a specific Morpho market. Shows borrow APY, supply APY, utilization, and TVL trends over time with min/avg/max/current stats and directional signals.

Useful for assessing rate stability before entering a looping position. A market with stable, predictable borrow rates is safer for leveraged strategies than one with frequent spikes.

Output includes signals: rate spikes, stability assessments, utilization warnings, TVL decline alerts, and supply/demand squeeze detection.

Parameters:

  • period: 7d (hourly), 30d (daily), 90d (daily), 1y (weekly)

  • interval: auto-selected based on period, or override manually

Use morpho_get_rate for current live rates. Use morpho_list_markets to discover market keys. Use spectra_get_looping_strategy to model leveraged yield after confirming rate stability.

Inputs: chain (required), market_key (required), period, interval.

morpho_get_market_suppliersA

Show who supplies lending liquidity to a specific Morpho market. Returns top suppliers ranked by supply size, identifies Morpho vaults vs EOAs vs loopers, and provides concentration analysis.

A market's supply side determines looping viability. A high-APY market with $10K supply from a single vault has different risk/capacity than $10M from diverse sources.

Protocol context:

  • Suppliers are identified via Morpho's marketPositions query, then cross-referenced against the vault registry. Addresses that aren't vaults could be EOAs or contracts.

  • A supplier with both collateral and borrows is likely a looper, not a lender. The tool tags these as [Looper] — but this is inference from position shape, not confirmed. The address could be a contract doing something more complex.

  • Supply concentration affects rate stability: one vault withdrawing could spike borrow rates. High concentration is a signal, not necessarily a problem.

  • Reward incentives (supply APR) can make supply competitive — or mask thin organic yield.

Use morpho_list_markets to find market keys first. Use morpho_list_vaults to discover all vaults on a chain and their allocations. Use morpho_get_rate for borrow-side rate and PT spread analysis.

Inputs: chain (required), market_key (required), top_n.

morpho_get_positionsA

Query a user's Morpho positions across all markets and vaults on a chain. Returns collateral, borrows, supply (with USD values), vault deposits, health factors, and position signals (looper detection, low health warnings).

Useful for understanding what a wallet holds on Morpho: is it a looper? A supplier? A vault depositor? The position shape reveals the strategy.

Protocol context:

  • Market positions show collateral, borrows, and supply separately. A position with both collateral and borrows is likely a looper (leveraged strategy).

  • Health factor = (collateralUsd * LLTV) / borrowUsd — approximation using USD values. Health < 1.0 means liquidatable. Health < 1.3 means dangerously close.

  • Vault positions show shares deposited in curated vaults (passive lending).

  • Net value = supply + collateral + vaults - borrows.

Scans all Morpho chains by default (mainnet, base, arbitrum). Specify chain to narrow.

Use morpho_list_markets to find available PT markets. Use morpho_get_rate for live borrow rate on a specific market. Use spectra_get_portfolio for Spectra protocol positions (PT, YT, LP).

Inputs: address (required), chain.

morpho_get_rateA

Get the current borrow rate and market state for a specific Morpho market. Provide the market's unique key (hex ID) and chain. Returns live borrow APY, supply APY, utilization, and liquidity — the data needed to calculate looping profitability. Use morpho_list_markets to discover market keys first.

Important: Rates are live as-of-query and change continuously based on utilization. When planning a looping strategy, verify rates are still favorable before executing. A profitable spread (fixed yield > borrow rate) can turn negative if borrow rates spike.

Use spectra_get_looping_strategy with these rates to calculate leveraged yield projections.

Inputs: chain (required), market_key (required).

morpho_list_marketsA

Find Morpho Blue lending markets by collateral type.

Two search modes:

  1. PT collateral (default): Finds markets that accept Spectra/Pendle PT tokens as collateral. Use pt_symbol_filter to narrow (e.g., "USDC", "sUSDe"). Essential for looping strategies.

  2. Any collateral: Use collateral_filter to search ANY Morpho market by collateral symbol (e.g., "ynRWAx", "wstETH", "WETH"). Finds IBT, LST, and other collateral markets that pt_symbol_filter would miss. IMPORTANT: Many yield-bearing tokens (IBTs) have Morpho markets using the raw token as collateral, NOT the PT wrapper.

When both filters are provided, collateral_filter takes precedence (broader search).

Enriched with Merkl campaign data: shows subsidized borrow/supply rates when Merkl campaigns are active on the market's collateral or loan assets. Subsidized borrow rates can be NEGATIVE (Merkl pays borrowers), dramatically improving looping economics.

Protocol context:

  • LLTV = Liquidation Loan-to-Value. Threshold where liquidation CAN occur, NOT the safe operating level. Loop safely at ~90-95% of LLTV.

  • High utilization (>90%) means limited borrowing capacity.

  • Borrow rates are variable and can spike. Monitor when leveraged.

  • Morpho chains: mainnet, base, arbitrum, katana.

Use spectra_get_looping_strategy for leveraged yield calculation. Use morpho_get_rate for live borrow APY on a specific market key. Use spectra_scan_opportunities for automated cross-chain looping discovery.

Inputs: chain, pt_symbol_filter, collateral_filter, min_supply_usd, +2 more.

morpho_list_vaultsA

List Morpho vaults on a chain — discover where supply-side liquidity lives. Returns vault details including AUM, APY, fees, curator info, and market allocations.

Morpho vaults are curated lending strategies managed by curators who allocate deposits across lending markets. They are often (but not always) the primary source of supply-side liquidity for PT looping markets. EOA suppliers also exist.

Protocol context:

  • Vault APY comes from lending yield on allocated markets, minus the curator's fee. High APY could indicate high borrow demand or could reflect temporary incentives.

  • A vault's allocation breakdown shows which markets it supplies and how much capital is deployed to each. A vault allocating to a PT market directly funds the looping pool.

  • Supply cap (when present) limits how much a vault will deploy to a given market. Uncapped allocations track demand; capped allocations create a ceiling.

  • Not all vaults on a chain allocate to PT markets — many serve non-PT markets. Use morpho_get_market_suppliers with a specific market key to find who actually supplies it.

Use morpho_get_market_suppliers to see who supplies a specific market. Use morpho_list_markets to find available PT lending markets. Use spectra_get_looping_strategy to model leveraged yield after identifying supply liquidity.

Inputs: chain (required), asset_filter, min_tvl_usd, top_n.

morpho_monitor_riskA

Monitor liquidation risk across a curator's Morpho positions.

Computes health factor, liquidation price, distance-to-liquidation, and borrow rate for every borrowing position. Flags positions approaching danger zones.

Morpho has NO close factor — when health factor reaches 1.0, the ENTIRE position can be liquidated in one transaction. This makes distance-to-liquidation critical: a 14% distance means a 14% collateral price drop wipes the position completely.

Alert levels scaffold attention, not action — multiple signals may disagree:

  • ok: position healthy, no immediate concern

  • watch: distance below threshold or rate elevated — worth monitoring

  • warning: health factor < 1.3 or distance dangerously low

  • critical: health factor < 1.1 or distance < 5% — immediate attention needed

Use morpho_get_positions for raw position data without risk analysis. Use morpho_get_history to assess borrow rate stability over time. Use spectra_get_looping_strategy to model deleverage scenarios.

Inputs: address (required), chain, alert_threshold_pct.

mv_check_ibt_healthA

Perform a multi-signal health assessment of the IBT underlying a PT pool.

Checks conversion rate (on-chain ERC-4626), APR composition (organic vs incentive), pool balance ratio, APR magnitude, protocol recognition, and liquidity level.

Returns HEALTHY / CAUTION / WARNING verdict with per-check details.

A CAUTION flag means "proceed with awareness." A WARNING flag means "investigate before deploying." Output includes observation boundaries declaring what the snapshot cannot detect (rate trajectory, underlying governance, whether imbalance is transient). Pool imbalance checks surface competing explanations (demand vs withdrawal vs maturity).

Two modes:

  1. Spectra mode (pt_address): Full analysis using Spectra API + on-chain checks.

  2. Direct mode (ibt_address): Protocol-agnostic on-chain checks. Tries ERC-4626 convertToAssets(), falls back to Pendle SY exchangeRate(). Use for Pendle SY tokens, or any ERC-4626 vault not listed on Spectra. Runs: conversion rate + rate direction. Skips: APR, pool balance, liquidity.

If both are provided, pt_address takes priority (richer data from Spectra API).

Use spectra_get_pool_capacity to assess how much capital the pool can absorb. Use spectra_compare_yield for fixed-vs-variable rate analysis on the same PT.

Inputs: chain (required), pt_address, ibt_address.

mv_compare_yieldA

Compare Pendle and Spectra yield opportunities side-by-side on the same chain. Auto-matches markets by underlying asset AND maturity proximity for head-to-head comparison.

Essential for MetaVault curators who can allocate to either protocol. Shows:

  • Implied APY (fixed rate) comparison

  • LP APY comparison (relevant for MetaVault allocation)

  • Pool liquidity and TVL comparison

  • Variable rate comparison

  • Per-market winner analysis

  • Maturity match quality (exact ≤7d, close ≤30d, loose ≤90d gap)

Only works on chains where both Spectra and Pendle are deployed: Ethereum, Optimism, BSC, Sonic, Base, Arbitrum, HyperEVM

Includes external Merkl campaign APR for both protocols when available.

Use pendle_list_markets for Pendle-only chain data. Use mv_scan_curator_opportunities for unified cross-protocol ranking with capital-aware sizing. Use spectra_scan_opportunities for Spectra-native capital-aware ranking.

Inputs: chain (required), asset_filter, min_tvl_usd, min_liquidity_usd, +2 more.

mv_get_calibrationA

Calibration oracle: what does "normal" look like for a market, pool, or IBT?

Produces statistical baselines from historical data — percentiles, anomaly thresholds, peer comparison, and assertion-ready language.

This is the bridge between perception (monitoring tools) and specification (security assertions like Phylax Credible Layer). The tool answers "what should the threshold be?" from observation, not theory.

For each metric (borrow APY, utilization, TVL, implied APY, etc.), returns:

  • Normal range (5th-95th percentile from historical data)

  • Current status (normal / elevated / anomalous)

  • Anomaly threshold (conservative: min of 3-sigma and 2x historical max)

  • Peer comparison (where this market sits among similar markets)

  • Assertion hints (natural language threshold suggestions)

Supports Morpho markets (by market key), Pendle markets (by market address), and Spectra pools (by pool/PT address). Auto-detects target type from address format (64-char hex = Morpho, 40-char hex = Pendle/Spectra).

Use morpho_get_history or pendle_get_market_history for raw time-series. Use mv_check_ibt_health for single-point health snapshots. Use this tool when you need to CALIBRATE — set thresholds, compare to peers, or export knowledge about what normal looks like.

Inputs: chain (required), target_address (required), target_type, period, +1 more.

mv_get_curator_portfolioA

Aggregate multiple MetaVaults managed by a single curator into one portfolio view.

Three input modes (priority: explicit > label > address):

  1. Explicit mode: metavault_addresses as a JSON array of {chain, address} pairs to aggregate specific vaults (machine-friendly).

  2. Label mode: curator_label="Gami Labs" — resolves to the union of curator EOAs whose curator.name matches case-insensitively across chains. Solves the named-curator-multiple-EOAs case (e.g. Gami Labs has different EOAs on base vs flare).

  3. Address mode: curator_address=0x... — scans all chains for MetaVaults where the curator's address matches the vault's curator.addresses array (machine-friendly when the EOA is known).

Returns:

  • Total AUM across all vaults

  • Blended APY (TVL-weighted)

  • Projected annual fee revenue at the configured curator fee

  • Concentration by underlying asset and by chain (suppressed for single-vault curators)

  • Per-underlying rollup with expiry calendar (suppressed for single-underlying curators)

  • Per-vault summary with position count and per-vault action items

  • Cross-Vault Items: GENUINE cross-vault signals computed by aggregation (suppressed when no genuine signal fires — silent on clean is first-class)

Use spectra_get_curator_dashboard for deep-dive into a specific vault. Use morpho_monitor_risk for Morpho position health across the curator's address. Use spectra_stress_test_vault for withdrawal simulation on a specific vault.

Inputs: curator_address, curator_label, metavault_addresses, curator_fee_pct.

mv_get_position_mapA

Cross-protocol position map — see the whole wallet across Spectra, Pendle, Morpho, and governance.

Each protocol tool sees its own silo. This tool sees the contradictions BETWEEN silos. Calls all portfolio sources in parallel and composes a unified view with:

  • Per-protocol position summaries with USD values

  • Governance tokens (veSPECTRA on Base, vePENDLE if detectable)

  • Cross-protocol totals with honest failure reporting

  • Contradiction detection: lending vs fixed rate spreads, concentration risks, expiring positions across protocols, governance boost mismatches

  • Entry path awareness for rebalancing opportunities

Does NOT replace per-protocol tools — use spectra_get_portfolio, pendle_get_portfolio, morpho_get_positions for deeper per-protocol analysis.

Use this as the FIRST call when analyzing a wallet. It answers "where am I?" before "what should I do?"

Inputs: address (required), chain.

mv_get_protocol_contextA

Get essential protocol mechanics for Spectra, Pendle, and Morpho — needed for correct reasoning. This server covers 3 protocols with 55 tools. This context tool teaches how they all work.

Use topic "pendle_morpho" first if you're unfamiliar with the multi-protocol scope — it explains all three protocols, their tools (spectra_*, pendle_*, morpho_*, mv_*), and when to use cross-protocol tools vs protocol-specific ones. IMPORTANT: MetaVaults (spectra_list_metavaults, spectra_model_metavault, spectra_get_curator_dashboard, spectra_stress_test_vault) are Spectra-specific curated vaults — don't miss them.

Use topic "workflow_routing" to learn which tools to call for a given goal (yield optimization, wallet analysis, YT arbitrage, curator strategies, etc.) and how they feed into each other. Recommended starting point for agents new to the tool set.

Use topic "pt_yt_mechanics" for how PT/YT splitting works on Spectra. Use topic "router_batching" for how Spectra Router affects pool activity interpretation. Use topic "deposit_path" for step-by-step entry mechanics (how to buy PT, mint YT, LP, loop). Use topic "glossary" for key term definitions (IBT, sw-prefix, LLTV, gauge, maturity value, APR vs APY, underlying, LP, ERC-4626, Curve StableSwap-NG, boost formula). Use topic "fees_and_costs" for protocol YT fees (Spectra 3%, Pendle 5%), reward basis (held vs notional), Merkl campaign types, and external points programs. Use topic "external_protocols" for the registry of non-Spectra protocols a MetaVault can hold via externalPositions[] (e.g. Avant one-week cooldown, Pendle instant LP exit): settlement windows, observation boundaries, mitigations. Call this before reasoning about withdraw speed or exit cost on positions that aren't in Spectra LP. Use topic "protocol_pulse" for LIVE cross-protocol vital signs (TVL, emissions, pool counts, expiring pools). Fetches real-time data — takes 5-15 seconds.

Available topics: pt_yt_mechanics, router_batching, position_analysis, looping, networks, deposit_path, glossary, fees_and_costs, pendle_morpho, workflow_routing, external_protocols, protocol_pulse Omit the topic parameter to get all topics at once.

Inputs: topic.

mv_load_scarsA

Load the system's accumulated scars (corrective lessons), weighted by recency × reinforcement.

Use this in audit lenses to ground reasoning in what the system has been re-taught. Most useful for the Diverger lens: "what would consensus kill?" sharpens significantly when read against the system's own history of contradictions.

Weighting formula: weight = exp(-ageDays/30) × (1 + log2(1 + reinforceCount))

  • 30-day recency halflife.

  • Logarithmic dampening on reinforcement (1 = ×2, 3 = ×3, 7 = ×4).

  • A scar reinforced 3+ times from 30+ days ago beats a one-time recent correction.

Scar source: feedback_*.md files in the memory directory. Each file's frontmatter:

name: description: type: feedback reinforces: # optional; absent = independent date: # optional; absent = falls back to file mtime

Default directory: ${HOME}/.claude/projects/${encoded-cwd}/memory Override via SCAR_DIR env var or scar_dir param.

Inputs: top_n, include_body, filter_type, scar_dir.

mv_plan_rolloverA

Plan position rollovers for expiring MetaVault positions.

When a MetaVault position approaches maturity, the curator must: (1) identify the next pool, (2) estimate transition costs, (3) time the entry, (4) execute the rollover.

This tool automates steps 1-3 by scanning Spectra and Pendle for rollover candidates matching the expiring position's underlying asset, computing entry impact at the position's capital size, and ranking by effective APY.

Returns per expiring position: ranked list of rollover candidates with entry impact, yield gap (days of zero yield during transition), overlap window (if entering before old matures), and net effective APY after transition costs.

Use spectra_get_curator_dashboard to see which positions are approaching maturity. Use mv_scan_curator_opportunities for broader cross-protocol opportunity discovery. Use spectra_get_pool_capacity to assess depth at your capital size for specific candidates.

Inputs: chain (required), metavault_address (required), pt_address, max_maturity_days, +4 more.

mv_scan_curator_opportunitiesA

Scan all Spectra AND Pendle chains for the best yield opportunities, sized to your capital. Cross-protocol scanner designed for MetaVault curators who can allocate to either protocol.

Unlike spectra_scan_opportunities (Spectra-only), this tool includes Pendle markets with:

  • Capital-aware price impact for BOTH protocols

  • Maturity-aware cross-protocol matching (same underlying + similar expiry)

  • Morpho looping analysis for Spectra PTs (Pendle looping in future phase)

  • Unified ranking by effective APY across both protocols

  • External Merkl campaign APR for both protocols (incentive programs beyond native yield)

  • Protocol tags ([Spectra] vs [Pendle]) and cross-protocol match indicators

Unlike spectra_get_best_fixed_yields or pendle_list_markets, this tool computes effective APY at YOUR capital size — a high-APY pool with thin liquidity may be useless at your scale.

The ranking can disagree with spectra_scan_opportunities because it includes a different opportunity set (Pendle markets). This disagreement is intentional — both tools measure different things.

Use mv_compare_yield for detailed head-to-head on a specific chain. Use spectra_model_metavault to model blended Spectra+Pendle MetaVault allocation. Use spectra_get_curator_dashboard for operational monitoring of an existing MetaVault.

Inputs: capital_usd (required), asset_filter, min_tvl_usd, min_liquidity_usd, +5 more.

pendle_get_best_fixed_yieldsA

Find the best fixed-rate (implied APY) opportunities across all Pendle chains.

Scans all Pendle-supported chains and ranks markets by their implied APY — the fixed rate you lock in when buying PT at a discount. This is the Pendle equivalent of spectra_get_best_fixed_yields.

Unlike pendle_list_markets (which shows a single chain), this scans all chains at once and focuses on the PT buyer's perspective: which markets offer the highest fixed rate?

Unlike pendle_scan_opportunities (capital-aware), this is a quick raw-APY ranking without price impact analysis. Use it for initial screening, then drill into specific markets with pendle_get_market_details or size with pendle_scan_opportunities.

Pendle chains: Ethereum, Optimism, BSC, Sonic, Base, Arbitrum, Mantle, Berachain, HyperEVM, Corn

Inputs: chain, asset_filter, min_tvl_usd, min_liquidity_usd, +2 more.

pendle_get_looping_strategyA

Calculate a leveraged fixed-yield strategy using Pendle PT + Morpho looping.

Strategy: Buy Pendle PT → use as Morpho collateral → borrow underlying → buy more PT → repeat. Each loop multiplies yield exposure.

Returns projected yields at different leverage levels (1x to max safe leverage), effective APY, risk parameters, borrow rate sensitivity, and break-even analysis.

Automatically fetches the live Morpho borrow rate and LLTV when a matching market exists.

NOTE: Looping requires a Morpho market that accepts the specific Pendle PT as collateral. Morpho markets for Pendle PTs exist primarily on Ethereum mainnet and some on Arbitrum.

The Pendle equivalent of spectra_get_looping_strategy.

Use pendle_get_market_details for full market info. Use pendle_scan_opportunities(include_looping=true) for cross-market looping rankings. Use morpho_list_markets to find available Morpho markets.

Inputs: chain (required), market_address (required), morpho_ltv, borrow_rate, +1 more.

pendle_get_market_capacityA

Analyze a Pendle market's capacity by computing price impact at increasing capital sizes.

Shows how price impact and effective APY degrade as capital grows, helping curators find the sweet spot (max capital with acceptable impact) and the exhaustion point (where APY collapses).

Uses Pendle's logit AMM model (conservative scalarRoot=50) which accounts for time-decay pricing. Near maturity, the AMM becomes more capital-efficient, so impact is lower than constant-product estimates.

This is the Pendle equivalent of spectra_get_pool_capacity.

Use pendle_get_market_details for full market information. Use pendle_scan_opportunities for capital-aware ranking across all markets.

Inputs: chain (required), market_address (required), steps, max_capital_usd.

pendle_get_market_detailsA

Get detailed information about a specific Pendle market by address.

Returns: market name, PT/YT/SY/underlying addresses, implied APY (fixed rate), LP APY breakdown (swap fees + PENDLE incentives + boost), underlying variable APY, TVL, pool liquidity, 24h volume, pool reserves, maturity, and external Merkl campaigns.

This is the Pendle equivalent of spectra_get_pt_details. Use it to drill into a specific Pendle market after finding it via pendle_list_markets, mv_compare_yield, or mv_scan_curator_opportunities.

Use mv_check_ibt_health(ibt_address=SY_ADDRESS) to assess the underlying vault's health. Use mv_compare_yield to compare this market with Spectra equivalents.

Inputs: chain (required), market_address (required).

pendle_get_market_historyA

Historical time-series data for a Pendle market.

Shows how implied APY, TVL, volume, PT/YT prices, and other metrics have moved over time. The first tool that answers "what happened?" not just "what is it now?"

Enables: trend analysis, yield stability assessment, anomaly detection, conviction building before entry. A flat APY with low stddev means predictable yield. A volatile APY with high stddev means the rate you see today may not persist.

Available fields: impliedApy, tvl, tradingVolume, ptPrice, ytPrice, baseApy, lpPrice, lpRewardApy, maxApy, pendleApy, swapFeeApy, syPrice, totalPt, totalSupply, totalSy, totalTvl, underlyingApy, underlyingInterestApy, underlyingRewardApy, voterApr, ytFloatingApy, lastEpochVotes

Use pendle_get_market_details for current market snapshot. Use pendle_list_markets to find market addresses.

Inputs: chain (required), market_address (required), period, fields.

pendle_get_portfolioA

View a wallet's Pendle positions across all chains (or a specific chain).

Shows PT, YT, and LP token balances with USD valuations for each Pendle market the wallet has positions in. Includes maturity dates, implied APY, LP APY, strategy inference, and expiry warnings.

This is the Pendle equivalent of spectra_get_portfolio.

Use pendle_get_market_details to drill into a specific market. Use mv_plan_rollover to plan rollovers for expiring positions. Use spectra_get_portfolio for Spectra positions.

Inputs: address (required), chain.

pendle_get_protocol_statsA

Get Pendle protocol-wide statistics: total TVL, market count, liquidity, and volume across all Pendle-supported chains.

Shows per-chain breakdown and aggregate metrics. Includes:

  • Active market count and TVL per chain

  • Total pool liquidity and 24h volume

  • Average implied APY and LP APY

  • Chain overlap with Spectra (expansion opportunities)

The Pendle equivalent of spectra_get_protocol_stats.

Use pendle_list_markets for detailed market-level data. Use mv_scan_curator_opportunities for cross-protocol ranking.

Inputs: no named parameters.

pendle_get_yield_curveA

Show the yield curve (term structure) for a given underlying asset across Pendle chains.

Fetches all active Pendle markets matching the underlying (e.g., "USDC", "ETH", "stETH"), sorts by maturity, and displays implied APY at each point on the curve.

This is the fixed-income view: "What rate can I lock for 30 days vs 90 days vs 180 days?" Helps curators spot term premium anomalies, compare cross-chain rates, and choose maturities.

The Pendle equivalent of spectra_get_yield_curve.

Use pendle_get_market_details to drill into a specific maturity. Use pendle_get_market_capacity to check depth at your capital size. Use mv_compare_yield for Spectra vs Pendle comparison on the same underlying.

Inputs: underlying (required), chain, min_tvl_usd, min_liquidity_usd, +1 more.

pendle_list_expiring_marketsA

Scan Pendle chains for markets approaching maturity.

Groups results by urgency:

  • CRITICAL (≤7d): Immediate action required — redeem or rollover

  • WARNING (≤14d): Plan rollover within days

  • ALERT (≤threshold): Monitor and prepare

This is the Pendle equivalent of spectra_list_expiring_pools. Useful for:

  • Portfolio managers who need to plan rollovers

  • Curators monitoring MetaVault positions that include Pendle PTs

  • Traders looking for near-maturity convergence plays

Use pendle_get_market_details for full market info on an expiring market. Use mv_plan_rollover to plan rollovers for MetaVault positions. Use pendle_get_yield_curve to find replacement maturities.

Inputs: threshold_days, chain, min_tvl_usd, compact.

pendle_list_marketsA

List active Pendle markets on a given chain, or scan all Pendle-supported chains. Returns: market name, implied APY (fixed rate), LP APY, TVL (underlying deposited), liquidity (AMM depth), maturity, and token addresses.

Pendle is a competing/complementary yield tokenization protocol. Like Spectra, it splits yield-bearing tokens into PT (principal) and YT (yield). Key differences:

  • Pendle uses its own AMM (not Curve) with time-decay pricing

  • Pendle has PENDLE token incentives on LP positions

  • Pendle markets exist on chains where Spectra may not be deployed yet

This data is essential for curators building cross-protocol MetaVaults. A MetaVault can integrate Pendle PTs alongside Spectra PTs, allocating to whichever protocol offers better rates for a given underlying + maturity.

Pendle-supported chains: Ethereum (mainnet), Optimism (optimism), BSC (bsc), Sonic (sonic), Base (base), Arbitrum (arbitrum), Mantle (mantle), Berachain (berachain), HyperEVM (hyperevm), Corn (corn) Chains with Spectra overlap: mainnet, optimism, bsc, sonic, base, arbitrum, hyperevm Pendle-only chains (Spectra not deployed): mantle, berachain, corn

Includes external Merkl campaign APR when available (LP, YT, and SY incentive programs). Merkl campaigns are fetched best-effort per chain and shown alongside native PENDLE incentives.

Use mv_compare_yield to do a head-to-head comparison on a specific underlying. Use mv_scan_curator_opportunities for unified cross-protocol ranking with capital-aware sizing. Use spectra_scan_opportunities for Spectra-native opportunity ranking.

Inputs: chain, sort_by, min_tvl_usd, min_liquidity_usd, +3 more.

pendle_quote_tradeA

Estimate expected output, price impact, and effective APY for a Pendle PT trade.

Uses the Pendle logit AMM model to estimate trade outcomes. Shows:

  • Expected output amount and effective rate

  • Price impact at your trade size

  • Effective APY after accounting for entry cost

  • Minimum output with slippage tolerance

Side:

  • "buy": Spend underlying/SY to get PT (lock in fixed rate)

  • "sell": Sell PT for underlying/SY (exit fixed position)

The Pendle equivalent of spectra_quote_trade.

Use pendle_get_market_capacity for a multi-size impact curve. Use pendle_get_market_details for full market information.

Inputs: chain (required), market_address (required), amount (required), side (required), +1 more.

pendle_scan_opportunitiesA

Scan all Pendle chains for the best yield opportunities, sized to your capital.

This is the Pendle equivalent of spectra_scan_opportunities. Unlike pendle_get_best_fixed_yields (raw APY ranking), this tool computes:

  • Entry price impact at YOUR capital size using Pendle's logit AMM model

  • Effective APY after amortizing entry cost over days to maturity

  • Pool capacity (max capital before impact exceeds threshold)

  • Morpho looping availability for Pendle PTs on Morpho-capable chains

  • External Merkl campaign incentives

The ranking reflects what you can actually EARN, not just what the protocol advertises.

For cross-protocol scanning (Spectra + Pendle together), use mv_scan_curator_opportunities. For Spectra-only scanning, use spectra_scan_opportunities.

Inputs: capital_usd (required), chain, asset_filter, min_tvl_usd, +5 more.

pendle_scan_yt_arbitrageA

Scan Pendle markets for YT (Yield Token) mispricing opportunities.

Compares the underlying's variable APY against the implied rate from the PT/YT market price. When these diverge, a spread exists:

  • Positive spread (Underlying APY > Implied): YT is underpriced — buy YT

  • Negative spread (Underlying APY < Implied): YT is overpriced — sell YT

Unlike Spectra (where YT trades indirectly via Router flash-mint/redeem), Pendle YT trades directly on the Pendle AMM, making execution simpler:

  • Buy YT: swap SY → YT on Pendle AMM

  • Sell YT: swap YT → SY on Pendle AMM

This is the Pendle equivalent of spectra_scan_yt_arbitrage.

Use pendle_get_market_details for detailed info on a specific opportunity. Use mv_compare_yield for cross-protocol comparison on the same underlying.

Inputs: capital_usd (required), min_spread_pct, chain, asset_filter, +5 more.

pendle_simulate_tradeA

Simulate how a Pendle PT trade would change a wallet's portfolio.

Shows before/after comparison:

  • Existing Pendle positions on the target chain

  • New position from the simulated trade

  • Blended APY across all positions

  • Concentration analysis

Does NOT execute any transaction — purely informational.

The Pendle equivalent of spectra_simulate_trade.

Use pendle_quote_trade for a detailed trade quote first. Use pendle_get_portfolio to see full current portfolio.

Inputs: chain (required), market_address (required), address (required), amount (required), +1 more.

spectra_compare_yieldA

Compare Spectra's fixed yield (via PT) against the variable yield of the underlying interest-bearing token. Helps users decide if locking in a fixed rate is worthwhile versus staying in the variable-rate position.

Protocol context:

  • Fixed rate is labeled "implied APY" (annualized, compounded). Variable rate is labeled "IBT APR" (not compounded). LP yield is labeled "LP APY". Each is labeled at point of use.

  • Entry cost (price impact) is amortized over days to maturity.

  • LP alternative: providing liquidity earns trading fees + SPECTRA gauge emissions.

Output surfaces competing interpretations when the data is ambiguous — e.g., positive raw spread but negative effective spread after entry cost, or incentive-dominated variable rate.

Use spectra_get_looping_strategy to lever up the fixed yield via Morpho. Use spectra_get_portfolio to check your current positions. Use spectra_scan_opportunities for multi-chain comparison.

Inputs: chain (required), pt_address (required), ve_spectra_balance, capital_usd.

spectra_get_address_activityA

Scan all pools on a chain (or all chains) for a given address's activity. Returns per-pool breakdown and cross-pool aggregates. Useful for discovering multi-pool strategies without making N manual spectra_get_pool_activity calls.

When investigating a wallet that operates across multiple pools (e.g., a curator or yield farmer diversifying across maturities), this tool reveals the full scope of their on-chain activity in one call.

Each pool's activity is summarized with type breakdown and total volume. Cross-pool totals show the address's aggregate engagement with Spectra.

For deep per-pool analysis (cycle detection, flow accounting, contract detection), use spectra_get_pool_activity with the address parameter on the specific pool of interest. Use spectra_get_portfolio to see current holdings across all pools.

Includes an Observation Coverage section that quantifies blind spots: which pools were scanned, what event types are visible vs invisible (standalone mints, yield claims, and non-Spectra operations are never visible here), and whether activity is concentrated on one chain. Position sizing should assume this scan is incomplete, not comprehensive.

Inputs: address (required), chain, min_volume_usd.

spectra_get_best_fixed_yieldsA

Find the best fixed-rate yield opportunities across all Spectra chains. Scans all supported networks and returns the top opportunities ranked by implied APY. Filters by asset type if specified.

Important: This ranks by raw implied APY without considering your capital size or pool liquidity. These rankings will often disagree with spectra_scan_opportunities (which ranks by effective APY after entry cost). That disagreement is intentional -- raw APY reflects the pool's headline rate while effective APY reflects what you actually capture at your capital size. Neither ranking is "correct" -- they measure different things. Use both to develop conviction about which pools genuinely serve your strategy.

Inputs: asset_filter, min_tvl_usd, min_liquidity_usd, top_n, +1 more.

spectra_get_curator_dashboardA

Operational dashboard for MetaVault curators.

Aggregates vault health, position status, depositor flows, fee revenue estimates, and actionable alerts into a single view. Designed for curators managing live MetaVaults who need a quick operational overview.

Returns:

  • Vault health: TVL with unallocated ratio (undeployed capital AFTER subtracting external positions — shown when >5%), Status label for non-VISIBLE vaults, live APY with optional 30d avg suffix and APY composition (base vs incentives), share price

  • APY 4-number breakdown when live-vs-30d delta ≥ 0.5pp: shows base+incentive decomposition for both snapshots WITHOUT asserting causality (agents draw their own conclusions from the numbers)

  • Position status: each active PT position with maturity countdown, APY, and size. Positions approaching maturity are flagged (!!!=14d, !!=30d)

  • External Positions: value held OUTSIDE Spectra LP structure (avant avUSDx-burn redemption-in-flight, pendle LP on other protocols). Rendered per-protocol with graceful fallback for unknown protocols

  • Capital State decomposition line: when ≥1 of {expired-stuck, external} buckets populated, emits a single line showing deployed/expired-stuck/ external/unallocated as % of TVL

  • Depositor flows: epoch-by-epoch net inflows/outflows with trend analysis

  • Fee revenue: estimated annual curator fee revenue (snapshot projection)

  • Action items: auto-generated alerts including [UNALLOC] (softened when external capital coexists), [STATUS] (HIDDEN vaults), [PENDLE-EXT URGENT/UPCOMING/EXPIRED] (external Pendle maturity), [EXPIRED] / [URGENT] / [SOON] / [UPCOMING] (Spectra LP maturity), [OUTFLOWS], [BRIDGE], [INCENTIVE], [PENDLE ROLLOVER]

Pool allocations show each position as a % of total vault TVL (e.g., "37.1% | $236K"), sorted by size, with protocol tags ([Spectra]/[Pendle]/[Unknown]) on each position. Unallocated liquidity is shown separately (and excludes capital deployed in external positions — labeled as "unallocated" to distinguish from "idle"). When the API doesn't provide LP balance data for a position, it shows "?%".

Cross-chain positions: MetaVault positions may live on a different chain than the MetaVault itself (e.g., Base MetaVault → Avalanche pools via CCTP bridge). Pool addresses in positions are on the position's chain, not the MetaVault's home chain.

Epoch flows: Derived from asset snapshots and rate changes. Yield accrual is estimated from share rate deltas — actual yield may differ. Use share price trend to corroborate.

Requires chain + metavault_address. Use spectra_list_metavaults to discover addresses. Use spectra_model_metavault for leverage modeling after reviewing the dashboard. Use spectra_get_pool_activity on specific pool addresses for trading pattern analysis. Use spectra_get_address_activity on the curator's EOA for cross-pool curator activity.

When verify_externals=true (off by default), each avant external position is probed on Avalanche's RequestsManager — confirms state (CREATED/COMPLETED/CANCELLED), provider attribution, on-chain amount (with PPM tolerance for API rounding), global counter, and pause flag. A [chain-truth ✓/⚠/✗] line is appended under each avant position. Per-order failures degrade gracefully and never poison sibling positions or block the dashboard. Pendle externals are NOT yet probed in this slice.

Inputs: chain (required), metavault_address (required), curator_fee_pct, verify_externals.

spectra_get_gauge_votesA

Full veSPECTRA governance dashboard: gauge vote distribution, voting APRs, bribe incentives, SPECTRA emissions per pool, and Merkl campaign health.

Shows where veSPECTRA holders direct their votes, what rewards they earn for voting, and how SPECTRA emissions are distributed across pools. Essential for:

  • Deciding where to direct veSPECTRA votes for maximum return

  • Finding pools with active bribe markets (voting incentives)

  • Understanding emission concentration and governance dynamics

  • Evaluating bribe efficiency ($ per vote)

  • Detecting broken emission pipelines (votes directing SPECTRA to pools where no Merkl campaign exists to distribute them)

Each gauge is cross-referenced against live Merkl campaigns: ✅ = Merkl campaign active at the gauge's pool address (emissions flowing) ⚠ = Merkl campaign exists but targets a different pool address (likely stale — gauge rolled to a successor pool but the campaign wasn't updated) ❌ = No campaign found (emissions allocated by governance but not distributed)

The ⚠ stale detection uses fuzzy symbol matching: if the gauge symbol (e.g., "yvvbUSDC") appears in a Merkl campaign name containing "Spectra" but the campaign targets a different address, the campaign likely belongs to a matured predecessor pool. This catches the common failure mode where pools roll to new maturities but Merkl campaigns lag behind.

The voting APR is what veSPECTRA holders earn by directing votes to a gauge: voting APR = (voting rewards + swap fees) / vote value

Bribe efficiency = total voting rewards / total votes (in $). Higher efficiency = more reward per unit of voting power directed.

Use spectra_get_ve_info for your personal boost calculation. Use spectra_list_pools to see the pools behind these gauges. Use spectra_list_expiring_pools to check gauge status for expiring pools.

Inputs: sort_by, top_n, chain_filter, min_votes.

spectra_get_looping_strategyA

Calculate a leveraged fixed-yield strategy using Spectra PT + Morpho looping.

Strategy: Deposit asset -> mint PT on Spectra -> use PT as collateral on Morpho -> borrow underlying -> deposit again -> repeat. Each loop multiplies yield exposure.

Returns projected yields at different leverage levels (1x to max safe leverage), effective APY, and risk parameters.

Automatically fetches the live Morpho borrow rate and LLTV when a matching market exists. You can still override morpho_ltv and borrow_rate manually if needed.

NOTE: Looping requires a Morpho market that accepts the specific PT as collateral.

Risk context:

  • Borrow rates are variable. A 5% spread (7% yield - 2% borrow) can turn negative if borrow rates spike above your fixed yield. Monitor rates in Morpho.

  • Higher leverage amplifies both returns and liquidation risk. Consider keeping 1-2 loops below maximum for safety buffer.

  • Entry cost (price impact) compounds across loops — each iteration faces degraded effective pool liquidity.

Use morpho_list_markets to find available Morpho markets. Use spectra_scan_opportunities to discover the best looping opportunities across all chains with capital-aware sizing.

Inputs: chain (required), pt_address (required), morpho_ltv, borrow_rate, +1 more.

spectra_get_onchain_activityA

Fetch historical on-chain activity directly from event logs via eth_getLogs. Use this when the API-based spectra_get_pool_activity returns empty or incomplete data (the API only stores a limited time window of recent transactions).

Supports TWO contract types:

  1. Curve StableSwap-NG pool (pool_address): TokenExchange, AddLiquidity, RemoveLiquidity

  2. Spectra PrincipalToken vault (pt_address): Mint (deposit→PT+YT), Redeem (burn PT→IBT), YieldClaimed

Provide pool_address, pt_address, or both. When both are provided, events from both contracts are fetched in parallel, merged, and sorted by block number.

Returns raw token amounts (not USD values — USD conversion is not available from on-chain data alone).

The rpc_url parameter lets you supply an RPC endpoint for any chain, including chains without hardcoded RPCs (e.g., Katana, Monad). If omitted, falls back to the server's default public RPC for the chain (if available).

Block range strategy:

  • Specify from_block/to_block for exact ranges

  • Or specify lookback_hours to scan the last N hours (converted to blocks using estimated block times — approximate, not exact)

  • Default: last ~24 hours if no range is specified

Limitations:

  • No USD values (only raw token amounts in native decimals)

  • Block timestamps are fetched for first/last block only (time range display)

  • Public RPCs may rate-limit large scans; use a premium RPC for deep history

  • Maximum 500,000 blocks per request (to prevent timeout)

Use spectra_get_pool_activity for recent data with USD values and rich analysis. Use this tool for historical data beyond the API's retention window.

Inputs: chain (required), pool_address, pt_address, rpc_url, +7 more.

spectra_get_pool_activityA

Get recent trade and liquidity activity for a specific Spectra pool. Returns individual transactions: buys, sells, and liquidity adds/removes with USD values, timestamps, and tx hashes.

Pool activity shows only the Curve pool's perspective (IBT ↔ PT swaps and LP events). The Spectra Router batches operations atomically, so any single pool event may be one step of a multi-step strategy. There is no BUY_YT or SELL_YT event type — the pool never touches YT directly. Use mv_get_protocol_context for the full mechanics of how Router batching maps to pool activity types.

Protocol mechanics that affect how activity appears:

  • BUY_PT and SELL_PT are Curve pool swaps between IBT and PT.

  • There is NO "BUY_YT" or "SELL_YT" type. The pool never touches YT directly.

  • YT selling via the Router's flash-redeem internally buys PT from the pool to pair with YT for redemption — so YT sells show up as BUY_PT in the activity log.

  • A standalone mint (deposit IBT → PT+YT) does NOT appear in pool activity. However, the Router can batch a mint + LP add in one atomic execute() call. The minted PT + remaining IBT enter the pool as AMM_ADD_LIQUIDITY while the minted YT goes directly to the user's wallet. So AMM_ADD_LIQUIDITY events may ALSO represent YT acquisition — the YT minting is invisible in pool data.

  • The Router can also flash-mint atomically: flash-borrow IBT → mint PT+YT → sell PT on the pool → user tops up the shortfall → user receives YT. This shows up as SELL_PT but the user's net action is acquiring YT, not selling PT.

  • AMM_REMOVE_LIQUIDITY returns IBT + PT from the pool. Users often follow up by selling the PT (SELL_PT) to recover capital, completing a mint→LP→remove→sell loop that nets them YT at the cost of the PT discount (~1 - ptPrice).

Key principle: any pool event type can be one step of a multi-step Router operation. Do not assume SELL_PT means "user is bearish on PT" or AMM_ADD_LIQUIDITY means "user is providing liquidity for yield." Always cross-reference with spectra_get_portfolio to see what the address actually holds (PT, YT, LP balances) — the holdings reveal the true strategy better than the activity log alone.

Analysis tips — IMPORTANT: each observation below has multiple valid interpretations. The tool output now presents these as competing branches. Do not collapse to one interpretation without cross-referencing spectra_get_portfolio and other data sources.

  • High SELL_PT count: could be flash-mint YT accumulation (check YT balance >> PT) OR simple PT liquidation OR one leg of cross-protocol arb. Portfolio resolves this.

  • BUY_PT events: could be fixed-rate accumulation OR flash-redeem YT selling (check if YT balance dropped). These predict opposite future behavior.

  • Paired ADD/REMOVE liquidity: could be LP cycling in a mint loop OR fee harvesting OR rebalancing. The intent is not observable from pool activity alone.

  • Large volume vs small holdings: could be capital recycling (looping) OR completed round-trip (entered and exited) OR funds moved to another venue.

Output includes an Address Concentration section with full addresses and per-address type breakdowns. Use spectra_get_portfolio on those addresses to see their PT, YT, and LP balances. Most analysis can be done without a block explorer — use spectra_get_portfolio on addresses from Address Concentration, and spectra_compare_yield or spectra_get_pt_details for rate context.

Address isolation mode: When you provide an 'address' parameter, the tool filters to that address only, sorts chronologically (oldest first), and adds:

  • Sequence Analysis: detects repeating action cycles (e.g., ADD→REMOVE→SELL repeated 8×). Presents COMPETING INTERPRETATION BRANCHES (A/B/C) that predict different future behavior. Small repetition counts (≤5) are flagged as statistically insufficient for extrapolation. CRITICAL: do NOT collapse these branches into a single narrative without external evidence from spectra_get_portfolio or other tools. The branches exist as friction against premature pattern-matching — the tension between them IS the information.

  • Flow Accounting: cross-references portfolio data to show PT/YT flow reconciliation. When position shape is observable (e.g., YT-only, PT-only, fully exited), presents competing hypotheses for WHY the position looks that way. Each hypothesis predicts different future behavior. Do not select one without additional evidence.

  • Capital Efficiency: compares total activity volume against the address's throughput, flagging high ratios that indicate capital recycling (looping) vs accumulation.

  • If the address shows high-frequency activity (>10 txns), consider checking whether it is a contract (programmatic execution via Router execute()) vs an EOA (manual/scripted). Contracts execute atomically; EOAs submit separate transactions. This distinction affects whether apparent "sequences" are truly sequential or batched.

  • Contract Detection: checks whether the address is a contract or EOA via on-chain eth_getCode. Contracts execute atomically; EOAs submit sequential transactions.

  • Pool Impact: flags when SELL_PT or BUY_PT volume is significant relative to pool liquidity, indicating potential market impact on implied APY.

  • Gas Estimates: estimates total gas cost from transaction count using chain-specific gas heuristics. Shows gas as percentage of activity volume and position value.

  • Pool Context: fetches pool liquidity and implied APY for baseline context.

  • Observation Coverage: quantifies the blind spots of this analysis. Shows: (1) Value coverage — what % of the position is explained by observable activity. (2) Temporal coverage — active days vs dark periods with no observable events. (3) Data source coverage — which of the available data sources were consulted. CRITICAL: coverage metrics bound the domain of validity for ALL interpretations above. If value coverage is low (<50%), the competing interpretation branches are based on a minority of the address's actual behavior. Position sizing should reflect the coverage level, not the confidence of the best-fitting interpretation.

For multi-pool activity scanning, use spectra_get_address_activity to find all pools an address has interacted with in a single call.

Inputs: chain (required), pool_address (required), type_filter, limit, +1 more.

spectra_get_pool_capacityA

Analyze a pool's capacity by quoting PT trades at increasing capital sizes.

Shows how price impact and effective APY degrade as capital grows, helping curators and large deployers find the sweet spot (max capital with acceptable impact) and the exhaustion point (where APY collapses).

Two modes: "pt_buy" (default): Measures PT swap impact via Curve get_dy(). Shows how much capital can be deployed as a directional PT buyer before slippage degrades APY. "lp_add": Measures LP deposit impact. LP deposits add liquidity to BOTH sides of the pool, deepening it rather than consuming it. Impact is near-zero for balanced deposits. Shows pool share concentration and post-deposit pool depth. USE THIS MODE for MetaVault curator capacity analysis — curators deploy as LP.

Each tier is quoted independently (not cumulative). Real execution across multiple txns would face additional impact from pool state changes.

Output surfaces a capacity framing note: pt_buy mode measures directional swap impact, but MetaVault curators deploy as LP where entry impact is near-zero and the constraint is pool share concentration. Use lp_add mode for curator capacity analysis.

On-chain quotes use the actual Curve StableSwap-NG amplification parameter. Set use_on_chain=false for math-only estimates (faster, more conservative).

Use spectra_quote_trade for a single exact quote at a specific amount. Use spectra_scan_opportunities for capital-aware ranking across all pools. Use mv_check_ibt_health to verify the underlying IBT before deploying.

Inputs: chain (required), pt_address (required), steps, max_capital_usd, +2 more.

spectra_get_pool_volumeA

Get historical trading volume for a specific Spectra pool. Returns timestamped buy/sell volume in USD. Use spectra_list_pools first to find pool addresses. Useful for assessing pool activity and liquidity depth before entering a position.

Context: Volume alone doesn't indicate capital efficiency — $1M volume in a $5M liquidity pool is very different from $1M in a $500K pool. Combine volume data with pool liquidity (from spectra_list_pools or spectra_get_pt_details) to assess real trading conditions.

Output includes volume/liquidity ratio analysis when pool data is available. For individual transaction details and whale activity, use spectra_get_pool_activity instead. Use spectra_quote_trade to estimate price impact for a specific trade size.

Inputs: chain (required), pool_address (required).

spectra_get_portfolioA

Get wallet positions on Spectra for a specific address. Returns PT, YT, and LP balances with USD values, claimable yield, and current rates. Queries a single chain or all chains. Use this to understand what a wallet currently holds on Spectra.

Also fetches unclaimed Merkl rewards (SPECTRA gauge emissions and other incentive programs) per position. Merkl rewards are best-effort — if the Merkl API is unavailable, the portfolio still displays without reward data.

Protocol context:

  • Depositing IBT always mints BOTH PT and YT in equal amounts. If a wallet holds YT but no PT, it sold or LPed its PT. If it holds PT but no YT, it sold its YT.

  • PT + YT = 1 underlying at maturity. This identity is fundamental to all strategies.

  • Balance ratios are the key signal. Output shows Position Shape (e.g., "YT/PT 4:1") so you can reason about what the holder's position implies given the mechanics above.

  • When investigating a strategy, ALWAYS cross-reference portfolio with spectra_get_pool_activity. Activity shows the HOW (transaction patterns), portfolio shows the WHAT (resulting position). Neither alone tells the full story.

  • Strategies often span multiple wallets. If spectra_get_pool_activity shows concentrated activity from several addresses, check each one to build the full picture.

  • For activity analysis, use spectra_get_pool_activity with the address parameter — it will automatically cross-reference portfolio data and provide flow accounting, contract detection, gas estimates, and pool impact analysis.

  • Use spectra_get_address_activity to scan all pools for an address's activity in one call.

Inputs: address (required), chain.

spectra_get_protocol_statsA

Get Spectra protocol-wide statistics: SPECTRA token supply, circulating supply, current weekly emissions, rebase formula, and general protocol info. Use this for questions about SPECTRA tokenomics or protocol health.

Protocol context:

  • Rebase distributes additional SPECTRA to veSPECTRA holders. The formula is highly non-linear: (veSPECTRA/totalSPECTRA)^3. At 10% lock rate, rebase captures ~0.1% of emissions. At 50% lock rate, rebase captures ~12.5%. This incentivizes high ve participation.

  • Weekly emissions decay exponentially and eventually stabilize.

  • Gauge emissions boost LP APY across all pools (see LP APY breakdown in pool tools).

Use spectra_get_ve_info for live veSPECTRA data and boost calculations.

Inputs: no named parameters.

spectra_get_pt_detailsA

Get detailed information about a specific Spectra Principal Token (PT). Returns: maturity date, TVL, implied APY, PT/YT prices, pool liquidity, LP APY breakdown, underlying asset info, IBT protocol, yield leverage, pool reserves (IBT/PT amounts), maturity redemption value, points program multipliers, asset tags, and base IBT info.

Protocol context:

  • PT trades at a discount to its underlying (the discount IS the fixed yield). At maturity, PT redeems for the maturityValue shown (may differ from 1:1).

  • PT + YT = 1 underlying at maturity. YT price = 1 - PT price (in underlying terms).

  • YT leverage shows how much yield exposure 1 unit of YT provides relative to holding the underlying directly. Higher leverage = more amplified yield exposure.

  • IBT APR breakdown shows organic yield vs external incentive programs. High APR from incentives alone may not be sustainable.

Includes external Merkl campaign APR when available.

Output surfaces conditional competing interpretations when data is ambiguous — e.g., PT above par, skewed reserves, high APY with thin liquidity, or incentive-dominated APR. These appear only when triggered by the specific data returned.

Use spectra_compare_yield to compare fixed vs. variable rates. Use spectra_get_looping_strategy to calculate leveraged fixed yield via Morpho. Use spectra_get_portfolio to check wallet holdings. Use spectra_get_pool_activity to see trading patterns on this pool.

Inputs: chain (required), pt_address (required).

spectra_get_ve_infoA

Get live veSPECTRA governance token information and compute boost scenarios.

Reads the current veSPECTRA total supply from Base chain on-chain, and given your balance + a specific pool, computes your exact boost multiplier.

The Spectra boost formula: B = min(2.5, 1.5 * (v/V) * (D/d) + 1) v = your veSPECTRA balance V = total veSPECTRA supply (read live from Base) D = pool TVL d = your deposit size Full 2.5x boost when: v/V >= d/D (your share of votes >= your share of pool)

Useful for understanding how much veSPECTRA you need for max boost in a given pool at a given deposit size.

Inputs: wallet_address, ve_spectra_balance, capital_usd, chain, +1 more.

spectra_get_yield_curveA

Show the yield curve (term structure) for a given underlying asset across all chains.

Fetches all active Spectra PTs matching the underlying (e.g., "USDC", "ETH"), sorts by maturity, and displays implied APY at each point on the curve.

This is the fixed-income view: "What rate can I lock for 30 days vs 90 days vs 180 days?" Helps curators spot term premium anomalies, compare cross-chain rates at similar maturities, and choose optimal maturity targets.

Handles symbol variants automatically (USDC.e, WETH, wstETH → normalized).

Use spectra_get_pt_details or mv_check_ibt_health to drill into a specific maturity. Use spectra_get_pool_capacity to check depth at your capital size. Use spectra_compare_yield for fixed-vs-variable analysis on a specific PT.

Inputs: underlying (required), chain, min_tvl_usd, min_liquidity_usd, +1 more.

spectra_list_chainsB

List all blockchain networks supported by Spectra Finance. Use this as a starting point to discover what's available.

Not all chains have identical feature coverage. Morpho looping markets currently exist on mainnet, base, arbitrum, and katana. veSPECTRA governance lives on Base.

Inputs: no named parameters.

spectra_list_expiring_poolsA

Scan all Spectra chains for pools approaching maturity.

Returns pools expiring within the specified threshold (default 21 days / 3 weeks), grouped by urgency level. Designed for operators who need lead time to:

  • Create follow-up pools with new maturities

  • Submit gauge proposals for successor pools

  • Plan LP migration and rollover strategies

  • Coordinate with IBT protocol teams

Each result includes the PT address, IBT address, chain ID, underlying asset, TVL, and current implied APY — everything needed to plan the successor pool.

Automatically cross-references each expiring pool's IBT against all active pools to flag whether a successor pool (same IBT, later maturity) already exists or needs to be created.

Gauge status is fetched from the governance voting-incentives API. A pool address present in that endpoint has a gauge (even if it currently has 0 votes / 0 emissions). Gauge API failure is best-effort — gauge status shows as unknown, does not block results.

Per-pool readiness assessment combines successor status, gauge status, and timing: OK: Successor deployed with gauge and seeded CAUTION: Successor exists but missing gauge or low TVL; or no successor but >7d runway WARNING: No successor and ≤7d; or successor without gauge and ≤14d

Urgency (time-based) and readiness (action-based) are independent dimensions. A pool can be ALERT urgency (21d runway) but WARNING readiness (no successor at all). The Operator Checklist section groups required actions by type:

  • Deploy successor pool: IBTs with no active successor

  • Submit gauge proposal: successors that exist but lack a gauge

  • Ready for migration: successors with gauge and adequate TVL

Urgency levels: CRITICAL (≤7 days): Immediate action required WARNING (≤14 days): Start preparations now ALERT (≤21+ days): Plan ahead

Set include_expired=true to also show recently matured pools (if the API returns them). By default only active (non-expired) pools are shown.

Use mv_plan_rollover on a specific MetaVault for automated rollover candidate discovery. Use spectra_get_yield_curve to see what maturities already exist for the same underlying. Use spectra_list_pools to check if a successor pool has already been created.

Inputs: threshold_days, chain, min_tvl_usd, compact.

spectra_list_metavaultsA

List live MetaVaults from the Spectra API.

MetaVaults are ERC-7540 curated vaults that automate LP rollover and compound YT yield back into LP positions. They are managed by curators who earn performance fees on depositor yield.

Returns all MetaVaults with:

  • Curator info, TVL (with unallocated ratio when >5% undeployed, computed AFTER subtracting external positions so avant/pendle externals aren't mislabeled as idle)

  • Live APY breakdown + 30d avg (when available)

  • Active Spectra LP positions (PT markets the vault is deployed in)

  • External Positions: value held OUTSIDE Spectra LP (avant avUSDx-burn redemption-in-flight, pendle LP on other protocols). Surfaced per-protocol with graceful fallback for unknown protocols. This field is UNDOCUMENTED by Spectra — shape is inferred from observed data and may change.

  • Cross-chain module whitelist (remote.{chainId}.modules) showing enabled protocols per foreign chain (e.g., avant/parallel on Avalanche)

  • Status flag (VISIBLE / HIDDEN) — HIDDEN vaults are surfaced here but filtered out in the Spectra UI; the compact listing does not prefix the name with a status label (detail view only)

  • Underlying asset details

  • Vault flows: epoch-by-epoch deposit/withdrawal analysis

  • Bridge transactions: cross-chain CCTP transfers

  • Epoch history (rate snapshots)

Use this tool to discover which MetaVaults are live, then pass the address to spectra_model_metavault for detailed strategy modeling or spectra_get_curator_dashboard for the full operational view with action items.

To investigate curator activity (LP adds/removes, rebalancing), use spectra_get_address_activity on the curator's EOA address — MetaVault operations go through the Spectra Router, so the vault contract address won't appear in pool activity data.

When verify_onchain=true (off by default), each MetaVault gets a compact chain-truth summary line probed via the same engine that powers spectra_get_curator_dashboard. Useful for cross-chain triage when the dashboard isn't pre-rendered. Chain-read failures degrade to a [chain-truth ✗] line per MV — they NEVER abort the rest of the list. Concurrency is capped at 6 simultaneous reads to avoid RPC rate limits.

Inputs: chain, verify_onchain.

spectra_list_poolsA

List all active Spectra pools on a given chain. Returns a summary of each pool including: asset name, maturity, TVL, implied APY, LP APY, pool liquidity, pool reserves (IBT/PT amounts with ratio), IBT APR breakdown (organic vs incentive yield), maturity redemption value, points multipliers, and asset tags.

Metric definitions used across all Spectra tools:

  • PT TVL = value of underlying deposited to mint PTs (pt.tvl in API)

  • Liquidity = AMM pool depth (IBT + PT both sides of the Curve pool, pool.liquidity in API)

  • Implied APY = annualized fixed rate from buying PT at discount

  • IBT APR = variable rate on the underlying vault (labeled APR, not compounded)

Each pool is a Curve StableSwap-NG AMM pair of IBT and PT. LP APY is the yield from providing liquidity to the pool (fees + gauge emissions).

Set include_expired=true to also show recently matured pools (if the API returns them). By default only active (non-expired) pools are shown.

Includes external Merkl campaign APR when available. Output surfaces conditional competing interpretations when data is ambiguous (e.g., high APY with thin liquidity).

For multi-chain discovery, use spectra_get_best_fixed_yields (raw APY ranking) or spectra_scan_opportunities (capital-aware with price impact and looping analysis). Use spectra_get_pool_activity on a specific pool to see recent trading patterns.

Inputs: chain (required), sort_by, min_tvl_usd, compact, +1 more.

spectra_model_metavaultA

Model a MetaVault "double loop" strategy for curators.

MetaVaults are ERC-7540 curated vaults that automate LP rollover and compound YT yield back into LP positions. This tool models the economics of leveraging MetaVault shares as collateral on Morpho (or similar lending markets).

Two modes:

  1. Live mode: Provide chain + metavault_address to auto-populate base_apy from the live MetaVault API. All other params can be overridden.

  2. Manual mode: Provide base_apy directly for hypothetical modeling.

The "double loop": Layer 1 (inside vault): YT yield → LP tokens (compounding loop, managed by curator) Layer 2 (on top): MV shares → Morpho collateral → borrow → deposit back (leverage loop)

Because YT compounding raises the base yield, leverage multiplies a higher base — creating a "double loop premium" over raw PT looping.

Dual Morpho Market Strategy: Curators should create TWO Morpho markets for maximum flywheel effect: Market A (PT / underlying): For external users to loop PT. Drives pool volume & LP fees. Market B (MV shares / underlying): For the curator to loop vault shares. Amplifies own capital. These markets reinforce each other — PT demand deepens the pool, deeper pool attracts more loopers, and the curator earns fees on all external deposits flowing through the vault.

Curator economics: The curator EARNS the performance fee on external deposits — this is revenue for managing the vault (rolling positions, compounding YT, maintaining allocations).

Blended allocation: Supports modeling MetaVaults that allocate across both Spectra and Pendle LP positions via pendle_allocation_pct and pendle_lp_apy parameters. Computes blended base APY and warns about manual Pendle rollover requirements.

Inputs: chain, metavault_address, base_apy, yt_compounding_apy, +10 more.

spectra_quote_tradeA

Estimate expected output, price impact, and minimum output for a PT trade. Automatically uses on-chain Curve get_dy() for exact quotes when a public RPC is available for the chain. Falls back to a conservative constant-product math estimate if on-chain quoting fails.

Side: "buy" = spend underlying/IBT to buy PT (e.g. spend USDC-worth to get PT) "sell" = sell PT to receive underlying/IBT

This tool only quotes PT trades on the Curve AMM pool. YT does not trade on the pool directly — YT is acquired by minting (deposit IBT to get PT+YT) or sold via flash-redeem. To estimate YT value: YT price = 1 - PT price in underlying terms.

Returns: expected output amount, spot & effective rates, price impact, and minOut at the specified slippage tolerance. Also includes pool context: IBT/PT reserves with ratio, and IBT APR composition (organic vs incentive yield). The output indicates whether the quote came from on-chain (exact) or math estimate.

On-chain quotes reflect the actual Curve StableSwap-NG amplification parameter and current pool state — significantly more accurate than the math estimate, especially for large trades.

Use spectra_simulate_trade to preview your full portfolio state after this trade (BEFORE / TRADE / AFTER with deltas). Use spectra_compare_yield to evaluate whether the trade makes sense relative to variable rates.

Inputs: chain (required), pt_address (required), amount (required), side (required), +1 more.

spectra_scan_opportunitiesA

Scan all Spectra chains for the best risk-adjusted yield opportunities, sized to your capital.

Unlike spectra_get_best_fixed_yields (which ranks by raw APY), this tool computes:

  • Entry price impact at YOUR capital size (a 50% APY pool with $10K liquidity is useless at $500K)

  • Effective APY after amortizing entry cost over days to maturity

  • Morpho looping availability and optimal leveraged net APY

  • Pool capacity (max capital before price impact exceeds your threshold)

  • IBT APR composition (organic base yield vs external incentive programs)

  • Points program multipliers and asset tags per opportunity

  • External Merkl campaign APR (incentive programs beyond native yield)

  • Risk warnings (low liquidity, short maturity, high impact)

  • MetaVault alternatives (curated auto-rolling LP vaults with YT compounding)

Returns opportunities ranked by effective APY (or looping net APY where available). Ranking logic: when a profitable Morpho looping market exists, ranks by looping net APY with cumulative entry cost amortized; otherwise ranks by effective APY (base APY minus annualized entry cost).

MetaVaults are shown in a separate section (not interleaved with PT rankings) because they have different risk profiles: variable APY, curator-managed, auto-rolling positions. Set include_metavaults=false to skip MetaVault scanning.

NOTE: This scans Spectra pools only. For broader coverage including Pendle markets, use mv_scan_curator_opportunities — it includes both protocols and may surface significantly more opportunities, especially at smaller capital sizes.

Effective APY is a conservative lower bound (constant-product impact model). Real Curve StableSwap-NG pools are more capital-efficient. Verify top picks with spectra_quote_trade().

Output includes conditional competing interpretations when rankings are ambiguous — e.g., thin-liquidity pools dominating the ranking, or MetaVaults with high idle ratios.

Use spectra_get_looping_strategy to drill into a specific opportunity's leverage details. Use spectra_get_pool_activity and spectra_get_portfolio to investigate trading patterns and positions. Use spectra_model_metavault to model MetaVault looping economics.

Inputs: capital_usd (required), asset_filter, min_tvl_usd, min_liquidity_usd, +7 more.

spectra_scan_yt_arbitrageA

Scan all Spectra chains for YT (Yield Token) arbitrage opportunities.

Compares the IBT's actual current variable APR against the rate implied by the YT's market price. When these diverge significantly, an arbitrage opportunity may exist:

  • Positive spread (IBT APR > YT implied rate): IBT earns more than the YT price implies

  • Negative spread (IBT APR < YT implied rate): IBT earns less than the YT price implies

Returns opportunities sorted by absolute spread, with capital-aware entry sizing, break-even analysis, IBT APR composition (organic base yield vs external incentive programs — critical for assessing whether the spread is driven by sustainable yield), and external Merkl campaign APR when available.

Execution mechanics:

  • Buying YT: The Spectra Router can flash-mint (flash-borrow IBT → mint PT+YT → sell PT on pool → user covers shortfall → user receives YT). This appears as SELL_PT in pool activity. Alternatively, minting IBT → PT+YT and selling PT separately.

  • Selling YT: The Router flash-redeems (borrow IBT → buy PT from pool → burn PT+YT → repay → profit). This appears as BUY_PT in pool activity. The Curve pool does NOT trade YT directly.

  • Break-even assumes the spread persists. Real variable rates fluctuate — spreads can close quickly. The break-even period is the minimum time needed, not a guarantee.

Use spectra_compare_yield for a detailed fixed-vs-variable breakdown on a specific pool. Use spectra_get_pool_activity to monitor recent trading patterns in the target pool.

Inputs: capital_usd (required), min_spread_pct, asset_filter, min_tvl_usd, +5 more.

spectra_simulate_tradeA

Preview what a wallet's Spectra portfolio would look like after a PT trade.

Fetches the wallet's current position (if any) and the PT pool data, computes a trade quote, then shows BEFORE / TRADE / AFTER with deltas.

Works even if the wallet has no existing position (simulates a new entry). Side: "buy" = acquire PT, "sell" = dispose PT.

Note: This simulates PT trades only, not YT. YT is acquired by minting (deposit IBT to get PT+YT) and sold via the Router's flash-redeem mechanism, not through the Curve pool directly. The wallet's YT balance is shown but not modified by this simulation.

Use spectra_get_portfolio to see current full positions. Use spectra_quote_trade for a standalone price quote without portfolio context.

Inputs: chain (required), pt_address (required), address (required), amount (required), +2 more.

spectra_stress_test_vaultA

Simulate a large redemption on a MetaVault to assess withdrawal liquidity.

Builds a liquidity waterfall — sources of cash ordered by cost: Tier 1: Unallocated Cash (undeployed, no external — instant, no cost) Tier 1b: Avant Redemption Queue (avUSDx → avUSD burn, ~1 week cooldown per Avant docs, no price impact — emitted only when avant external positions exist; EXCLUDED from within-epoch max-safe calculation due to the delay, INCLUDED in the separate within-1-week metric) Tier 2: Naturally maturing Spectra LP positions (no cost, time-dependent) Tier 3: LP removal from Curve/Pendle pools (low-medium impact) Tier 4: PT sale on Curve pool (higher impact)

Note: "Unallocated" replaces the old "Idle" label. External positions (avant burn, pendle LP) are NOT counted in Tier 1 — they surface as Tier 1b (avant) or are excluded from all tiers (pendle external, conservative error mode).

Computes total coverage, cost to remaining depositors, and maximum safe redemption size (< 1% loss to remaining holders).

ERC-7540 constraint: once redemption is requested, the vault MUST fulfill it. There is no cancelRequest. This makes withdrawal liquidity critical.

Use spectra_get_curator_dashboard for operational overview before stress testing. Use spectra_get_pool_capacity to assess individual pool depth. Use morpho_monitor_risk for Morpho position risk.

Inputs: chain (required), metavault_address (required), redemption_pct, market_stress, +1 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 56 tools

    Disambiguation5/5

    Tools are clearly organized by protocol (spectra_, pendle_, morpho_, mv_) with distinct purposes. Even similar-sounding tools like spectra_scan_opportunities and pendle_scan_opportunities are well-differentiated by the protocol they target and their descriptions.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with protocol prefixes (e.g., spectra_list_pools, pendle_get_market_details). Naming is uniform and predictable, making it easy for agents to understand tool purpose from name alone.

    Tool Count2/5

    With 56 tools, the server is significantly over the typical 3-15 range for a well-scoped server. While the domain is complex, this many tools risks overwhelming agents and suggests the tool surface could be consolidated.

    Completeness5/5

    The tool set covers all major operations across Spectra, Pendle, Morpho, and MetaVaults: listing, details, quotes, portfolio, activity, history, strategies, risk, governance, and cross-protocol analysis. No obvious gaps for the intended yield optimization and risk management use case.

    Maintenance

    ActivityInactive
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Financial intelligence for AI agents. 31 tools across 8 data sources — regime, derivatives, stablecoin flows, momentum, volatility, macro, DeFi, weather patterns, political cycles, seasonality. The context layer between your agent and a bad trade.
      31
      21 npm
      9
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Exposes Solana DeFi infrastructure — Percolator perpetuals, Sigma derivatives, Exodus yield vaults, Veil privacy swaps, Stratum orderbooks, and Sovereign identity — to AI agents via the Model Context Protocol.
      311,836 npm
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Enables AI agents to discover verifiable DeFi yield opportunities, generate algorithmic portfolio plans, and track cryptographic proof receipts, bridging LLMs with blockchain yield protocols.
      9
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to monitor stablecoin yields, balances, and rewards across Aave, Morpho, and Euler on multiple EVM chains, and to deposit, withdraw, or rebalance positions via user-signed transactions.
      MIT