If you're a developer, analyst, or enthusiast working with the Solana blockchain, you know how complex transaction data can be. Manually parsing instructions and decoding on-chain data is time-consuming and difficult.
This article will show you how to connect the sol-mcp (Model Context Protocol) server directly to your AI assistant, such as Claude, using its command-line tool. This server acts as a powerful "translator," giving your AI the ability to parse and analyze any Solana transaction in real-time.
Best of all? No complex local installation is required.
Part 1: "Installation" (The 30-Second Setup)
This is the best part: the sol-mcp server is already hosted and available for you to use. You don't need to clone the repository, install dependencies, or run a local server.
Your one and only setup step is to get the server endpoint URL.
MCP Server Endpoint:https://solmcp.daog1.workers.dev/
That's it. Keep this URL handy for the next step.
Part 2: Connecting sol-mcp to Your AI Model (like Claude)
Connecting sol-mcp to Claude is a straightforward process that uses the Claude CLI (Command Line Interface). This method securely registers the server and your personal API key.
Step 1: Get Your Personal API Key
Before you can add the server, you need to get your unique API key.
- Go to the
sol-mcpserver homepage:https://solmcp.daog1.workers.dev/ - Log in with your GitHub account.
- Once authenticated, the site will provide you with your personal API key (it will look something like
sol-xxxxxxxx...). - Copy this key and keep it handy for the next step.
Step 2: Add the MCP Server via Command Line
Now, open your terminal and use the following command to add the sol-mcp server to your Claude configuration.
Make sure to replace YOUR_PERSONAL_API_KEY with the actual key you just copied.
claude mcp add --transport http solana-mcp https://solmcp.daog1.workers.dev/mcp --header "x-api-key: YOUR_PERSONAL_API_KEY"
Let's quickly break down that command:
-
claude mcp add: The standard command to add a new MCP server. -
solana-mcp: This is the local name you're giving the server (you can change this, butsolana-mcpis a good, clear name). -
https://.../mcp: This is the specific API endpoint for the server. -
--header "x-api-key: ...": This is how you securely send your personal API key to authenticate your requests.
Step 3: Start Analyzing!
That's it! Claude now has the sol-mcp server registered as a tool. You can immediately start asking it to analyze transactions, just as shown in Part 3.
Part 3: How to Use It (The Fun Part)
Now that your AI is connected, you can use natural language to perform a deep-dive analysis of Solana transactions. The sol-mcp server has equipped your AI with several new functions, including:
-
get_solana_transaction: Fetches and analyzes a full transaction, including all instructions and balance changes. -
analyze_solana_instruction: Dives into one specific instruction within a transaction. -
analyze_instruction_data: Decodes raw instruction data (hex or base64) using over 1,000 known program IDLs. -
get_account_data_with_parsing: Retrieves and parses account data based on its owner.
Example Queries:
You can now ask your AI assistant (e.g., in the Claude chat) directly.
Analyze a Full Transaction:
You: “do a comprehensive analysis on this TX
4Aio58jGweCVUHxUAjGq5bzTCTkFJVSC7iP1yFoFA6Qh7GbbJsCV8Ef6RuYFaTwA5azhjR7eY22DXYVWV7Sv29BLwith subcalls"
Your AI will now call the multiple functions such as get_solana_transaction get_program_subcalls analyze_solana_instruction, process the JSON output, and give you a human-readable summary of the entire transaction, including what programs were called, what functions were executed, and what the parameters were:
🔍 Comprehensive Transaction Analysis
Basic Information
- Signature: 4Aio58jGweCVUHxUAjGq5bzTCTkFJVSC7iP1yFoFA6Qh7GbbJsCV8Ef6RuYFaTwA5azhjR7eY22DXYVWV7Sv29BL
- Status: ✅ Successfully executed
- Block: 372374425 (2025-10-10T04:50:17.000Z)
- Fee: 0.000005 SOL (5,000 lamports)
- Total Compute Units: 160,715
---
🔄 Transaction Flow Analysis
Phase 1: Setup & Configuration
1. Compute Budget Configuration - Set compute limit to 160,715 units
2. Associated Token Account Creation - Created ATA for intermediate token handling
3. Custom Program Initialization - Interaction with unknown program 2badCgdN...
Phase 2: Multi-Hop Arbitrage Execution
The transaction executed a sophisticated round-trip arbitrage through Jupiter's DEX aggregator:
Leg 1: SOL → Intermediate Token (Raydium)
- Input: 21,172,611 lamports (0.021172611 SOL)
- Output: 32,446,774,528,742 units of intermediate token (7hWc...18Fy3)
- Program: Raydium AMM (675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8)
Leg 2: Intermediate Token → SOL (Orca Whirlpool)
- Input: 32,446,774,528,742 intermediate tokens
- Output: 21,197,804 lamports (0.021197804 SOL)
- Program: Orca Whirlpool (whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc)
Phase 3: Cleanup & Settlement
1. Account Closure - Temporary token account closed
2. Profit Distribution - Net profit transferred to beneficiary
---
📊 Financial Analysis
Balance Changes:
- FkdDHrM8j8psKbxuwjV1jBKCM2JGPygkj7WCX8sSCzNm: -0.000010654 SOL (initiator)
- H6YtZBn9wjEoZM96ZVPgNQVwzqBCn3QteviZXSzKkWb: +0.000025193 SOL (beneficiary)
- 96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5: +0.000005654 SOL (fee recipient)
- Ftf9Xc2jTJ2CaX9YojviUeGPPdq1pkoqSgwdwD3h6hnt: +0.021172611 SOL (funding source)
Arbitrage Result:
- Investment: 0.021172611 SOL
- Return: 0.021197804 SOL
- Net Profit: 0.000025193 SOL (~0.12% gain)
- Platform Fee: 0.000005654 SOL
● Inner Instructions & Subcalls Analysis
Jupiter V6 Subcalls:
- Raydium Swap: Executed through 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8
- Orca Whirlpool Swap: Executed through whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc
- Token Program Calls: Multiple SPL token transfers and account operations
Custom Program Activity:
- Unknown Program: 2badCgdNVD1fa7saBy8qgtztARRgGG9Vhky1Bk4vwtSZ handled routing logic
- Profit Logging: Program logged "Profit: 25193" (25,193 lamports)
---
🔒 Security & Risk Analysis
Positive Indicators:
✅ Proper Account Management - Temporary accounts correctly created and closed✅ Standard AMM Usage - Utilized
established Raydium and Orca pools✅ Transparent Execution - All operations logged and traceable✅ Minimal
Slippage - 0 slippage tolerance indicates precise execution
Risk Considerations:
⚠️ Unknown Program Interaction - Custom program 2badCgdN... lacks public documentation⚠️ High-Frequency Trading
Pattern - Suggests bot/algorithmic trading activity⚠️ Profit Concentration - Single beneficiary receives all
profits
Transaction Efficiency:
- Compute Utilization: 160,715 units (moderate complexity)
- Execution Speed: Single transaction execution
- Cost Efficiency: Low fees relative to profit margin
● 🎯 Conclusion
This transaction represents a sophisticated arbitrage strategy executed through Jupiter's DEX aggregation
protocol. The key findings are:
1. Multi-Hop Arbitrage: Successfully exploited price discrepancies between Raydium and Orca AMMs
2. Profit Generation: Net gain of 0.000025193 SOL (~0.12% return)
3. Technical Sophistication: Utilized custom routing logic and proper account management
4. Security Profile: Generally safe execution with standard AMM interactions
The transaction demonstrates advanced DeFi trading strategies on Solana, leveraging Jupiter's aggregation
capabilities to capture arbitrage opportunities across multiple liquidity pools in a single atomic transaction.
You've successfully integrated a powerful blockchain analysis engine directly into your development workflow, turning your AI assistant into a true Solana expert.
Top comments (0)