MCP Adapter
Create a Model Context Protocol server for the Solana Agent Kit
MCP Adapter
The @solana-agent-kit/util-mcp
adapter provides a framework for creating a Model Context Protocol (MCP) server to handle protocol operations on the Solana blockchain using the Solana Agent Kit.
Installation
Install the adapter alongside the core Solana Agent Kit and your desired plugins:
Features
- Supports all actions from the Solana Agent Kit
- MCP server implementation for standardized interactions with Claude Desktop
- Environment-based configuration
- Selective action exposure
Prerequisites
- Node.js (v16 or higher recommended)
- pnpm, yarn, or npm
- Solana wallet with private key
- Solana RPC URL
- Claude Desktop application
Basic Setup
Create a new project for your MCP server:
Install the required dependencies:
Create a .env
file in your project root:
Create an index.js
file with the following code:
Update your package.json
to add the type
field:
Claude Desktop Configuration
-
Open the Claude Desktop configuration file:
MacOS:
Windows:
-
Add your MCP server configuration:
Replace the path with the absolute path to your
index.js
file. -
Restart Claude Desktop after updating the configuration.
Customizing Available Actions
You can customize which actions are available to Claude by modifying the finalActions
object:
Testing the Integration
-
Start your MCP server (if running manually):
-
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.
For more detailed information, please refer to the full documentation at docs.sendai.fun.