Solana MCP Server

Solana MCP Server

A Model Context Protocol server enabling AI agents to interact with the Solana blockchain for DeFi operations like checking balances, transferring tokens, executing swaps, and fetching price data.

caiovicentino

Database Interaction
AI Integration Systems
Visit Server

README

Solana MCP (Model Context Protocol)

Solana TypeScript DeFi

A powerful Model Context Protocol (MCP) server for AI agents to interact with the Solana blockchain and DeFi protocols.

🚀 Overview

Solana MCP provides a standardized interface for AI agents (like Claude, ChatGPT, etc.) to perform DeFi operations on the Solana blockchain. It bridges the gap between artificial intelligence and decentralized finance, allowing AI systems to:

  • Query wallet balances and token holdings
  • Transfer SOL and SPL tokens
  • Execute token swaps
  • Fetch real-time price data
  • Perform advanced DeFi operations

Built on top of the Solana Agent Kit and the Model Context Protocol (MCP), this tool provides a secure, efficient, and standardized interface for automated DeFi operations.

📋 Prerequisites

  • Node.js v22.x or later
  • npm or yarn package manager
  • Solana wallet (keypair)
  • RPC endpoint for Solana (e.g., Helius, Alchemy, or your own node)

🔧 Installation

  1. Clone this repository:
git clone https://github.com/caiovicentino/Solana-MCP.git
cd Solana-MCP
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory with the following variables:
SOLANA_PRIVATE_KEY=your_private_key_here
RPC_URL=your_rpc_url_here
OPENAI_API_KEY=optional_if_using_openai

⚠️ Security Warning: Never commit your .env file or expose your private key. Add .env to your .gitignore file.

  1. Build the project:
npm run build

🚀 Usage

Start the MCP server:

npm start

When successfully started, you should see:

✅ Connected to Solana
🔗 Using RPC: [your-rpc-endpoint]
👛 Wallet configured: [your-wallet-address]
🚀 Starting Yield AI MCP Server...
📊 Available DeFi actions: 8
✨ Yield AI MCP Server started. Ready to perform DeFi operations on Solana!

💬 Available Actions

The following DeFi actions are available through the MCP server:

Action Description
get_wallet Get the current wallet address
check_balance Check SOL balance of the wallet
transfer_sol Transfer SOL to another wallet
list_tokens List all tokens in the wallet
fetch_price Fetch current price of a token
trade_tokens Execute a trade between tokens
get_tps Get current Solana network TPS
swap_tokens Swap tokens via liquidity pools

🔌 Integration with AI Models

This MCP server is designed to be used with AI models that support the Model Context Protocol. The server uses standard input/output for communication, making it compatible with various AI integration frameworks.

Example of using with Claude:

// Example code for integrating with Claude API
// (Placeholder - actual integration depends on your specific AI framework)

🔒 Security Considerations

  • Always review transactions before they are executed
  • Consider implementing transaction limits
  • Secure your private key with proper key management practices
  • Use a dedicated wallet with limited funds for testing
  • Monitor for any suspicious activities

🛠️ Advanced Configuration

For more advanced configurations, you can modify the following files:

  • src/index.ts: Main entry point
  • .env: Environment configuration

📚 Resources

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
AIO-MCP Server

AIO-MCP Server

🚀 All-in-one MCP server with AI search, RAG, and multi-service integrations (GitLab/Jira/Confluence/YouTube) for AI-enhanced development workflows. Folk from

Featured
Local
Persistent Knowledge Graph

Persistent Knowledge Graph

An implementation of persistent memory for Claude using a local knowledge graph, allowing the AI to remember information about users across conversations with customizable storage location.

Featured
Local
Hyperbrowser MCP Server

Hyperbrowser MCP Server

Welcome to Hyperbrowser, the Internet for AI. Hyperbrowser is the next-generation platform empowering AI agents and enabling effortless, scalable browser automation. Built specifically for AI developers, it eliminates the headaches of local infrastructure and performance bottlenecks, allowing you to

Featured
Local
React MCP

React MCP

react-mcp integrates with Claude Desktop, enabling the creation and modification of React apps based on user prompts

Featured
Local
Atlassian Integration

Atlassian Integration

Model Context Protocol (MCP) server for Atlassian Cloud products (Confluence and Jira). This integration is designed specifically for Atlassian Cloud instances and does not support Atlassian Server or Data Center deployments.

Featured
Any OpenAI Compatible API Integrations

Any OpenAI Compatible API Integrations

Integrate Claude with Any OpenAI SDK Compatible Chat Completion API - OpenAI, Perplexity, Groq, xAI, PyroPrompts and more.

Featured