lendwise
OfficialThis server lets you compare, research, and optimize DeFi lending markets read-only across Aave, Morpho, Compound, and Blend.
List every tracked asset, chain, protocol, and market count to discover valid filter values.
Find best supply or borrow markets ranked by net APY, with server-side filters for asset, chain, protocol, collateral, and minimum TVL.
Get full details for a market, including protocol metadata, collaterals, and APY split into base, rewards, and fees.
Retrieve daily net-APY history plus mean, standard deviation, min, and max to assess yield stability over 7–180 days.
Optimize a USD allocation across 2–20 markets at a chosen diversification level, returning per-market amounts, blended APY, and projected 6-month yield.
Provides access to Blend lending markets on Stellar, enabling comparison of supply/borrow yields, market details, historical APY stability, and optimized allocation across Stellar-based markets.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lendwise Optimize $2,000 across top lending protocols for 3 months."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@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/mcpLocal (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: ProfitSpot MCP
Tools
tool | what it's for |
| 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. |
| Current supply markets ranked by net APY. Filtering and sorting happen server-side. Defaults to ≥ $1M TVL. |
| One market in full: protocol metadata, collaterals, APY split into base / rewards / fees. |
| Daily net-APY series plus mean / stddev / min / max — the stability signal a long horizon needs. |
| 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 |
|
| Point at |
| unset | Set to |
Development
pnpm install
pnpm typecheck
pnpm test # unit tests, hermetic
LENDWISE_INTEGRATION=1 pnpm test # + live API tests
pnpm buildThe 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 (buildApyVector → mapAllocations in src/core/optimizer.ts). It is pinned by unit tests in both directions. Do not "simplify" it into a lookup by APY value.
Releasing
Pushing a tag vX.Y.Z publishes @lendwise/mcp@X.Y.Z to npm through
.github/workflows/publish.yml, with OIDC trusted publishing —
no npm token is stored anywhere.
# 1. bump "version" in package.json (e.g. 0.1.5), commit, push to main
# 2. tag that commit with the same version and push the tag
git tag v0.1.5
git push origin v0.1.5Two jobs. build has no permissions: it installs, typechecks, tests, builds and packs the
tarball. publish runs in the npm environment, is the only job allowed to mint the OIDC
token, and only publishes the tarball build produced, with scripts disabled. Dependency code
never runs next to the publish credential.
package.json is the only place the version lives: the server reads the version it reports to
MCP clients from it. The workflow fails before publishing if the tagged commit is not on main
or if the tag does not match package.json. It skips a version already on npm, so re-running a
release is safe.
One-time setup (already needed before the first tag): on npmjs.com, @lendwise/mcp →
Settings → Trusted publishing → GitHub Actions, organization lendwise-fi, repository
lendwise-mcp, workflow publish.yml, environment npm. The npm environment is created on
the first run; add a required reviewer to it in the repository settings to approve each
release by hand.
Hosted deployment
mcp.lendwise.fi is the Vercel function api/mcp.ts, deployed on every push to main.
No packageManager field in package.json (nor devEngines.packageManager). With one,
Vercel installs with its own pnpm 12 (12.2.1, whatever version and hash the field pins), which
installs no dependency on a clean build. With a build cache it reuses stale node_modules
instead: the build passes, but api/mcp.ts compiles as CommonJS (TS2345 in the build log, MCP
SDK dist/cjs vs dist/esm) and the function crashes at load with ERR_REQUIRE_ESM. Every
request then gets a 500 while stdio and the tests still pass. Without the field Vercel uses
pnpm 10, which works. pnpm 12.5.1 is used locally and pinned in the publish workflow.
Setting the project environment variable ENABLE_EXPERIMENTAL_COREPACK=1 should make Vercel
install the exact pinned version through Corepack instead. Untested here.
After switching the package manager either way, redeploy once without build cache: a pnpm 10
install on a cache left by pnpm 12 fails with ERR_PNPM_NO_PKG_MANIFEST.
After any build-config change, check a preview loads: GET /mcp must answer 405, not 500. On
production:
curl -s -X POST https://mcp.lendwise.fi/mcp \
-H 'content-type: application/json' -H 'accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}'
# → "serverInfo":{"name":"lendwise","version":"<package.json version>"}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 toolslist_market_universeList the market universeARead-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.
Inputs: kind.
optimize_allocationOptimize an allocationARead-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.
Inputs: amountUsd (required), productIds (required), diversification.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
Both tools have distinct purposes: one lists available markets, the other optimizes allocation. There is no ambiguity between them.
Both tool names follow a consistent verb_noun snake_case pattern: list_market_universe and optimize_allocation.
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.
The server lacks tools for executing allocations, retrieving market details, or managing portfolios. Significant gaps exist for practical use.
Maintenance
Related MCP Connectors
DeFi Yield Intelligence MCP — 8 tools: 19K+ pools, risk-adjusted APY, RWA yields.
Official Aave MCP for V3 and V4 markets, positions, governance, and transaction preparation.
DefiLlama MCP — TVL, yields, volumes, fees, and protocol analytics for DeFi.
Claude-ready DeFi MCP — risk-scored yields, profit sims & whale tracking across 86 blockchains
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceDeFi Yield Intelligence MCP Server — 8 tools for risk-adjusted APY, stablecoin & RWA yield tracking across 19K+ pools. Part of ToolOracle (tooloracle.io).-
- AlicenseAqualityCmaintenanceCross-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.71AGPL 3.0
- FlicenseNot gradedqualityDmaintenanceAutonomous MCP server for DeFi yield optimization, enabling yield opportunity discovery, treasury snapshots, market signals, and portfolio rebalancing.-

Bitcompare MCP Serverofficial
AlicenseAqualityCmaintenanceThe official crypto yield data MCP server: native Claude access to live and historical crypto lending, savings, staking, borrowing, stablecoin, price, coin metadata, and market data.211MIT