Observed since 21 Oct, 09:36 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
@0xprotovox/deficlaw
DeFi MCP Server for Claude Code — token analysis, prices, trending, holder intelligence
The first open-source DeFi MCP server for Claude Code.
Analyze any token in seconds. Holder intelligence, risk scoring, smart money tracking, KOL detection, slippage estimation, contract security. Zero API keys required.
> "analyze Jupiter token"
JUP is a 2.2y old Meteora token with $1.2M liquidity and $525.1M market cap.
Top 5 wallets control 61.5% of supply, very concentrated.
30 diamond hands among holders, decent conviction.
Contract looks safe: mint and freeze authorities revoked.
10 KOLs tracked: 5 holding, 5 selling.
Risk: 18/100 [LOW]
VERDICT: NEUTRAL — Mixed signals: 2 bull vs 2 bear.
Sources: dexscreener + gmgn + solana-rpc | 1.1s
Claude Code can write code, fix bugs, deploy apps. But ask it "what's the price of BONK?" and it says "I don't have real-time data."
deficlaw fixes that. 9 tools, 3 data sources, zero config.
| Feature | Details |
|---|---|
| Token Analysis | Holder intelligence, risk scoring, KOL tracking, actionable verdicts |
| Real-time Prices | Sub-second lookups across Solana, Ethereum, Base, BSC, Arbitrum |
| Trending Tokens | Volume, liquidity, and boost data from DexScreener |
| New Launches | Recently created tokens with age, mcap, liquidity |
| Top Traders | Who made and lost money on any token with PnL breakdown |
| Token Search | Find any token by name or symbol across all chains |
| Slippage Estimation | Jupiter-based price impact for $50-$1000 buys |
| Token Comparison | Side-by-side analysis of two tokens |
| Contract Security | Mint/freeze authority, supply checks on Solana |
npm install -g @0xprotovox/deficlaw
claude mcp add defi -- deficlaw
That's it. No API keys, no config files, no accounts needed.
git clone https://github.com/0xprotovox/deficlaw.git
cd deficlaw && npm install && npm run build
claude mcp add defi -- node /path/to/deficlaw/dist/index.js
Once installed, just type naturally in Claude Code:
> what's the price of BONK?
> price of JUP
> how much is SOL right now?
> analyze token JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN
> deep analyze BONK
> is this token safe? EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
> quick analyze So11111...
> give me a quick look at this token
> search for BONK
> what's trending on solana?
> show new launches on solana in the last 30 minutes
> who profited on this token?
> compare JUP vs BONK
> estimate slippage for buying this token
> is this token contract safe?
analyze_tokenFull token analysis with holder intelligence, risk scoring, and human-readable summary.
| Parameter | Type | Default | Description |
|---|---|---|---|
address | string | required | Token contract address |
chain | string | "solana" | Blockchain (solana, ethereum, bsc, base, arbitrum) |
include_holders | boolean | true | Include GMGN holder analysis |
quick | boolean | false | Quick mode: skip holders, price/market/risk only (<1s) |
compact | boolean | false | Compact response: summary, price, risk, top 5 holders only |
Returns: Token info, price (5m/1h/6h/24h), market data (mcap, fdv, volume, liquidity), contract security, risk score (0-100), holder concentration, holder categories (diamond hands, snipers, KOLs, fresh wallets, insiders, smart money), buy/sell pressure, dev wallet status, top 20 holders with PnL, KOL list, socials, actionable verdict (BUY/SELL/NEUTRAL/AVOID).
get_priceSub-second price lookup. Accepts both addresses and name/symbol searches.
| Parameter | Type | Default | Description |
|---|---|---|---|
token | string | required | Token address or search query |
chain | string | "solana" | Blockchain |
search_tokenSearch tokens by name or symbol across all chains.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | Token name or symbol (e.g. "BONK", "Jupiter") |
chain | string | all | Filter by chain |
limit | number | 10 | Results to return (1-20) |
get_trendingTrending and boosted tokens with price enrichment.
| Parameter | Type | Default | Description |
|---|---|---|---|
chain | string | "solana" | Blockchain |
limit | number | 20 | Number of tokens (1-50) |
get_new_launchesRecently created tokens sorted by creation time.
| Parameter | Type | Default | Description |
|---|---|---|---|
chain | string | "solana" | Blockchain |
max_age_minutes | number | 60 | Max token age in minutes (5-1440) |
limit | number | 20 | Tokens to return (1-50) |
get_top_tradersWho made and lost money on a token. Shows winners and losers with PnL, tags, and Twitter handles.
| Parameter | Type | Default | Description |
|---|---|---|---|
address | string | required | Token contract address |
limit | number | 10 | Number of top winners/losers (1-50) |
estimate_slippageJupiter-based price impact estimation for $50, $100, $500, $1000 buys. Solana only.
| Parameter | Type | Default | Description |
|---|---|---|---|
address | string | required | Solana token mint address |
compare_tokensSide-by-side comparison of two tokens: price, mcap, volume, liquidity, age, holders.
| Parameter | Type | Default | Description |
|---|---|---|---|
address_a | string | required | First token address |
address_b | string | required | Second token address |
chain | string | "solana" | Blockchain |
get_token_securityQuick contract security check. Solana only.
| Parameter | Type | Default | Description |
|---|---|---|---|
address | string | required | Solana token mint address |
Returns: Mint authority status, freeze authority status, total supply, decimals, and a SAFE/CAUTION/DANGEROUS verdict.
Claude Code
|
| MCP stdio
v
+------------------+
| deficlaw |
| MCP Server |
| |
| +-- Cache ----+ | +--------------+
| | TTL-based | | ---> | DexScreener | prices, volume,
| | in-memory | | | (free API) | liquidity, pairs
| +-------------+ | +--------------+
| |
| +-- Risk ----+ | +--------------+
| | 8-dimension | | ---> | GMGN | holders, KOLs,
| | scorer | | | (curl/PW) | tags, PnL
| +-------------+ | +--------------+
| |
| +-- Summary --+ | +--------------+
| | Rule-based | | ---> | Solana RPC | mint/freeze auth,
| | generator | | | (free) | supply, LP detect
| +-------------+ | +--------------+
| |
| +-- Jupiter --+ | +--------------+
| | Quote API | | ---> | Jupiter | slippage quotes,
| | client | | | (free API) | route planning
| +-------------+ | +--------------+
+------------------+
Key design decisions:
Benchmarked on real tokens (BONK), averaged across multiple runs:
| Operation | Time | Notes |
|---|---|---|
get_price | ~54ms | Cached: near-instant |
search_token | ~340ms | DexScreener search API |
analyze_token (quick) | ~410ms | Price + market + risk, no holders |
analyze_token (full) | ~1.1-1.5s | All sources: DexScreener + GMGN + Solana RPC |
get_token_security | ~300ms | Single Solana RPC call |
estimate_slippage | ~500ms | 4 Jupiter quotes in parallel |
The composite risk scorer analyzes 8 dimensions to produce a 0-100 score:
| # | Dimension | Max Points | What It Checks |
|---|---|---|---|
| 1 | Liquidity | 22 | Pool depth in USD. <$1K = critical, <$5K = extreme, <$25K = high |
| 2 | Token Age | 10 | Time since pair creation. <1h = critical, <6h = high, <24h = medium |
| 3 | Volume Anomalies | 8 | Vol/mcap ratio for wash trading signals. >5x = suspicious |
| 4 | Holder Concentration | 18 | Top 10 holder supply %. >60% = critical, >40% = high |
| 5 | Dev Wallet | 15 | Dev holdings % and selling behavior. >20% = rug risk |
| 6 | Fresh Wallets | 12 | New wallet % among holders. >40% = likely bundled/wash |
| 7 | Sniper Activity | 10 | Bot/sniper/sandwich wallets in top holders |
| 8 | Contract Security | 5 | Mint authority (3pts) + freeze authority (2pts) |
Risk Levels:
| Level | Score Range | Meaning |
|---|---|---|
| LOW | 0-19 | Few concerns, safer relative to peers |
| MEDIUM | 20-44 | Some concerns, do your own research |
| HIGH | 45-69 | Multiple red flags, elevated caution |
| CRITICAL | 70-100 | Extreme risk, likely scam or rug-pull |
All environment variables are optional. deficlaw works out of the box with zero config.
| Variable | Default | Description |
|---|---|---|
SOLANA_RPC_URL | https://api.mainnet-beta.solana.com | Custom Solana RPC endpoint (use a private RPC for better reliability) |
DEFICLAW_CACHE_TTL | 120000 (2 min) | GMGN holder cache TTL in milliseconds |
DEFICLAW_PRICE_CACHE_TTL | 30000 (30s) | Price cache TTL in milliseconds |
DEBUG | (unset) | Set to deficlaw to enable debug logging to stderr |
Add to your project's .mcp.json:
{
"mcpServers": {
"defi": {
"command": "npx",
"args": ["-y", "@0xprotovox/deficlaw"]
}
}
}
{
"mcpServers": {
"defi": {
"command": "npx",
"args": ["-y", "@0xprotovox/deficlaw"],
"env": {
"SOLANA_RPC_URL": "https://your-rpc.com",
"DEFICLAW_CACHE_TTL": "120000",
"DEFICLAW_PRICE_CACHE_TTL": "30000",
"DEBUG": "deficlaw"
}
}
}
}
Prices and trending work on all DexScreener-supported chains: Solana, Ethereum, Base, BSC, Arbitrum, Polygon, Avalanche, Optimism, Fantom, and more.
Holder analysis (GMGN) currently supports Solana tokens.
Slippage estimation (Jupiter) supports Solana tokens.
Contributions welcome! Here's how:
git checkout -b feature/my-feature)npx tsc --noEmit passes with zero errorsnpm test) to verify nothing regressedDevelopment setup:
git clone https://github.com/0xprotovox/deficlaw.git
cd deficlaw
npm install
npm run build # compile TypeScript
npm test # run speed benchmarks
npm run dev # run from source with tsx
MIT
@0xprotovox - Twitter | GitHub
20 years building software. Now building AI trading agents and DeFi tools.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
zodEnvironment{
"local_name": "zod",
"alias": false,
"peer_metadata": null
} | ^3.23.0 | runtime |
@modelcontextprotocol/sdkEnvironment{
"local_name": "@modelcontextprotocol/sdk",
"alias": false,
"peer_metadata": null
} | ^1.27.1 | runtime |
tsxEnvironment{
"local_name": "tsx",
"alias": false,
"peer_metadata": null
} | ^4.19.0 | development |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^5.5.0 | development |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^22.0.0 | development |
playwrightEnvironment{
"local_name": "playwright",
"alias": false,
"peer_metadata": {
"optional": true
}
} | ^1.58.2 | peer |
Source distribution
{
"shasum": "de472246f3c1c2e6f73fe67fd2dfbd5c40846459",
"tarball": "https://registry.npmjs.org/@0xprotovox/deficlaw/-/deficlaw-0.6.0.tgz",
"fileCount": 68,
"integrity": "sha512-t3qIshumcAzrt8R+/OVWdx98LwfmCnyZSHYT6g+WtPcGD8jWowI6U5Y4VnUq8FOW39URPxIYEe40ZddLdv5/Fg==",
"signatures": [
{
"sig": "MEQCIFI2qdNjzZQYwhu3gySUm1g15cGhuUM/Vj7BE5qjmemRAiBJtALov1krAUk+t8kFPs0OeKWSuLFrHdxhSZmNuXoBuQ==",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 272370
}Observed since 21 Oct, 09:36 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:7188970ae16f4a20d565e9af6be68385ac2b84bc75dfd9f10d097ebb04ef0618