Skip to main content
Glama
lendwise-fi

lendwise

by lendwise-fi

@lendwise/mcp

Unified view for lending markets. One standard.

MCP server for Lendwise — compare and optimize DeFi supply/borrow markets across Aave V3, Morpho, Compound V3 and Blend (Stellar) over live yield data.

It answers questions like "I have $1,000 to place in DeFi for the next 6 months — what are the best markets?" against real yield data, in about four tool calls.

Read-only. It compares markets; it never signs a transaction.

Install

Hosted (Streamable HTTP)

Point any MCP client at https://mcp.lendwise.fi/mcp — nothing to install. With Claude Code:

claude mcp add --transport http lendwise https://mcp.lendwise.fi/mcp

Local (stdio)

// claude_desktop_config.json / .mcp.json
{
  "mcpServers": {
    "lendwise": {
      "command": "npx",
      "args": ["-y", "@lendwise/mcp"]
    }
  }
}

No API key. The server holds no secrets — it speaks only HTTPS to the public Lendwise API.

Related MCP server: YieldOracle

Tools

tool

what it's for

list_market_universe

Every asset, chain and protocol that actually exists, with counts. Call this first — it's what stops an agent guessing a filter value that isn't there.

find_best_markets

Current supply markets ranked by net APY. Filtering and sorting happen server-side. Defaults to ≥ $1M TVL.

get_market_details

One market in full: protocol metadata, collaterals, APY split into base / rewards / fees.

get_market_history

Daily net-APY series plus mean / stddev / min / max — the stability signal a long horizon needs.

optimize_allocation

Split an amount across markets at a target diversification. Returns per-market amounts, blended APY, projected 6-month yield.

Why the TVL floor exists

find_best_markets defaults to minTvlUsd: 1_000_000. In a thin market a headline APY is mostly noise, and steering someone with $1k into one is the most plausible real-world harm this server can do. Lower it deliberately, not by accident.

Why get_market_history returns statistics, not just a series

A snapshot cannot tell a durable 6% from a 12% that is a reward programme ending next week. A 180-day standard deviation can. That is the number a 6-month decision actually turns on.

Configuration

env var

default

purpose

LENDWISE_API_URL

https://lendwise.fi

Point at http://localhost:3000 to develop against a local lendwise/web.

LENDWISE_INTEGRATION

unset

Set to 1 to run the network integration tests.

Development

pnpm install
pnpm typecheck
pnpm test                                   # unit tests, hermetic
LENDWISE_INTEGRATION=1 pnpm test            # + live API tests
pnpm build

The one invariant to not break

The optimizer's contract is positional: we send apy: number[], it returns vault_index — an offset into the array we sent, not an id. If the array we build and the array we map back through ever disagree, the server confidently attributes a real allocation to the wrong market, and every number still looks plausible.

Order is therefore established exactly once, from the caller's productIds, and both directions run off that single array (buildApyVectormapAllocations in src/core/optimizer.ts). It is pinned by unit tests in both directions. Do not "simplify" it into a lookup by APY value.

Rate limits

The upstream API allows 60 GraphQL req/min/IP and 10 optimizer req/min/IP. A 429 is surfaced as an explicitly retryable error carrying retryAfterSeconds — back off, don't retry-storm.

Not financial advice

Informational only. APYs are variable and historical yields do not predict future returns.

License

MIT

Available Tools

2 tools
list_market_universeList the market universeA
Read-onlyIdempotent

List every asset, chain and protocol that Lendwise actually tracks, with market counts. Call this FIRST — the filter values for find_best_markets must come from here, not from memory.

ParametersJSON Schema
NameRequiredDescriptionDefault
kindNoWhich side of the market to enumerate.supply

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, and non-destructive behavior. The description adds context about returning market counts and being the source for filter values, complementing annotations without contradicting them.

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

Conciseness5/5

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

Two sentences, each serving a distinct purpose: first describes what the tool does, second gives critical usage guidance. No fluff or wasted words.

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

Completeness4/5

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

For a simple tool with one optional parameter and no output schema, the description is adequate. It explains purpose and usage context, though it could explicitly differentiate from the sibling tool 'optimize_allocation'.

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

Parameters3/5

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

Input schema has 100% coverage for the single parameter 'kind', including a description and enum. The tool description does not add additional parameter-specific information beyond what the schema provides, so baseline score applies.

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

Purpose5/5

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

The description clearly states it lists every asset, chain, and protocol tracked by Lendwise with market counts. It distinguishes itself from the sibling 'optimize_allocation' by indicating this tool is for enumeration, not optimization.

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

Usage Guidelines5/5

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

Explicitly instructs 'Call this FIRST' and explains that filter values for find_best_markets must come from this tool, not from memory. This provides clear context on when to use it versus other tools.

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

optimize_allocationOptimize an allocationA
Read-onlyIdempotent

Split an amount across chosen markets to maximise yield at a target diversification, returning per-market amounts, the blended APY and a projected 6-month yield.

ParametersJSON Schema
NameRequiredDescriptionDefault
amountUsdYesTotal amount to allocate, in USD.
productIdsYesMarkets to allocate across, from find_best_markets. Order is not significant to you, but is preserved internally.
diversificationNoTarget diversification score. 80 = highly diversified, 0 = concentrate everything in the highest yield.

TDQS

A4/5.0
Behavior4/5

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

Annotations already provide strong safety hints (readOnlyHint, idempotentHint, destructiveHint false), so the description's burden is lower. The description adds behavioral context beyond annotations by specifying what is returned (per-market amounts, blended APY, 6-month yield), which informs the agent about result structure. No contradictions.

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

Conciseness5/5

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

The description is a single sentence that efficiently conveys the tool's purpose, inputs, and outputs. It is front-loaded and contains no fluff. Every part serves a purpose.

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

Completeness4/5

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

Given the tool's complexity (3 parameters, no output schema, but with annotations), the description adequately explains what the tool does and what it returns. It does not cover edge cases or algorithmic details, but for a read-only optimization tool, the essential information is present. Could mention that the result is a simulation, but overall sufficient.

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

Parameters3/5

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

Schema coverage is 100%, meaning all parameters are documented in the schema. The description does not add significant meaning beyond the schema; it only briefly mentions 'maximise yield' and 'target diversification', which align with schema descriptions. Baseline of 3 is appropriate.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Split an amount across chosen markets to maximise yield at a target diversification, returning per-market amounts, the blended APY and a projected 6-month yield.' It uses a specific verb (split/optimize) and resource (allocation), and distinguishes from sibling 'list_market_universe' which lists markets rather than optimizing an allocation.

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

Usage Guidelines3/5

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

The description implies the tool is used for optimizing yield given a diversification target, but it does not explicitly state when to use it versus the sibling tool 'list_market_universe' or provide when-not-to-use or alternative guidance. The usage context is implied but not clarified.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.3
    • First observedlist_market_universe
    • First observedoptimize_allocation

TDQS

A3.9/5.0
Disambiguation5/5

Both tools have distinct purposes: one lists available markets, the other optimizes allocation. There is no ambiguity between them.

Naming Consistency5/5

Both tool names follow a consistent verb_noun snake_case pattern: list_market_universe and optimize_allocation.

Tool Count2/5

Only 2 tools for a domain like yield optimization feels insufficient. The scope may be narrow, but typically more tools (e.g., for execution, historical data) would be expected.

Completeness2/5

The server lacks tools for executing allocations, retrieving market details, or managing portfolios. Significant gaps exist for practical use.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    MCP server that exposes unified AI-friendly tools over Messari's standardized lending subgraphs on The Graph. One natural-language query → fan out across 40+ lending protocols on multiple chains → get back structured, comparable data.
    19
    18
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Cross-chain DeFi intelligence MCP server for AI agents. 7 tools for yield discovery, pool analysis, profit simulation, risk scoring, whale tracking, impermanent loss calculation, and DeFi overview across 86 chains and 6,500+ liquidity pools.
    7
    1
    AGPL 3.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lendwise-fi/lendwise-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server