<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Alhibb</title>
    <description>The latest articles on Forem by Alhibb (@alhibb).</description>
    <link>https://forem.com/alhibb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2026060%2Fdcbfbdae-c654-424f-b284-0cccf1aeb8ce.jpeg</url>
      <title>Forem: Alhibb</title>
      <link>https://forem.com/alhibb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/alhibb"/>
    <language>en</language>
    <item>
      <title>Supercharge Claude AI with Solana: Build Your Agentipy MCP Server (MEDUSA Client)</title>
      <dc:creator>Alhibb</dc:creator>
      <pubDate>Sat, 12 Apr 2025 05:18:30 +0000</pubDate>
      <link>https://forem.com/alhibb/supercharge-claude-ai-with-solana-build-your-agentipy-mcp-server-medusa-client-5557</link>
      <guid>https://forem.com/alhibb/supercharge-claude-ai-with-solana-build-your-agentipy-mcp-server-medusa-client-5557</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdbnaei3v3dubrsjmcwsn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdbnaei3v3dubrsjmcwsn.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hey Dev community&lt;/strong&gt;! 👋&lt;/p&gt;

&lt;p&gt;Ever wished your AI assistant could directly interact with the blockchain? Imagine telling Claude AI to check your Solana balance, swap tokens on Jupiter, or even deploy a new SPL token, and it just &lt;em&gt;does&lt;/em&gt; it.&lt;/p&gt;

&lt;p&gt;Well, wish no more! With the &lt;strong&gt;Agentipy MCP Server&lt;/strong&gt;, you can bridge the gap between powerful AI models like Claude and the Solana ecosystem. This tutorial will guide you, step-by-step, through setting up this server, which acts as the engine enabling Claude (conceptually, your &lt;strong&gt;MEDUSA&lt;/strong&gt; client) to wield a suite of Solana tools.&lt;/p&gt;

&lt;p&gt;Ready to give your AI some serious Web3 superpowers? Let's dive in!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Repo:&lt;/strong&gt; &lt;a href="https://github.com/niceberginc/agentipy-mcp" rel="noopener noreferrer"&gt;niceberginc/agentipy-mcp&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; What is the Agentipy MCP Server?
&lt;/li&gt;
&lt;li&gt; Prerequisites
&lt;/li&gt;
&lt;li&gt; Installation
&lt;/li&gt;
&lt;li&gt; Configuration: Setting up Your Server &amp;amp; MEDUSA Client
&lt;/li&gt;
&lt;li&gt; Running the Server
&lt;/li&gt;
&lt;li&gt; Available Tools for MEDUSA
&lt;/li&gt;
&lt;li&gt; How MEDUSA Uses the Tools (Conceptual)
&lt;/li&gt;
&lt;li&gt; 🚨 Security First!
&lt;/li&gt;
&lt;li&gt; Troubleshooting Tips
&lt;/li&gt;
&lt;li&gt;Code Deep Dive (Optional)&lt;/li&gt;
&lt;li&gt;Contributing &amp;amp; License&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What is the Agentipy MCP Server?
&lt;/h2&gt;

&lt;p&gt;This server implements the &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt;, a standard way for AI models to access external tools and context. Specifically, this server uses the excellent &lt;code&gt;agentipy&lt;/code&gt; Python library to provide Claude Desktop with a rich set of tools for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  ✅ Checking Solana wallet balances (SOL &amp;amp; SPL Tokens)&lt;/li&gt;
&lt;li&gt;  ✅ Transferring SOL &amp;amp; SPL Tokens&lt;/li&gt;
&lt;li&gt;  ✅ Deploying new SPL Tokens&lt;/li&gt;
&lt;li&gt;  ✅ Trading tokens via Jupiter Aggregator&lt;/li&gt;
&lt;li&gt;  ✅ Staking SOL via Jupiter LSTs&lt;/li&gt;
&lt;li&gt;  ✅ Getting price predictions from Allora Network&lt;/li&gt;
&lt;li&gt;  ✅ Performing cross-chain swaps via deBridge&lt;/li&gt;
&lt;li&gt;  ✅ Fetching real-time prices from Pyth Network&lt;/li&gt;
&lt;li&gt;  ✅ Accessing comprehensive token data from CoinGecko (info, prices, trending)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of it as a secure translator: Claude (MEDUSA) makes a request in a format MCP understands, and the server uses Agentipy to execute the corresponding action on the Solana blockchain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we start, make sure you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  💻 &lt;strong&gt;Python:&lt;/strong&gt; v3.8 or higher&lt;/li&gt;
&lt;li&gt;  🤖 &lt;strong&gt;Claude Desktop:&lt;/strong&gt; Installed&lt;/li&gt;
&lt;li&gt;  🔑 &lt;strong&gt;Solana Wallet Private Key:&lt;/strong&gt; &lt;strong&gt;Crucially, use a dedicated burner wallet with limited funds for this, NOT your main wallet.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;  ⚡ &lt;strong&gt;Solana RPC URL:&lt;/strong&gt; (e.g., from QuickNode, Alchemy, Helius, Triton, or public endpoints for testing)&lt;/li&gt;
&lt;li&gt;  🔧 &lt;strong&gt;Git:&lt;/strong&gt; For cloning the repo&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;(Optional) API Keys:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;ALLORA_API_KEY&lt;/code&gt;: For Allora price predictions&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;COINGECKO_PRO_API_KEY&lt;/code&gt;: For full CoinGecko functionality (some tools might work on the free tier)&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;OPENAI_API_KEY&lt;/code&gt;: Potentially for future Agentipy features&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Get the server code onto your machine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 1: Quick Install (Recommended)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Clone the repository&lt;/span&gt;
git clone https://github.com/niceberginc/agentipy-mcp
&lt;span class="nb"&gt;cd &lt;/span&gt;agentipy-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 2. Create &amp;amp; activate virtual environment&lt;/span&gt;
python &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv
&lt;span class="c"&gt;# macOS/Linux:&lt;/span&gt;
&lt;span class="nb"&gt;source&lt;/span&gt; .venv/bin/activate
&lt;span class="c"&gt;# Windows:&lt;/span&gt;
.&lt;span class="se"&gt;\.&lt;/span&gt;venv&lt;span class="se"&gt;\S&lt;/span&gt;cripts&lt;span class="se"&gt;\a&lt;/span&gt;ctivate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 3. Install dependencies&lt;/span&gt;
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt

&lt;span class="c"&gt;# 4. Proceed to Configuration!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Option 2: Manual Setup&lt;br&gt;
If you prefer setting things up piece by piece:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
&lt;span class="c"&gt;# 1. Create a project directory&lt;/span&gt;
&lt;span class="nb"&gt;mkdir &lt;/span&gt;my-agentipy-mcp &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;my-agentipy-mcp

&lt;span class="c"&gt;# 2. Create &amp;amp; activate virtual environment&lt;/span&gt;
python &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv
&lt;span class="c"&gt;# macOS/Linux: source .venv/bin/activate&lt;/span&gt;
&lt;span class="c"&gt;# Windows: .\.venv\Scripts\activate&lt;/span&gt;

&lt;span class="c"&gt;# 3. Install required packages&lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;agentipy&amp;gt;&lt;span class="o"&gt;=&lt;/span&gt;2.0.8 python-dotenv&amp;gt;&lt;span class="o"&gt;=&lt;/span&gt;0.17.1 mcp&amp;gt;&lt;span class="o"&gt;=&lt;/span&gt;1.4.0 cryptography&amp;gt;&lt;span class="o"&gt;=&lt;/span&gt;3.4.7 web3&amp;gt;&lt;span class="o"&gt;=&lt;/span&gt;7.8.0 allora_sdk&amp;gt;&lt;span class="o"&gt;=&lt;/span&gt;0.2.0

&lt;span class="c"&gt;# 4. Manually create server.py, run_mcp.sh/bat from the repo&lt;/span&gt;
&lt;span class="c"&gt;#    (Cloning in Option 1 is much easier!)&lt;/span&gt;
&lt;span class="c"&gt;# 5. Proceed to Configuration!&lt;/span&gt;
Configuration: Setting up Your Server &amp;amp; MEDUSA Client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Two parts to configure: the server's environment and telling Claude Desktop how to talk to it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Server Environment (.env)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the root of your agentipy-mcp directory, create a file named .env and add your credentials. Never commit this file to Git!&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# .env - Keep this file secure!&lt;/span&gt;

&lt;span class="c"&gt;# --- Required ---&lt;/span&gt;
&lt;span class="c"&gt;# Use a BURNER wallet private key, not your main one!&lt;/span&gt;
&lt;span class="nv"&gt;SOLANA_PRIVATE_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;YOUR_SECURE_WALLET_PRIVATE_KEY_HERE
&lt;span class="c"&gt;# Your chosen Solana RPC endpoint&lt;/span&gt;
&lt;span class="nv"&gt;RPC_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://api.mainnet-beta.solana.com &lt;span class="c"&gt;# Example - Replace with yours!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# --- Optional ---&lt;/span&gt;
&lt;span class="c"&gt;# Uncomment and add keys if using these tools&lt;/span&gt;
&lt;span class="c"&gt;# ALLORA_API_KEY=sk_your_allora_key_here&lt;/span&gt;
&lt;span class="c"&gt;# COINGECKO_PRO_API_KEY=cg_your_coingecko_key_here&lt;/span&gt;
&lt;span class="c"&gt;# OPENAI_API_KEY=sk_your_openai_key_here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Claude Desktop Integration (MEDUSA Client Setup)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, let's tell Claude Desktop about our local MCP server.&lt;/p&gt;
&lt;h3&gt;
  
  
  A. Find Claude's Config File:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%&lt;span class="se"&gt;\C&lt;/span&gt;laude&lt;span class="se"&gt;\c&lt;/span&gt;laude_desktop_config.json

Linux: ~/.config/Claude/claude_desktop_config.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydp996ionru4423zp2ty.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydp996ionru4423zp2ty.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  B. Edit the Config File:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Open claude_desktop_config.json &lt;span class="o"&gt;(&lt;/span&gt;create it &lt;span class="k"&gt;if &lt;/span&gt;it doesn&lt;span class="s1"&gt;'t exist). Add the following mcpServers configuration. Pay close attention to the command path!

{
  "mcpServers": {
    "agentipy": {
      "command": "/path/to/your/run_mcp.sh",
      "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"]
    }
  }
}

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Key Points:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;command: Must be the correct, full, absolute path to run_mcp.sh (Mac/Linux) or run_mcp.bat (Windows) in your cloned agentipy-mcp folder.&lt;/li&gt;
&lt;li&gt;env: Best practice is to let the run script load the .env file. Only add overrides here if necessary.&lt;/li&gt;
&lt;li&gt;autoApprove: Powerful but risky. Only list tools you fully trust the AI to execute without prompting you. Start with read-only tools.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  C. Restart Claude Desktop:
&lt;/h3&gt;

&lt;p&gt;Save the config file and fully restart Claude Desktop for the changes to take effect.&lt;/p&gt;
&lt;h3&gt;
  
  
  D. Running the Server
&lt;/h3&gt;

&lt;p&gt;Your MCP server needs to be running in the background for Claude to use its tools.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your terminal/command prompt.&lt;/li&gt;
&lt;li&gt;cd into your agentipy-mcp project directory.&lt;/li&gt;
&lt;li&gt;Activate the virtual environment:&lt;/li&gt;
&lt;li&gt;Mac/Linux: source .venv/bin/activate&lt;/li&gt;
&lt;li&gt;Windows: ..venv\Scripts\activate&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Start the server:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Mac/Linux: ./run_mcp.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Windows: run_mcp.bat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You should see logs indicating the server started and which tools are available. Keep this terminal running!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgj5c0vxklhsvfna53g4z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgj5c0vxklhsvfna53g4z.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Example Output
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1lx92u53k4ssz2kbkctq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1lx92u53k4ssz2kbkctq.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's a rundown of the blockchain superpowers you've just given AgentiPY MCP Server:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frntocqvnjha9xje6vyp2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frntocqvnjha9xje6vyp2.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Native Solana Actions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GET_BALANCE: Check wallet balance (SOL or SPL). Input: token_address (optional)&lt;/li&gt;
&lt;li&gt;TRANSFER: Send SOL or SPL tokens. Input: amount, to (recipient), mint (optional SPL token)&lt;/li&gt;
&lt;li&gt;DEPLOY_TOKEN: Create a new SPL token. Input: decimals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Allora Actions (ALLORA_API_KEY needed)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GET_PRICE_PREDICTION: Fetch BTC/ETH price predictions. Input: asset, timeframe&lt;/li&gt;
&lt;li&gt;GET_ALL_TOPICS: List available Allora prediction topics. Input: None&lt;/li&gt;
&lt;li&gt;GET_INFERENCE_BY_TOPIC_ID: Get data for a specific topic. Input: topic_id&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Jupiter Actions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TRADE_WITH_JUP: Swap tokens using Jupiter Aggregator. Input: input_mint, output_mint, input_amount, slippage_bps&lt;/li&gt;
&lt;li&gt;STAKE_WITH_JUP: Stake SOL for a Jupiter LST. Input: amount&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;DeBridge Actions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CREATE_DEBRIDGE_TRANSACTION: Initiate a cross-chain swap. (Complex inputs)&lt;/li&gt;
&lt;li&gt;EXECUTE_DEBRIDGE_TRANSACTION: Execute a created swap. (Requires identifiers)&lt;/li&gt;
&lt;li&gt;CHECK_TRANSACTION_STATUS: Check swap status. (Requires identifiers)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pyth Actions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PYTH_GET_PRICE: Get real-time asset prices from Pyth Network. Input: asset_symbol (e.g., "SOL")&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CoinGecko Actions (COINGECKO_PRO_API_KEY recommended)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;COINGECKO_GET_TOKEN_INFO: Get detailed token data. Input: token_id (e.g., "solana")&lt;/li&gt;
&lt;li&gt;COINGECKO_GET_COIN_PRICE_VS: Get price vs. currencies. Input: token_id, vs_currencies (e.g., "usd,eur")&lt;/li&gt;
&lt;li&gt;COINGECKO_GET_TOP_GAINERS: Find top-performing tokens. (Optional inputs)&lt;/li&gt;
&lt;li&gt;COINGECTO_GET_TRENDING_POOLS: List trending liquidity pools. Input: None&lt;/li&gt;
&lt;li&gt;COINGECKO_GET_TRENDING_TOKENS: See what tokens are trending. Input: None&lt;/li&gt;
&lt;li&gt;COINGECKO_GET_TOKEN_PRICE_DATA: Get historical price data. Input: token_id, vs_currency, days&lt;/li&gt;
&lt;li&gt;COINGECKO_GET_LATEST_POOLS: Find newly listed pools. Input: None&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  How MCP Uses the AgentiPY Tools (Conceptual)
&lt;/h3&gt;

&lt;p&gt;Now, in Claude Desktop, you can start making requests!&lt;/p&gt;


&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/alhibb/agentipy-mcp-33f" class="crayons-story__hidden-navigation-link"&gt;agentipy MCP&lt;/a&gt;

  &lt;a href="https://dev.to/alhibb/agentipy-mcp-33f" class="crayons-story__video"&gt;
    &lt;span class="crayons-story__video__time"&gt;
      00:48
    &lt;/span&gt;
  &lt;/a&gt;

  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/alhibb" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2026060%2Fdcbfbdae-c654-424f-b284-0cccf1aeb8ce.jpeg" alt="alhibb profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/alhibb" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Alhibb
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Alhibb
                
              
              &lt;div id="story-author-preview-content-2401360" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/alhibb" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2026060%2Fdcbfbdae-c654-424f-b284-0cccf1aeb8ce.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Alhibb&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/alhibb/agentipy-mcp-33f" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Apr 12 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/alhibb/agentipy-mcp-33f" id="article-link-2401360"&gt;
          agentipy MCP
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/emptystring"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;emptystring&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/alhibb/agentipy-mcp-33f#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            1 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;Remember, if a tool isn't in autoApprove, Claude will ask for your confirmation before running it via the MCP server.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚨 Security First!
&lt;/h2&gt;

&lt;p&gt;This is powerful stuff, so safety is critical:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🛡️ USE A BURNER WALLET: I can't stress this enough. Configure the server with a private key for a wallet holding only the funds you're willing to risk for AI experiments. NEVER use your main savings wallet key.&lt;/li&gt;
&lt;li&gt;🔒 Protect .env: Keep your .env file secure and out of version control (add it to .gitignore).&lt;/li&gt;
&lt;li&gt;👀 Monitor Activity: Check the MCP server logs and your burner wallet's transactions on Solscan/Explorer regularly.&lt;/li&gt;
&lt;li&gt;🚦 autoApprove Wisely: Be extremely selective about which tools you auto-approve. Start with read-only tools. Review often.&lt;/li&gt;
&lt;li&gt;🧪 Test on Devnet/Testnet: Use Solana devnet or testnet RPCs in your .env file for initial testing before moving to mainnet-beta.&lt;/li&gt;
&lt;li&gt;⬆️ Keep Updated: Regularly update agentipy (pip install -U agentipy) for the latest features and security patches.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Troubleshooting Tips
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Hitting snags? Try these common fixes:&lt;/li&gt;
&lt;li&gt;Server Not Connecting?&lt;/li&gt;
&lt;li&gt;Is the server running in a terminal with the venv active? Check its logs for errors.&lt;/li&gt;
&lt;li&gt;Is the command path in claude_desktop_config.json exactly correct (absolute path)?&lt;/li&gt;
&lt;li&gt;Did you restart Claude Desktop fully after editing its config?&lt;/li&gt;
&lt;li&gt;Check Claude's own logs for MCP connection errors.&lt;/li&gt;
&lt;li&gt;Tool Errors?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Check the MCP server terminal output for specific error messages (e.g., Insufficient funds, Invalid RPC URL, API key error).
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Is your .env file correct and saved in the project root?&lt;/li&gt;
&lt;li&gt;Are required API keys present in .env if using Allora/CoinGecko tools?&lt;/li&gt;
&lt;li&gt;Is your RPC URL valid and reachable? Public ones can be flaky.&lt;/li&gt;
&lt;li&gt;Installation Issues?&lt;/li&gt;
&lt;li&gt;Did you activate the virtual environment (.venv) before pip install?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try reinstalling dependencies: pip install -r requirements.txt
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Curious about the internals?
&lt;/h3&gt;

&lt;p&gt;server.py: The heart of the server. It initializes SolanaAgentKit from Agentipy with your .env credentials and starts the FastMCP server, registering all the tools defined in agentipy/mcp/.&lt;/p&gt;

&lt;h1&gt;
  
  
  server.py (Simplified)
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;agentipy&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SolanaAgentKit&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;agentipy.mcp.mcp_server&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;start_mcp_server&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ALL_ACTIONS&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dotenv&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;load_dotenv&lt;/span&gt;

&lt;span class="nf"&gt;load_dotenv&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;# Load .env variables
&lt;/span&gt;
&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SolanaAgentKit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="c1"&gt;# Create the Agentipy core object
&lt;/span&gt;    &lt;span class="n"&gt;private_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SOLANA_PRIVATE_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;rpc_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;RPC_URL&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="c1"&gt;# ... potentially other keys ...
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# ALL_ACTIONS contains Tool definitions (name, desc, input, handler)
&lt;/span&gt;&lt;span class="nf"&gt;start_mcp_server&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ALL_ACTIONS&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# Start the MCP listener
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;- run_mcp.sh / run_mcp.bat: Simple scripts to activate the virtual environment and run server.py.

- requirements.txt: Lists Python dependencies &lt;span class="o"&gt;(&lt;/span&gt;agentipy, mcp, python-dotenv, etc.&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;

- agentipy/mcp/ &lt;span class="o"&gt;(&lt;/span&gt;within Agentipy library&lt;span class="o"&gt;)&lt;/span&gt;: Contains the actual tool definitions &lt;span class="o"&gt;(&lt;/span&gt;Tool objects&lt;span class="o"&gt;)&lt;/span&gt; mapping names like GET_BALANCE to their corresponding Agentipy functions &lt;span class="o"&gt;(&lt;/span&gt;BalanceFetcher.get_balance, etc.&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Contributing &amp;amp; License
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Found a bug or want to add a feature? Contributions are welcome! Fork the repo, make your changes, and open a Pull Request.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Repo: &lt;a href="https://github.com/niceberginc/agentipy-mcp" rel="noopener noreferrer"&gt;https://github.com/niceberginc/agentipy-mcp&lt;/a&gt;
&lt;/h4&gt;

&lt;h2&gt;
  
  
  License: MIT
&lt;/h2&gt;

&lt;p&gt;That's it! You now have a locally running MCP server empowering Claude (your MEDUSA client) with a versatile set of Solana tools. Go experiment, see what you can build, and share your experiences in the comments below! What cool things will you have MEDUSA do first?&lt;/p&gt;

</description>
      <category>python</category>
      <category>web3</category>
      <category>ai</category>
      <category>agentipy</category>
    </item>
    <item>
      <title>agentipy MCP</title>
      <dc:creator>Alhibb</dc:creator>
      <pubDate>Sat, 12 Apr 2025 05:09:34 +0000</pubDate>
      <link>https://forem.com/alhibb/agentipy-mcp-33f</link>
      <guid>https://forem.com/alhibb/agentipy-mcp-33f</guid>
      <description></description>
      <category>emptystring</category>
    </item>
  </channel>
</rss>
