MCP Adapter

Create a Model Context Protocol server for the Ping Agent Kit

The @ping-agent-kit/adapter-mcp adapter provides a framework for creating a Model Context Protocol (MCP) server to handle protocol operations on the Solana blockchain using the Ping Agent Kit.

Install the adapter alongside the core Ping Agent Kit and your desired plugins:

Copy

npm install ping-agent-kit @ping-agent-kit/adapter-mcp @ping-agent-kit/plugin-token dotenv

  • Supports all actions from the Ping Agent Kit

  • MCP server implementation for standardized interactions with Claude Desktop

  • Environment-based configuration

  • Selective action exposure

  • Node.js (v16 or higher recommended)

  • pnpm, yarn, or npm

  • Solana wallet with private key

  • Solana RPC URL

  • Claude Desktop application

Create a new project for your MCP server:

Copy

Install the required dependencies:

Copy

Create a .env file in your project root:

Copy

Create an index.js file with the following code:

Copy

Update your package.json to add the type field:

Copy

  1. Open the Claude Desktop configuration file:

    MacOS:

    Copy

    Windows:

    Copy

  2. Add your MCP server configuration:

    Copy

    Replace the path with the absolute path to your index.js file.

  3. Restart Claude Desktop after updating the configuration.

You can customize which actions are available to Claude by modifying the finalActions object:

Copy

  1. Start your MCP server (if running manually):

    Copy

  2. Open Claude Desktop and ask questions about Solana, like:

    • “What’s my SOL balance?”

    • “Show me my token balances”

    • “What’s my wallet address?”

Claude will use your MCP server to interact with the Solana blockchain and provide responses based on the available actions.

Ping Agent Kit MCP Server

License: ISC

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 is based on the Ping Agent Kit and enables AI agents to perform blockchain operations seamlessly.

This MCP server extends Claude’s capabilities by providing tools to:

  • Interact with Solana blockchain

  • Execute transactions

  • Query account information

  • Manage Solana wallets

The server implements the Model Context Protocol specification to standardize blockchain interactions for AI agents.

  • Node.js (v16 or higher)

  • pnpm (recommended), npm, or yarn

  • Solana wallet with private key

  • Solana RPC URL (mainnet, testnet, or devnet)

Copy

This will start an interactive installation process that will guide you through:

  • Setting up Node.js if needed

  • Configuring your Solana RPC URL and private key

  • Setting up the Claude Desktop integration

Copy

  1. Clone this repository:

Copy

  1. Install dependencies:

Copy

  1. Build the project:

Copy

Create a .env file with your credentials:

Copy

To add this MCP server to Claude Desktop, follow these steps:

  1. Locate the Claude Desktop Configuration File

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

    • Linux: ~/.config/Claude/claude_desktop_config.json

  2. Add the Configuration Create or edit the configuration file and add the following JSON:

    If you installed via npm (Option 1):

    Copy

    If you built from source (Option 2):

    Copy

  3. Restart Claude Desktop After making these changes, restart Claude Desktop for the configuration to take effect.

Copy

The MCP server provides all the Ping Agent Kit tools like:

  • GET_ASSET - Retrieve information about a Solana asset/token

  • DEPLOY_TOKEN - Deploy a new token on Solana

  • GET_PRICE - Fetch price information for tokens

  • WALLET_ADDRESS - Get the wallet address

  • BALANCE - Check wallet balance

  • TRANSFER - Transfer tokens between wallets

  • MINT_NFT - Create and mint new NFTs

  • TRADE - Execute token trades

  • REQUEST_FUNDS - Request funds (useful for testing/development)

  • RESOLVE_DOMAIN - Resolve Solana domain names

  • GET_TPS - Get current transactions per second on Solana

  • Keep your private key secure and never share it

  • Use environment variables for sensitive information

  • Consider using a dedicated wallet for AI agent operations

  • Regularly monitor and audit AI agent activities

  • Test operations on devnet/testnet before mainnet

If you encounter issues:

  1. Verify your Solana private key is correct

  2. Check your RPC URL is accessible

  3. Ensure you’re on the intended network (mainnet, testnet, or devnet)

  4. Check Claude Desktop logs for error messages

  5. Verify the build was successful

Key dependencies include:

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

  1. Fork the repository

  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

License

This project is licensed under the MIT License.

Last updated