Get the FREE Ultimate OpenClaw Setup Guide →

Solana-DeFi-Analytics

MCP server from kirtiraj22/Solana-DeFi-Analytics-MCP-Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio kirtiraj22-solana-defi-analytics-mcp-server node build/index.js \
  --env SOLANA_RPC_URL="your_rpc_url_here"

How to use

Solana DeFi Analytics MCP Server provides comprehensive analytics and insights for Solana wallets and their DeFi activities. It exposes tools to fetch wallet activity, analyze DeFi behavior, and retrieve detailed transaction information, with support for a range of DeFi protocols such as Raydium, Orca, Jupiter, Marinade, Serum DEX V3, Solend, Mango Markets, FluxBeam, and Metaplex NFTs. Use these capabilities to generate risk profiles, track DeFi positions, and receive strategy recommendations tailored to a wallet's activity. The server is designed to be integrated into the MCP ecosystem and can be invoked by MCP clients to obtain structured analytics useful for wallet intelligence and DeFi strategy planning.

Available tools:

  • fetchWalletActivity: Retrieves detailed transaction history for a Solana wallet address. Accepts an address and an optional limit (default 20). Use to build a timeline of on-chain activity and protocol interactions.
  • analyzeWallet: Performs comprehensive analysis of a wallet’s DeFi activity and generates recommendations. Accepts an address and returns insights such as patterns, risk indicators, and suggested strategies.
  • getTransactionDetails: Provides detailed information about a specific Solana transaction by its signature. Use to inspect individual transactions for granular analytics.

To use these tools, provide the required input payloads (e.g., wallet addresses or signatures) through the MCP interface, and parse the structured responses for visualization, reporting, or decision support within your application.

How to install

Prerequisites:

  • Node.js (LTS) and pnpm installed on your system
  • Git for cloning the repository
  • Access to a Solana RPC endpoint (RSRPC) for SOLANA_RPC_URL

Step-by-step installation:

  1. Clone the repository: git clone https://github.com/kirtiraj22/Solana-DeFi-Analytics-MCP-Server cd solana-mcp

  2. Install dependencies: pnpm install

  3. Configure environment variables: cp .env.example .env

    Edit .env and set SOLANA_RPC_URL to your RPC endpoint

  4. Start the MCP server (development mode): pnpm run dev

  5. Build and test via MCP Inspector (optional): pnpm build npx @modelcontextprotocol/inspector node build/index.js

Notes:

  • Ensure your SOLANA_RPC_URL is reachable and has sufficient rate limits for your expected workload.
  • The server expects environment configuration via .env; you can also pass variables directly in the mcp_config.env section if using containerized deployments.
  • For Claude Desktop client integration, you can reference the provided example in claude_desktop_config.json from the repository documentation.

Additional notes

Tips:

  • If you encounter RPC timeouts, consider using a resilient RPC provider or multiple endpoints with a failover strategy.
  • Ensure that your environment supports TypeScript compilation; the build artifacts should be generated before runtime if required by your deployment.
  • Validate that the MCP Inspector is compatible with your MCP version when testing with the inspector tool.
  • The server currently exposes three tools; for new capabilities, follow the project structure guidance in src/ and register new tools under src/tools/.
  • If deploying in production, consider securing the SOLANA_RPC_URL and other sensitive configuration via secret management and environment injection in your deployment platform.

Related MCP Servers

Sponsor this space

Reach thousands of developers