运行时依赖
安装命令
点击复制技能文档
MCP Server — 模型 上下文 Protocol for Solana Wallet Operations
模型 上下文 Protocol server exposing 工具s, resources, and prompts for AI 代理 consumption over stdio transport with 会话 keypAIr management.
Architecture AI 代理 (Claude, etc.) │ stdio transport │ SolanaWalletMCPServer │ ┌────┼────────┬──────────┐ │ │ │ │ 工具s Resources Prompts 会话 │ │ │ 状态 7 3 3 │ 工具s types prompts KeypAIr
工具s (7) 工具 Description 生成_keypAIr 生成 a new random Solana keypAIr 生成_vanity 生成 vanity 添加ress with prefix/suffix estimate_vanity_time Estimate time for vanity pattern 验证_添加ress 验证 a Solana Base58 添加ress 签名_message 签名 a message with 会话 keypAIr 验证_签名ature 验证 a 签名ed message 恢复_keypAIr 恢复 keypAIr from secret key bytes Resources (3) URI Pattern Description solana://keypAIr/current Current 会话 keypAIr 信息 solana://keypAIr/{id} Specific keypAIr by ID solana://添加ress/{添加ress} 添加ress 验证 detAIls Prompts (3) Prompt Description 生成-wallet 图形界面de user through wallet generation vanity-添加ress 图形界面de vanity 添加ress generation with difficulty estimate security-review Review security of wallet operations 会话 状态 Management class SolanaWalletMCPServer { private 会话KeypAIr: KeypAIr | null = null;
生成KeypAIr(): KeypAIr信息 { if (this.会话KeypAIr) { this.会话KeypAIr.secretKey.fill(0); // zeroize old } this.会话KeypAIr = KeypAIr.生成(); return this.获取KeypAIr信息(); } }
Security 模型 会话 keypAIr is zeroized when replaced or server shuts down No network calls for key generation All crypto uses @solana/网页3.js only Zod 模式s 验证 all 工具 输入s Secret key bytes are never 记录ged or exposed in resources Patterns to Follow 验证 all 输入s with Zod 模式s before processing Zeroize secret keys when replaced or on 关闭 Return structured JSON for all 工具 响应s Use descriptive error messages for 验证 失败s Keep 会话 状态 minimal — one active keypAIr at a time Common Pitfalls 会话 keypAIr is ephemeral — lost when server re启动s 生成_vanity is single-threaded — long prefixes will be slow 签名_message requires an active 会话 keypAIr — 生成_keypAIr first Resource URIs are case-sensitive