
Spectra Mcp Server
io.github.Finanzgoblin由 GitHub 帳號 Finanzgoblin 發布v1.0.0更新於 Oct 24, 2026
Spectra Finance MCP server: yield discovery, PT/YT, looping, Morpho, 10 chains
發布方自己的服務:Spectra
概覽
針對 Spectra、Pendle 與 Morpho 的唯讀收益情報服務,涵蓋 10 條以上鏈,讓助理能掃描、報價並模擬固定利率與循環策略。
- 可以做什麼
- 提供約 55 個唯讀工具,涵蓋 Spectra Finance、Pendle 與 Morpho:發掘固定利率收益機會、檢視 PT/YT 部位與資金池、比較固定與浮動收益,並依即時借款利率建模槓桿循環。它可鏈上報價 PT 交易、模擬交易前後的投資組合狀態、追蹤錢包與 Merkl 獎勵,並對應含治理加成在內的跨協議部位。歷史資金池活動可透過鏈上日誌回溯。
- 適用情境
- 適合助理研究或比較鏈上收益策略時使用,例如尋找最佳固定利率機會、依資金規模評估進場衝擊、檢查 IBT 健康狀況,或規劃到期滾動與 MetaVault 配置。它僅供分析,因此更適合研究與規劃,而非實際執行交易。
- 執行需求
- 以 stdio 方式在本機執行,通常透過 npx 或全域 npm 安裝,需要 Node.js 環境。未宣告任何 API 金鑰或環境變數;它會存取 Spectra、Pendle、Morpho、Merkl 的公開端點以及各鏈 RPC,因此需要網路連線。查詢歷史日誌時可自行提供 RPC 網址。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Spectra Mcp Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
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_getLogswhen 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.
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
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_portfolioafter 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_PTevent 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_portfoliowithout needing a block explorer. - Discovery tools warn about capital-awareness gaps.
spectra_get_best_fixed_yieldsexplicitly says "this ranks by raw APY — usespectra_scan_opportunitiesfor 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:
- Call
mv_scan_curator_opportunities— see cross-protocol (Spectra + Pendle) yield rankings with capital-aware metrics - Call
spectra_get_pool_activity— see trading patterns with ⚠ hints about ambiguous events - Call
spectra_get_portfolioandpendle_get_portfolioon flagged addresses — see Position Shape across both protocols - Read the cross-reference nudges — compose its own analytical workflow spanning all three protocols
- 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
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_ESTIMATESper-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 GraphQLmorphoBluequeries 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:
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_addressto auto-fetch the vault's live APY asbase_apy. All other parameters (borrow rate, LTV, curator fee) can still be overridden. - Manual mode: Provide
base_apydirectly for hypothetical or pre-launch modeling.
The "double loop" economics:
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
Install from npm (recommended)
Or run directly without installing:
Install from source
Connect to Claude Desktop
Add to your claude_desktop_config.json:
Restart Claude Desktop. You'll see all 55 tools (Spectra, Pendle, Morpho, cross-protocol) available.
Connect to Claude Code
Deep Analysis Prompts
The more context you give upfront, the deeper the agent can go. Each input unlocks a different tool chain:
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
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.
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()andfetchMorpho()returnPromise<unknown>(notPromise<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 | nullto match actual API behavior — prevents silentNaNpropagation - 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 usesamountToBigInt()(string arithmetic) to avoid precision loss whenamount * 10^decimalsexceedsMAX_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
BigIntarithmetic to avoid floating-point precision loss on 18-decimal raw values (e.g.,860000000000000000→0.86exactly) - 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, andUND_ERR_SOCKETerrors - 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:
firstparameter capped atmin(addresses * 3, 500)to avoid GraphQL response limits - On-chain quoting: Curve
get_dy()via raweth_callon 8 chains with automatic fallback to math estimate on RPC failure - IBT health checks: ERC-4626
convertToAssets()via raweth_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. Dynamicrpc_urlparameter enables any chain without hardcoded RPCs - Contract detection cache: Permanent
Mapcache foreth_getCoderesults (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: trueso 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 beforeprocess.exit()on SIGTERM/SIGINT
Testing
From a source checkout:
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_getLogsaddress filtering misses - MetaVault data integrity — curator info, TVL, APY, vault flows, expired position flagging
- Expired pool discovery —
spectra_list_poolsreturns 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_metavaultsflag 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:
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)
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=50estimate. - 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_urlparameter — 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_blockorlookback_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_detailsfor price context
Composability with existing tools:
Extending
Following the Open Emergence Pattern
When adding new tools, follow the three-layer architecture:
- 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.
- 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.
- 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.
- Resource (Layer 1): If the new tool introduces fundamental protocol concepts not covered by existing resources, update
spectra-overviewinindex.ts. - 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 tokensGET /v1/watch-tower/{network}/transactions-- Conditional order dataGET /v1/{network}/metavaults/bridge/transactions-- MetaVault cross-chain bridge transaction data (bridged volume, in-flight amounts)
License
MIT
來源:README.md,提交 f397452
工具
0版本歷史
1- v1.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
