
demcp ankr rpc
提供与Solana区块链交互的工具,支持账户查询、余额检查、交易数据获取等功能。
Repository Info
About This Server
提供与Solana区块链交互的工具,支持账户查询、余额检查、交易数据获取等功能。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
DEMCP-ANKR: Solana Blockchain API MCP Service
A FastMCP service that provides a comprehensive set of tools for interacting with the Solana blockchain. This MCP (Multi-Chain Protocol) service wraps Solana RPC API endpoints into easily accessible tools that can be integrated with AI assistants.
Features
- Account information retrieval
- Token balance queries
- Program account management
- Block and transaction data access
- Epoch and network status information
- Stake account monitoring
- Supply and transaction statistics
Prerequisites
- Python 3.10+
- Docker (for containerized deployment)
- Solana API endpoint URL
Installation
Using Docker
-
Clone the repository:
git clone <repository-url> cd demcp-ankr -
Build the Docker image:
docker build -t demcp-ankr . -
Run the container:
docker run -p 8080:8080 -e SOLANA_API_URL="<your-solana-api-url>" demcp-ankr
Local Development
-
Install dependencies:
pip install -r requirements.txt -
Set the Solana API URL environment variable:
export SOLANA_API_URL="<your-solana-api-url>" -
Run the service:
python src/ankr.py
API Tools
The service exposes the following Solana blockchain interaction tools:
get_account_info- Retrieve detailed information about a Solana accountget_account_balance- Check the SOL balance of an accountget_program_accounts- Query token accounts, NFT data, or program statesget_token_account_balance- Get the balance of a specific token accountget_token_accounts_by_owner- List all token accounts owned by an addressget_blocks- Retrieve block information for specific slotsget_epoch_schedule- Get epoch scheduling informationget_latest_blockhash- Retrieve the latest block hashget_minimum_balance_for_rent_exemption- Calculate minimum balance for rent exemptionget_multiple_accounts- Get information for multiple accounts simultaneouslyget_slot- Retrieve the current slot numberget_stake_activation- Get stake activation informationget_supply- Retrieve total supply informationget_transaction_count- Get the total transaction count
Environment Variables
SOLANA_API_URL: Required. The Solana RPC API endpoint URL.
Integration with AI Tools
This MCP service is designed to be integrated with AI assistants supporting the MCP protocol. The tools can be accessed through the standard MCP interface at port 8080.
Security Notes
- Never expose your API keys in the source code
- Use environment variables for sensitive configuration
- Consider implementing rate limiting for production deployments
License
MIT License
Copyright (c) 2023 DEMCP-ANKR
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Contributing
We welcome contributions to the DEMCP-ANKR project!
How to Contribute
-
Fork the Repository: Fork the repository to your GitHub account.
-
Clone the Forked Repository: Clone your fork locally on your machine.
git clone https://github.com/yourusername/demcp-ankr.git cd demcp-ankr -
Create a Branch: Create a new branch for your feature or bug fix.
git checkout -b feature/your-feature-name -
Make Changes: Implement your changes, adhering to the existing code style.
-
Test Your Changes: Ensure your changes don't break existing functionality.
-
Commit Your Changes: Commit with a clear and descriptive message.
git commit -m "Add feature: your feature description" -
Push to GitHub: Push your changes to your forked repository.
git push origin feature/your-feature-name -
Create a Pull Request: Open a pull request from your fork to the main repository.
Code Standards
- Follow PEP 8 style guidelines for Python code
- Write descriptive docstrings for all functions and classes
- Include appropriate error handling
- Add unit tests for new features
Reporting Issues
If you find a bug or have a suggestion for improvement:
- Check if the issue already exists in the GitHub issues
- If not, create a new issue with a descriptive title and detailed information
Thank you for contributing to make DEMCP-ANKR better!
Quick Start
Clone the repository
git clone https://github.com/demcp/demcp-ankr-rpcInstall dependencies
cd demcp-ankr-rpc
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.