A Model Context Protocol (MCP) server that provides comprehensive analytics and insights for Solana wallets and their DeFi activities.
- Wallet Activity Analysis: Track and analyze transaction history, patterns, and behaviors
- DeFi Position Tracking: Monitor staking, lending, and liquidity positions across protocols
- Risk Profiling: Assess wallet risk profiles based on transaction patterns
- Strategy Recommendations: Get personalized DeFi strategy suggestions
- Transaction Details: Detailed breakdown and analysis of individual transactions
- Raydium (Swap)
- Orca (Swap)
- Jupiter (Aggregator)
- Marinade (Staking)
- Serum DEX V3
- Solend (Lending)
- Mango Markets
- FluxBeam
- Metaplex (NFTs)
Retrieves detailed transaction history for a Solana wallet address.
{
address: string,
limit?: number // default: 20
}
Performs comprehensive analysis of a wallet's DeFi activity and generates recommendations.
{
address: string
}
Provides detailed information about a specific Solana transaction.
{
signature: string
}
- Clone the repository:
git clone https://github.com/kirtiraj22/Solana-DeFi-Analytics-MCP-Server
cd solana-mcp
- Install dependencies:
pnpm install
- Set up environment variables:
cp .env.example .env
Configure the following variables in .env
:
SOLANA_RPC_URL=your_rpc_url_here
Start the MCP server:
pnpm run dev
To Test via the MCP Inspector run the following commands:
pnpm build
npx @modelcontextprotocol/inspector node build/index.js
{
"mcpServers": {
"filesystem": {
"command": "node",
"args": [
"<PROJECT_PATHL>\\solana-mcp\\build\\index.js"
],
"env": {
"SOLANA_RPC_URL": "<YOUR_SOLANA_RPC_URL>"
}
}
}
}
src/
├── analyzers/ # Analysis logic for patterns, DeFi positions, etc.
├── config/ # Configuration constants and settings
├── formatters/ # Output formatting for different types of data
├── services/ # Core services for blockchain interaction
├── tools/ # MCP tool implementations
├── types/ # TypeScript interfaces and types
└── utils/ # Utility functions and helpers
- Transaction history tracking
- Protocol interaction analysis
- Risk profile assessment
- Portfolio diversification scoring
- Favorite protocol identification
- Active staking positions
- Lending positions
- Liquidity provisions
- Trading statistics
- Dollar-cost averaging detection
- Yield farming patterns
- Trading behavior analysis
- Protocol usage patterns
- Trading frequency monitoring
- Protocol diversity evaluation
- Security considerations
- Create new analyzers in
src/analyzers/
- Add formatters in
src/formatters/
- Implement services in
src/services/
- Register new tools in
src/tools/