@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.
- package/README.md +94 -59
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,49 +1,51 @@
|
|
|
1
1
|
# DeFi Llama MCP Server
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Free DeFi data for AI assistants — TVL, yields, stablecoins, bridges, DEX volumes, and protocol fees via [DeFi Llama](https://defillama.com).
|
|
4
4
|
|
|
5
5
|
[](https://modelcontextprotocol.io)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
7
|
[](LICENSE)
|
|
8
|
+
[](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
|
|
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
|
|
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
|
|
18
|
-
- **8 built-in tools** — covers the most
|
|
19
|
-
- **Clean
|
|
20
|
-
- **Rate-limited automatically** — polite 500ms
|
|
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
|
|
27
|
-
| `get_protocol_tvl` | Get detailed TVL breakdown for a
|
|
28
|
-
| `get_tvl_by_chain` | Get total TVL for
|
|
29
|
-
| `get_yields` | Get yield
|
|
30
|
-
| `get_stablecoins` | Get stablecoin market cap
|
|
31
|
-
| `get_bridges` | Get
|
|
32
|
-
| `get_dex_volumes` | Get DEX trading volumes
|
|
33
|
-
| `get_protocol_fees` | Get protocol fee
|
|
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
|
|
81
|
-
- "
|
|
82
|
-
- "
|
|
83
|
-
- "
|
|
84
|
-
- "
|
|
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
|
-
- "
|
|
87
|
-
- "
|
|
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
|
-
### `
|
|
127
|
+
### `get_protocol_tvl`
|
|
92
128
|
|
|
93
129
|
```
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
|
148
|
+
Top Yield Pools:
|
|
105
149
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
-
### `
|
|
157
|
+
### `get_stablecoins`
|
|
112
158
|
|
|
113
159
|
```
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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
|
|
172
|
+
- No API key needed (DeFi Llama API is free)
|
|
132
173
|
|
|
133
174
|
## Rate Limits
|
|
134
175
|
|
|
135
|
-
|
|
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
|
-
|
|
178
|
+
## Contributing
|
|
144
179
|
|
|
145
|
-
|
|
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/
|
|
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.
|
|
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",
|