phantom-wallet-mcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Phantom Wallet MCP

Phantom Wallet MCP

Use the
phantom
MCP server to interact with the user's Phantom wallet directly.
通过
phantom
MCP服务器直接与用户的Phantom钱包进行交互。

Available Tools

可用工具

ToolDescription
get_wallet_addresses
Get blockchain addresses (Solana, Ethereum, Bitcoin, Sui) for the connected wallet
sign_transaction
Sign a transaction (base64url for Solana, RLP hex for Ethereum)
transfer_tokens
Transfer SOL or SPL tokens on Solana — builds, signs, and sends the transaction
buy_token
Fetch Solana swap quotes from Phantom API; optionally sign and send
sign_message
Sign a UTF-8 message with automatic chain-specific routing
工具描述
get_wallet_addresses
获取已连接钱包的区块链地址(Solana、Ethereum、Bitcoin、Sui)
sign_transaction
签署交易(Solana使用base64url格式,Ethereum使用RLP十六进制格式)
transfer_tokens
在Solana网络上转账SOL或SPL代币——负责交易的构建、签署和发送
buy_token
从Phantom API获取Solana代币兑换报价;可选择签署并发送交易
sign_message
签署UTF-8格式消息,支持自动按链路由

Setup

设置步骤

The
phantom
MCP server requires a
PHANTOM_APP_ID
environment variable from Phantom Portal. On first use, it opens a browser for OAuth authentication via Google or Apple login.
phantom
MCP服务器需要从Phantom Portal获取的
PHANTOM_APP_ID
环境变量。首次使用时,会打开浏览器通过Google或Apple登录完成OAuth认证。

Supported Networks

支持的网络

ChainNetworks
Solanamainnet, devnet, testnet
EthereumMainnet, Sepolia, Polygon, Base, Arbitrum
BitcoinMainnet
SuiMainnet, Testnet
Networks use CAIP-2 format (e.g.,
solana:mainnet
,
eip155:1
).
区块链网络
Solanamainnet, devnet, testnet
EthereumMainnet, Sepolia, Polygon, Base, Arbitrum
BitcoinMainnet
SuiMainnet, Testnet
网络采用CAIP-2格式(例如:
solana:mainnet
eip155:1
)。

Examples

示例

Get wallet addresses

获取钱包地址

Ask the
phantom
MCP to retrieve the user's wallet addresses, then use them for transactions.
请求
phantom
MCP获取用户的钱包地址,随后可用于交易操作。

Transfer SOL

转账SOL

Use
transfer_tokens
to send SOL to a recipient address. The MCP handles transaction building, signing, and submission.
使用
transfer_tokens
向接收地址发送SOL。MCP会处理交易的构建、签署和提交。

Sign a message

签署消息

Use
sign_message
for wallet verification or authentication flows. The MCP routes to the correct chain based on the network parameter.
使用
sign_message
实现钱包验证或认证流程。MCP会根据network参数路由到对应的区块链网络。

Important Notes

重要说明

  • Sessions persist locally in
    ~/.phantom-mcp/session.json
  • This is preview software — use a separate wallet with minimal funds for testing
  • The MCP server runs via stdio transport (launched by
    npx -y @phantom/mcp-server
    )
  • 会话信息本地存储在
    ~/.phantom-mcp/session.json
  • 本软件为预览版本——测试时请使用独立钱包,且仅存入少量资金
  • MCP服务器通过stdio传输运行(可通过
    npx -y @phantom/mcp-server
    启动)