模型上下文协议
STDIO连接GOAT与Claude桌面版的MCP服务器
连接GOAT与Claude桌面版的MCP服务器
This example shows you how to create a MCP Server to connect GOAT with Claude for Desktop.
It is implemented for both EVM (Base Sepolia) and Solana chains but can be updated to support any other chain, wallet and series of tools.
git clone https://github.com/goat-sdk/goat.git && cd goat
typescript directory:cd typescript pnpm install pnpm build
cd examples/by-framework/model-context-protocol
mcp-evm.example.json file to mcp-evm.json:# For EVM cp mcp-evm.example.json mcp-evm.json # For Solana cp mcp-solana.example.json mcp-solana.json
model-context-protocol folder, you can get it by running pwd in the model-context-protocol folderWALLET_PRIVATE_KEYRPC_PROVIDER_URLclaude_desktop_config.json file to the ~/Library/Application Support/Claude/ directory:# For EVM cp mcp-evm.json ~/Library/Application\ Support/Claude/claude_desktop_config.json # For Solana cp mcp-solana.json ~/Library/Application\ Support/Claude/claude_desktop_config.json
This tells Claude for Desktop:
NOTE: When making changes to the code you need to make sure to:
pnpm build in the model-context-protocol folder to generate the updated evm.js and solana.js files.~/Library/Application Support/Claude/ directory, or update the claude_desktop_config.json file with the new values. You will also need to restart Claude.Run Claude for Desktop
Chat with the agent:
For more information on how to use the model context protocol, check out the docs.