@supernova123/defillama-mcp-server 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +94 -59
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,49 +1,51 @@
1
1
  # DeFi Llama MCP Server
2
2
 
3
- > An MCP server for [DeFi Llama](https://defillama.com)connect any MCP-compatible client to free DeFi protocol data.
3
+ > Free DeFi data for AI assistantsTVL, yields, stablecoins, bridges, DEX volumes, and protocol fees via [DeFi Llama](https://defillama.com).
4
4
 
5
5
  [![MCP Compatible](https://img.shields.io/badge/MCP-compatible-blueviolet)](https://modelcontextprotocol.io)
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-blue)](https://www.typescriptlang.org/)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
8
+ [![npm](https://img.shields.io/npm/v/@supernova123/defillama-mcp-server)](https://www.npmjs.com/package/@supernova123/defillama-mcp-server)
8
9
 
9
10
  ## What is this?
10
11
 
11
- An [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that gives AI assistants and agents access to DeFi Llama's free DeFi data API — protocol TVL, chain TVL, yield pools, stablecoins, cross-chain bridges, DEX volumes, and protocol fees — through natural language.
12
+ An [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that gives AI assistants access to [DeFi Llama](https://defillama.com)'s comprehensive free DeFi data — protocol TVL, yield rates, stablecoin stats, bridge volumes, DEX activity, and protocol fees.
12
13
 
13
- Use it with **Claude Desktop**, **Cursor**, **Windsurf**, **Cline**, **Continue**, or any MCP-compatible client to ask questions about DeFi protocols, track TVL movements, compare yields, and explore the on-chain economy.
14
+ Use it with **Claude Desktop**, **Cursor**, **Windsurf**, **Cline**, **Continue**, or any MCP-compatible client to query on-chain data, compare protocols, and analyze DeFi trends through natural language.
14
15
 
15
16
  ## Why use this?
16
17
 
17
- - **No API key required** — DeFi Llama is a free public API
18
- - **8 built-in tools** — covers the most common DeFi data queries
19
- - **Clean markdown output** — results read naturally in chat
20
- - **Rate-limited automatically** — polite 500ms throttle across all endpoints
18
+ - **No API key required** — DeFi Llama's API is free and open
19
+ - **8 built-in tools** — covers the most important DeFi data queries
20
+ - **Clean formatted output** — TVL as `$1.2B`, yields as `+4.52%`, easy to read
21
+ - **Rate-limited automatically** — polite 500ms spacing between calls
22
+ - **No wallet connection needed** — reads public data only, no transactions
21
23
 
22
24
  ## Tools
23
25
 
24
26
  | Tool | Description |
25
27
  |------|-------------|
26
- | `search_protocols` | Search DeFi protocols by name — returns top results with TVL, chains, category |
27
- | `get_protocol_tvl` | Get detailed TVL breakdown for a specific protocol (chain distribution, history, description) |
28
- | `get_tvl_by_chain` | Get total TVL for a specific chain (Ethereum, Arbitrum, Base, Solana, etc.) |
29
- | `get_yields` | Get yield/APY data for lending pools and staking, filter by chain / project / min TVL |
30
- | `get_stablecoins` | Get stablecoin market cap data and rankings |
31
- | `get_bridges` | Get cross-chain bridge TVL and volume data |
32
- | `get_dex_volumes` | Get DEX trading volumes across chains |
33
- | `get_protocol_fees` | Get protocol fee and revenue data |
28
+ | `search_protocols` | Search for DeFi protocols by name |
29
+ | `get_protocol_tvl` | Get detailed TVL breakdown for a protocol (chains, history, category) |
30
+ | `get_tvl_by_chain` | Get total TVL for each blockchain |
31
+ | `get_yields` | Get current yield rates across pools (APY, TVL, chain) |
32
+ | `get_stablecoins` | Get stablecoin stats (market cap, peg, chain distribution) |
33
+ | `get_bridges` | Get bridge volume and TVL data |
34
+ | `get_dex_volumes` | Get DEX trading volumes |
35
+ | `get_protocol_fees` | Get protocol fee revenue data |
34
36
 
35
37
  ## Quick Start
36
38
 
37
39
  ### 1. Install
38
40
 
39
41
  ```bash
40
- npm install -g defillama-mcp-server
42
+ npm install -g @supernova123/defillama-mcp-server
41
43
  ```
42
44
 
43
45
  Or run directly with npx:
44
46
 
45
47
  ```bash
46
- npx -y defillama-mcp-server
48
+ npx -y @supernova123/defillama-mcp-server
47
49
  ```
48
50
 
49
51
  ### 2. Configure your MCP client
@@ -55,7 +57,7 @@ Add to your MCP client config (e.g. `claude_desktop_config.json`):
55
57
  "mcpServers": {
56
58
  "defillama": {
57
59
  "command": "npx",
58
- "args": ["-y", "defillama-mcp-server"]
60
+ "args": ["-y", "@supernova123/defillama-mcp-server"]
59
61
  }
60
62
  }
61
63
  }
@@ -77,75 +79,108 @@ Or with global install:
77
79
 
78
80
  Ask your AI assistant things like:
79
81
 
80
- - "What are the top DeFi protocols by TVL on Ethereum?"
81
- - "Search for Aave and show me the chain breakdown"
82
- - "What's the total TVL on Arbitrum?"
83
- - "Show me the highest yield stablecoin pools on Base with at least $10M TVL"
84
- - "List the top 5 stablecoins by market cap"
82
+ - "What's the current TVL of Aave?"
83
+ - "Which chains have the highest TVL?"
84
+ - "Show me the top 10 yield pools by APY"
85
+ - "What are the biggest stablecoins by market cap?"
86
+ - "How much volume did Uniswap handle this week?"
85
87
  - "Which bridges have the most TVL?"
86
- - "Show me DEX trading volumes for the last 24h"
87
- - "What are the protocols with the most fees?"
88
+ - "What are the highest-fee protocols in DeFi?"
89
+ - "Compare the TVL of Lido vs Rocket Pool"
90
+
91
+ ## Use Cases
92
+
93
+ ### Portfolio Research
94
+
95
+ Query protocol-specific data before making investment decisions:
96
+
97
+ - "What's Aave's TVL breakdown by chain?"
98
+ - "How has MakerDAO's TVL changed over time?"
99
+ - "What category is Pendle in and what's its TVL?"
100
+
101
+ ### Yield Farming
102
+
103
+ Find the best yield opportunities across DeFi:
104
+
105
+ - "What are the top 5 stablecoin yield pools?"
106
+ - "Show me ETH staking yields above 4%"
107
+ - "Which pools on Arbitrum have the highest APY?"
108
+
109
+ ### Market Intelligence
110
+
111
+ Track DeFi trends and competition:
112
+
113
+ - "Which DEX had the highest volume last month?"
114
+ - "How much are the top protocols earning in fees?"
115
+ - "What's the total stablecoin market cap?"
116
+
117
+ ### Chain Analysis
118
+
119
+ Compare blockchain ecosystems:
120
+
121
+ - "How does Solana's TVL compare to Ethereum?"
122
+ - "Which chain has the most bridge inflows?"
123
+ - "What's the TVL distribution across all chains?"
88
124
 
89
125
  ## Example Output
90
126
 
91
- ### `search_protocols`
127
+ ### `get_protocol_tvl`
92
128
 
93
129
  ```
94
- Top 5 protocols matching "aave" (by TVL):
95
-
96
- - **Aave** (AAVE) — TVL: $12.45B | Category: Lending | Chains: Ethereum, Arbitrum, Polygon, Base, Optimism, +6 | Slug: `aave`
97
- - **Aave v2** (AAVE) — TVL: $4.20B | Category: Lending | Chains: Ethereum, Polygon, Avalanche | Slug: `aave-v2`
98
- - **Aave v3** (AAVE) — TVL: $8.10B | Category: Lending | Chains: Ethereum, Arbitrum, Polygon, Base, Optimism | Slug: `aave-v3`
130
+ Protocol: Aave
131
+ Category: Lending
132
+ Description: Decentralized lending & borrowing protocol
133
+
134
+ TVL by Chain:
135
+ Ethereum: $12.4B
136
+ Polygon: $892M
137
+ Arbitrum: $2.1B
138
+ Optimism: $645M
139
+ Avalanche: $312M
140
+ ...
141
+
142
+ Total TVL: $16.3B
99
143
  ```
100
144
 
101
145
  ### `get_yields`
102
146
 
103
147
  ```
104
- Top 5 yield pools (chain: Ethereum | min TVL: $10.00M | min APY: 0%):
148
+ Top Yield Pools:
105
149
 
106
- - **Lido** stETH on Ethereum 🟢 | APY: 3.42% (3.42% base) | TVL: $23.45B
107
- - **Aave v3** — USDC on Ethereum 🟢 | APY: 4.85% (1.50% base + 3.35% reward) | TVL: $1.85B
108
- - **Compound v3** — USDC on Ethereum 🟢 | APY: 5.12% (3.20% base + 1.92% reward) | TVL: $890.45M
150
+ | Pool | Chain | Project | APY | TVL | Category |
151
+ |------|-------|---------|-----|-----|----------|
152
+ | USDC-Eth | Ethereum | Convex | 12.4% | $45M | Yield |
153
+ | stETH | Ethereum | Lido | 3.8% | $14.2B | Liquid Staking |
154
+ | USDT | Tron | JustLend | 8.2% | $580M | Lending |
109
155
  ```
110
156
 
111
- ### `get_tvl_by_chain`
157
+ ### `get_stablecoins`
112
158
 
113
159
  ```
114
- Ethereum — Chain TVL
115
-
116
- - **Total TVL:** $115.32B
117
- - **Native Token:** ETH
118
- - **CoinGecko ID:** ethereum
119
-
120
- ### Top Tokens by TVL
121
- - **ETH** (Ether): $67.23B
122
- - **USDC** (USD Coin): $4.12B
123
- - **USDT** (Tether): $3.45B
124
- - **WBTC** (Wrapped BTC): $2.89B
125
- - **WSTETH** (Wrapped stETH): $2.34B
160
+ Stablecoin Market:
161
+
162
+ | Name | Symbol | Peg | Market Cap | Chains |
163
+ |------|--------|-----|------------|--------|
164
+ | Tether | USDT | $1.00 | $112B | 12 |
165
+ | USD Coin | USDC | $1.00 | $34B | 8 |
166
+ | DAI | DAI | $1.00 | $5.3B | 1 |
126
167
  ```
127
168
 
128
169
  ## Requirements
129
170
 
130
171
  - Node.js 18+
131
- - No API key needed (DeFi Llama is a free public API)
172
+ - No API key needed (DeFi Llama API is free)
132
173
 
133
174
  ## Rate Limits
134
175
 
135
- DeFi Llama doesn't publish hard rate limits, but the server automatically throttles requests to ~2 calls/second (500ms minimum interval) to be a polite citizen. The `/protocols` and `/pools` endpoints are large (multi-MB), so the throttle also helps avoid unnecessary load.
136
-
137
- ## Data Sources
138
-
139
- - **Protocols & TVL:** `https://api.llama.fi`
140
- - **Yields:** `https://yields.llama.fi`
141
- - **Stablecoins:** `https://stablecoins.llama.fi`
176
+ The server automatically spaces requests 500ms apart to respect DeFi Llama's API. No hard rate limits are published, but this conservative spacing handles heavy use without issues.
142
177
 
143
- All endpoints are free and require no authentication. Full API documentation: https://defillama.com/docs/api
178
+ ## Contributing
144
179
 
145
- ## Development
180
+ Contributions welcome. The server wraps DeFi Llama's public API, so adding new tools means mapping new endpoints.
146
181
 
147
182
  ```bash
148
- git clone https://github.com/nova/defillama-mcp-server.git
183
+ git clone https://github.com/friendlygeorge/defillama-mcp-server.git
149
184
  cd defillama-mcp-server
150
185
  npm install
151
186
  npm run build
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova123/defillama-mcp-server",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "MCP server for DeFi Llama — free DeFi TVL, yields, stablecoins, bridges, DEX, and fee data for AI assistants",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",