Solana Extension
MCP server: Solana Extension
Installation
npx solana-extensionAsk AI about Solana Extension
Powered by Claude Β· Grounded in docs
I know everything about Solana Extension. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Solana AI Assistant
A browser extension that provides AI-powered transaction analysis and chat functionality for Solscan transaction pages, using a true MCP (Model Context Protocol) architecture.
Features
- π€ AI Transaction Summary: Gemini AI automatically analyzes Solana transactions and generates multi-language summaries
- π¬ Smart Chat: Chat with AI assistant to understand transaction details in depth
- π MCP Integration: AI directly calls sol-mcp tools through Model Context Protocol
- π― Precise Targeting: Only activates on Solscan transaction pages (
/tx/*) - π Multi-language Support: Supports Chinese, English, Japanese, Korean
- β‘ Tool Calling: AI can intelligently call blockchain data retrieval tools
Screenshots
AI Transaction Analysis

AI-powered transaction analysis panel showing detailed blockchain insights
AI Chat Interface

Interactive chat with AI assistant for transaction questions
AI Toolbar

Extension toolbar with quick access to AI features
Technical Architecture
Browser Extension β Gemini AI (with MCP tools) β MCP Protocol β sol-mcp Server β Blockchain Data
MCP Workflow
- User visits Solscan transaction page
- Extension detects transaction signature
- Configures AI prompts based on user language preferences
- Gemini AI receives analysis request and automatically determines which MCP tools to call
- Gemini calls sol-mcp tools through function calling mechanism to get transaction data
- Extension executes tool calls and returns results to Gemini
- Gemini generates intelligent analysis based on complete data
Fixes Implemented
- β
Use correct
@google/genaipackage (version 1.26.0) - β
Use official
@modelcontextprotocol/sdkfor MCP client implementation - β Fixed Gemini API function calling usage
- β Implemented correct MCP tool calling flow (StreamableHTTP transport)
- β
Use
gemini-2.0-flash-expmodel - β Use chat session to maintain conversation context
- β Support multi-language AI responses
Language Support
- Chinese (zh-CN): Complete Chinese analysis and chat
- English (en-US): Native English responses
- Japanese (ja-JP): Japanese UI and analysis
- Korean (ko-KR): Korean UI and analysis
Installation Steps
1. Download and Build
git clone <repository-url>
cd solana-ai-extension
npm install # Install @google/genai dependencies
npm run build # Use webpack to bundle
2. Load into Chrome
- Open Chrome browser and visit
chrome://extensions/ - Enable "Developer mode" in the top right corner
- Click "Load unpacked extension"
- Select the
solana-ai-extension/distfolder
3. Configure API Keys and Preferences
- Click the extension icon to open the settings page
- Configure the following API keys:
- Gemini API Key: Get from Google AI Studio
- Sol-MCP API Key: For accessing Solana transaction analysis service
- Set response language:
- Chinese
- English
- Japanese
- Korean
Usage
Automatic Analysis
Visit any Solscan transaction page (like https://solscan.io/tx/{signature}), the extension will automatically:
- Detect transaction signature
- Gemini AI calls sol-mcp tools through MCP protocol to get transaction data
- Generate intelligent analysis summary based on complete blockchain data
- Display on the right side of the page
Smart Chat
- Click the chat button π¬ in the bottom right corner of the page
- Or click "Start Chat" in the analysis panel
- Chat with AI assistant and ask transaction-related questions
- AI will automatically call MCP tools to get more data as needed
MCP Tool Support
The extension supports the following sol-mcp tools:
get_solana_transaction: Get complete transaction informationanalyze_solana_instruction: Analyze specific instructionsget_transaction_with_inner_instructions: Get call chain- Other blockchain analysis tools provided by sol-mcp
Technical Architecture
solana-ai-extension/
βββ manifest.json # Extension configuration
βββ popup.html/js/css # Settings page
βββ background.js # Background service (API calls)
βββ content.js/css # Page injection scripts
βββ icons/ # Extension icons
βββ _locales/ # Internationalization
API Integration
Gemini API
- Used to generate transaction analysis and chat responses
- Supports multiple models: gemini-pro, gemini-pro-vision
- Configurable temperature and max tokens
Sol-MCP API
- Get detailed Solana transaction data
- Supports instruction parsing and call chain analysis
- Provides structured transaction information
Development Notes
Replace Icons
Current placeholder icons, please replace with actual PNG files:
icons/icon16.png- 16x16pxicons/icon32.png- 32x32pxicons/icon48.png- 48x48pxicons/icon128.png- 128x128px
Custom Styling
Modify content.css to customize UI appearance and adapt to different themes.
Extend Functionality
New features can be added by modifying these files:
background.js- Add new API integrationscontent.js- Modify page behaviorpopup.html/js- Extend settings options
Privacy & Security
- API keys are stored in browser local storage
- Does not collect or upload user browsing data
- All API calls go through official services
Testing the Extension
Important: Testing Environment Notes
test.html is a standalone HTML file that cannot be opened directly in browser to test Chrome extension APIs. Only pages running in extension context can access chrome.* APIs.
Correct Testing Methods
Method 1: Test through Extension Popup
- After loading extension into Chrome, click extension icon to open settings page
- Test various functions in the settings page
- Use "Verify Settings" button to verify if settings are saved
Method 2: Test through Solscan Page
- Visit any Solscan transaction page, such as:
https://solscan.io/tx/3UchdzqSe8C2HXTXH1fCiZgGiQ72Y4PGV1zBgxnVYwkoka47sCzA9Zs9Hmu8LT3PQMSRTxfeFAX38t2i5FtvCCAJ - Confirm AI analysis panel appears on the right side of the page
- Test chat functionality and API calls
Method 3: Test through Developer Tools
- Press F12 on Solscan page to open developer tools
- Run the following commands in Console to test extension:
// Test extension connection chrome.runtime.sendMessage({ action: 'ping' }).then(response => console.log(response)); // Test settings chrome.storage.sync.get(['geminiApiKey', 'solMcpApiKey']).then(settings => console.log(settings));
Troubleshooting Tests
If connection issues occur:
- Open
chrome://extensions/ - Find the Solana AI Assistant extension
- Click the "Reload" button
- Check the "Errors" section for error information
- Open browser developer tools to view console errors
Troubleshooting
Extension Not Showing
- Confirm you are on Solscan transaction pages (
/tx/*path) - Check if API keys are configured correctly
- View browser console for error messages
API Call Failures
- Verify API key validity
- Check network connection
- Confirm API quota is sufficient
Styling Issues
- Try refreshing the page
- Check for conflicts with other extensions
- Confirm Solscan page structure hasn't changed
Contributing
Welcome to submit Issues and Pull Requests to improve this project.
License
MIT License
