Agentipy Claude Blockchain
STDIOMCP server providing onchain tools for Claude AI to interact with Solana blockchain.
MCP server providing onchain tools for Claude AI to interact with Solana blockchain.
A Model Context Protocol (MCP) server that provides onchain tools for Claude AI, allowing it to interact with the Solana blockchain through a standardized interface. This implementation uses Agentipy and enables AI agents to perform blockchain operations seamlessly.
This MCP server extends Claude's capabilities by providing tools to:
The server implements the Model Context Protocol specification to standardize blockchain interactions for AI agents.
# Clone the repository git clone https://github.com/niceberginc/agentipy-mcp cd agentipy-mcp # Create and activate virtual environment python -m venv .venv source .venv/bin/activate # On Windows, use `.venv\Scripts\activate` # Install dependencies pip install -r requirements.txt
python -m venv .venv source .venv/bin/activate # On Windows, use `.venv\Scripts\activate`
pip install agentipy>=2.0.8 cryptography>=3.4.7 python-dotenv>=0.17.1 web3>=7.8.0 allora_sdk>=0.2.0 mcp>=1.4.0
Create a .env
file with your credentials:
# Solana Configuration SOLANA_PRIVATE_KEY=your_private_key_here RPC_URL=your_solana_rpc_url_here # Optional API Keys OPENAI_API_KEY=your_openai_api_key ALLORA_API_KEY=your_allora_api_key COINGECKO_PRO_API_KEY=your_coingecko_api_key
To add this MCP server to Claude Desktop, follow these steps:
Locate the Claude Desktop Configuration File
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude\claude_desktop_config.json
Add the Configuration Create or edit the configuration file and add the following JSON:
Note: For the
command
field, userun_mcp.sh
for Unix/Mac systems orrun_mcp.bat
for Windows systems. Make sure to use the correct absolute path to the script file on your system.
{ "mcpServers": { "agentipy": { "command": "/path/to/your/run_mcp.sh", # Replace with .bat for Windows "env": { "RPC_URL": "your_solana_rpc_url_here", "SOLANA_PRIVATE_KEY": "your_private_key_here", "OPENAI_API_KEY": "your_openai_api_key", "ALLORA_API_KEY": "your_allora_api_key", "COINGECKO_PRO_API_KEY": "your_coingecko_api_key" }, "disabled": false, "autoApprove": ["GET_BALANCE", "GET_PRICE_PREDICTION"] } } }
Restart Claude Desktop After making these changes, restart Claude Desktop for the configuration to take effect.
agentipy-mcp/
├── server.py # Main entry point
├── run_mcp.sh # Run script for Unix/Mac
├── run_mcp.bat # Run script for Windows
├── requirements.txt # Dependencies
└── .env # Environment variables
The MCP server provides the following blockchain tools:
GET_BALANCE
- Check wallet balanceTRANSFER
- Transfer tokens between walletsDEPLOY_TOKEN
- Deploy new tokens on SolanaGET_PRICE_PREDICTION
- Get price predictionsGET_ALL_TOPICS
- Get available topicsSTAKE_WITH_JUP
- Stake tokens using JupiterTRADE_WITH_JUP
- Trade tokens using JupiterCREATE_DEBRIDGE_TRANSACTION
- Create a cross-chain bridge transaction using deBridge Liquidity Network APIEXECUTE_DEBRIDGE_TRANSACTION
- Execute a cross-chain bridge transaction using deBridge Liquidity Network APICHECK_TRANSACTION_STATUS
- Check the status of a cross-chain bridge transaction using deBridge Liquidity Network APIPYTH_GET_PRICE
- Get the price of a coin from PythCOINGECKO_GET_TOKEN_INFO
- Get token information from CoinGeckoCOINGECKO_GET_COIN_PRICE_VS
- Get the price of a coin in a specific currency from CoingeckoCOINGECKO_GET_TOP_GAINERS
- Get the top gainers from CoingeckoCOINGECTO_GET_TRENDING_POOLS
- Get the trending pools from CoingeckoCOINGECKO_GET_TRENDING_TOKENS
- Get the trending tokens from CoingeckoCOINGECKO_GET_TOKEN_PRICE_DATA
- Get token price data from CoingeckoCOINGECKO_GET_LATEST_POOLS
- Get the latest pools from CoingeckoIf you encounter issues:
.env
file contains the correct credentialsKey dependencies include:
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License.