
Solana-MCP
Servidor Solana MCP
3 years
Works with Finder
2
Github Watches
0
Github Forks
2
Github Stars
Solana Model Context Protocol (MCP)
A comprehensive Solana blockchain interaction server that implements the Model Context Protocol (MCP), optimized for seamless integration with AI tools and interfaces.
What is Model Context Protocol?
Model Context Protocol (MCP) provides a standardized way for AI tools and language models to interact with blockchain data. This implementation allows AI agents to:
- Query Solana blockchain data using natural language
- Access structured token and account information
- Maintain context across multiple interactions
- Perform semantic searches across blockchain transactions
- Generate human-readable explanations of complex blockchain data
Why MCP for AI Integration?
MCP creates a bridge between AI agents and blockchain data, enabling:
- Contextual Understanding: AI models can maintain conversation history and build context about tokens and accounts
- Semantic Queries: Support for natural language processing to translate user queries into blockchain operations
- Structured Responses: Data is returned in standardized formats optimized for AI consumption
- Enhanced Explanations: Complex blockchain concepts are explained in accessible language
Features
- Natural Language Processing: Query blockchain data using everyday language
- Token Analysis: Comprehensive token information and metrics
- Semantic Search: Find transactions and activities based on meaning, not just exact matches
- Context Awareness: Server maintains session state and understands entity relationships
- Solana RPC Integration: Full access to Solana blockchain capabilities
- RESTful API: Easy integration with existing systems
- Docker Support: Simple deployment with containerization
Quick Start with Docker
Option 1: Using Docker Compose
# Clone the repository
git clone https://github.com/omaidf/solana-mcp.git
cd solana-mcp
# Build and start the container
docker-compose up -d
Option 2: Using Docker directly
# Build the Docker image
docker build -t solana-mcp .
# Run the container
docker run -p 8000:8000 solana-mcp
Environment Variables
Customize the server by setting the following environment variables:
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
SOLANA_COMMITMENT=confirmed
SOLANA_TIMEOUT=30
HOST=0.0.0.0
PORT=8000
LOG_LEVEL=INFO
LOG_FORMAT=json
ENVIRONMENT=production
METADATA_CACHE_SIZE=100
METADATA_CACHE_TTL=300
PRICE_CACHE_SIZE=500
PRICE_CACHE_TTL=60
API Endpoints
Core MCP Endpoints
-
GET /health
- Health check endpoint -
GET /version
- Get API version information
Solana Token Analysis
-
GET /token-analysis/analyze/{mint}
- Get comprehensive token analysis -
GET /token-analysis/metadata/{mint}
- Get token metadata -
GET /token-analysis/supply/{mint}
- Get token supply information -
GET /token-analysis/price/{mint}
- Get token price information -
GET /token-analysis/holders/{mint}
- Get token holder information
Natural Language Queries
-
POST /nlp/query
- Submit natural language queries about the Solana blockchain
See API_DOCUMENTATION.md
for complete API documentation.
Development
Prerequisites
- Python 3.9+
- pip
Setup
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -e .
Running locally
python -m solana_mcp.main
The server will be available at http://localhost:8000.
MCP Integration Examples
Python
import httpx
import asyncio
async def get_token_analysis(mint_address):
async with httpx.AsyncClient() as client:
response = await client.get(f"http://localhost:8000/token-analysis/analyze/{mint_address}")
if response.status_code == 200:
return response.json()
else:
raise Exception(f"Error: {response.status_code} - {response.json().get('detail')}")
# Example usage
async def main():
try:
token_data = await get_token_analysis("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v")
print(f"Token name: {token_data['token_name']}")
print(f"Current price: ${token_data['current_price_usd']}")
except Exception as e:
print(f"Failed to get token data: {e}")
if __name__ == "__main__":
asyncio.run(main())
License
See the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Author
Created by omaidf
相关推荐
🔥 1Panel proporciona una interfaz web intuitiva y un servidor MCP para administrar sitios web, archivos, contenedores, bases de datos y LLM en un servidor de Linux.
🧑🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.
⛓️Rulego es un marco de motor de regla de orquestación de componentes de alta generación de alto rendimiento, de alto rendimiento y de alto rendimiento para GO.
Flock es una plataforma de bajo código de flujo de trabajo para construir rápidamente chatbots, trapo y coordinar equipos de múltiples agentes, impulsados por Langgraph, Langchain, Fastapi y Nextjs.
Traducción de papel científico en PDF con formatos preservados - 基于 Ai 完整保留排版的 PDF 文档全文双语翻译 , 支持 支持 支持 支持 支持 支持 支持 支持 支持 支持 支持 支持 等服务 等服务 等服务 提供 提供 提供 提供 提供 提供 提供 提供 提供 提供 提供 提供 cli/mcp/docker/zotero
Plataforma de automatización de flujo de trabajo de código justo con capacidades de IA nativas. Combine el edificio visual con código personalizado, auto-anfitrión o nube, más de 400 integraciones.
Cree fácilmente herramientas y agentes de LLM utilizando funciones Plain Bash/JavaScript/Python.
😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 Qq / 微信(企业微信、个人微信) / 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 Chatgpt 、 Deepseek 、 DiFy 、 Claude 、 Gemini 、 Xai 、 PPIO 、 Ollama 、 LM Studio 、阿里云百炼、火山方舟、 Siliconflow 、 Qwen 、 Moonshot 、 Chatglm 、 SillyTraven 、 MCP 等 LLM 的机器人 / Agente | Plataforma de bots de mensajería instantánea basada en LLM, admite Discord, Telegram, WeChat, Lark, Dingtalk, QQ, Slack
Reviews

user_IUiMjK3c
As a loyal user of Solana-MCP, I can confidently say this tool is a game changer for developers working on the Solana blockchain. Created by omaidf, this application streamlines the development process with its user-friendly interface and robust features. Whether you're a seasoned developer or just starting, Solana-MCP provides everything you need to thrive in the Solana ecosystem. Highly recommend!

user_rJ7LYGAE
As a dedicated user of the solana-mcp application, I have found it to be incredibly efficient and user-friendly. Created by omaidf, this product stands out for its seamless integration and exceptional performance. Whether you are a beginner or an experienced developer, solana-mcp offers a reliable platform that meets all your needs. Highly recommended!

user_G7ekJrw3
Solana-mcp by omaidf is a fantastic application! It's user-friendly and delivers seamless integration with the Solana blockchain. The interface is intuitive, making it easy even for beginners to start using quickly. Highly recommend for anyone looking to manage their projects efficiently on Solana. Great job, omaidf!

user_Gtf8oLEg
I've been using solana-mcp by omaidf for a while now, and it's been a game changer! The app is user-friendly and incredibly efficient for managing projects. Its seamless integration with Solana's ecosystem has significantly boosted my productivity. Highly recommend to anyone in need of a reliable multi-chain project management tool!

user_nTtorHo9
As a devoted user of solana-mcp by omaidf, I am thoroughly impressed with its seamless performance and user-friendly interface. The integration capabilities are exceptional, making it a powerful tool for any developer immersed in the Solana ecosystem. Highly recommend checking it out!

user_CA6F5JgM
I've been a loyal user of solana-mcp created by omaidf and I am thoroughly impressed. This application has significantly optimized my workflow and provided a seamless experience. The user interface is intuitive, and the performance is robust. Highly recommend this tool for anyone looking to enhance their productivity!

user_XgtsXdCF
As a dedicated user of the solana-mcp application created by omaidf, I must say I am thoroughly impressed by its functionality and design. The seamless integration and user-friendly interface make it a valuable tool for anyone interested in the Solana ecosystem. Highly recommended for both beginners and advanced users!

user_SSLM5e2B
As a devoted user of the solana-mcp application by omaidf, I have been thoroughly impressed by its functionality and ease of use. The seamless integration and user-friendly interface make it a top choice for managing my tasks efficiently. Highly recommended for anyone looking to boost productivity!

user_dAKvt9wn
As a dedicated user of the solana-mcp application, I must say it's an exceptional tool created by omaidf. It seamlessly integrates with my workflow and offers reliable performance. The user interface is intuitive, making it easy for newcomers and experienced users alike. Highly recommend this to anyone looking to enhance their productivity with a solid, well-crafted application.

user_zKvb4OWF
I've been using the Solana-MCP application created by omaidf, and it's been a game changer. The seamless integration and user-friendly interface make complex tasks effortless. Highly recommended for anyone looking to streamline their workflow in the Solana ecosystem!