@three-ws/metaplex-agent-mcp
@three-ws/metaplex-agent-mcp
从任意 MCP 客户端,将 AI 代理上链部署到 Solana 上的 Metaplex Agent Registry 中。
一条流程即可铸造 Metaplex Core 资产并注册其 EIP-8004 代理身份(当交易大小符合 Solana 的 1232 字节限制时作为单个原子交易完成;否则按顺序执行创建 + 注册,与 Genesis 333 的处理方式完全一致),因此该代理会出现在 metaplex.com/agents 上,并自带内置钱包、声誉界面和浏览器页面。默认输出会复现 three.ws Genesis 333 铸造资产的精确结构,并与线上资产逐个字节进行核对:
资产元数据,作为自包含的
data:application/json;base64URI(name、image、animation_urlGLB)Royalties 插件(5% 给所有者)、VerifiedCreators(签名钱包)、ImmutableMetadata
AgentIdentity 插件,携带
eip-8004#registration-v1文档(model.uri、active、x402Support、registrations、supportedTrust)
两条签名通道,均为自我托管:
Agents 使用自己的密钥对(
SOLANA_SECRET_KEY)签名:mint_onchain_agent。People 使用 Phantom、Solflare、Backpack、Ledger 或任何 Solana 钱包签名:
prepare_agent_mint构建交易,钱包完成签名,send_signed_transaction广播交易。任何密钥都不会接触到服务器。
没有任何模拟环节:使用的是真实的 Metaplex 程序和真实的 Solana,并且支持 devnet,可免费进行端到端完整演练。
安装
npm install -g @three-ws/metaplex-agent-mcp
# or run ad hoc
npx -y @three-ws/metaplex-agent-mcpRelated MCP server: AgentWallet MCP Server
配置
Claude Code:
claude mcp add metaplex-agent -e SOLANA_SECRET_KEY=<base58> -- npx -y @three-ws/metaplex-agent-mcpCursor / 任何 MCP 客户端(mcp.json):
{
"mcpServers": {
"metaplex-agent": {
"command": "npx",
"args": ["-y", "@three-ws/metaplex-agent-mcp"],
"env": { "SOLANA_SECRET_KEY": "<base58 secret key>" }
}
}
}SOLANA_SECRET_KEY 是可选的:所有的读取工具以及完整的 Phantom/Solflare 流程都可以在无此密钥的情况下正常工作。
快速开始
先在 devnet 上免费演练,然后再进入主网:
1. agent_wallet {} → confirm the signer is funded
2. mint_onchain_agent { name: "Astra", description: "…",
image: "https://…png", model_url: "https://…glb",
x402_support: true, network: "devnet" } → preview (nothing broadcast)
3. …same call with confirm: true → minted + registered, links returned
4. get_onchain_agent { asset: "<returned asset>", network: "devnet" }在主网上,铸造费用约为 ~0.007 SOL(包括 Core 租金+ 身份 PDA 租金 + 手续费)。
工具
Tool | 功能 |
| 铸造 + 注册,由你的密钥签名(可容纳时原子完成,否则自动拆分)。 |
| 构建相同的铸造交易,供外部钱包( |
| 按顺序广播钱包已签名的交易,逐步轮询直至确认持有,并吸收创建/注册之间的传播竞争条件。 |
| 将已铸造的 Core 资产注册到 Agent Registry(幂等操作;签名者必须是资产管理员)。 |
| 读取任意已注册的代理:资产、插件、解码后的元数据 + 注册文档、身份 PDA、内置钱包 + 余额。 |
| 资产的任意地址(mpl-core Asset Signer PDA),或已配置的签名者,并显示实时的 SOL 余额。 |
| 完全离线的 EIP-8004 注册 JSON + |
| 来自真实 three.ws |
自定义
铸造流程涉及到的每个字段都是参数:所有者、集合、版税基点与拆分、已验证的创建者、不可变元数据、链上属性、冻结/转移/销毁委托、AddBlocker 以及链下元数据属性、external_url、服务、信任模型、注册条目、还有 metadata_uri / registration_uri 覆盖为您自己托管的文档。默认值为 Genesis 333 的值,因此只需传入 name、description、image 和 model_url,即可生成与原版在结构上无法区分的资产。
安全性
mint_onchain_agent和register_agent_identity只会在confirm: true时广播(可通过设置REQUIRE_CONFIRM=false选择退出);预览不产生任何费用。密钥始终保留在您手中:
SOLANA_SECRET_KEY或每次调用的production_prompt,绝不会使用托管钱包。钱包通道完全不需要密钥。花费前会检查余额,RPC 端点必须为 HTTPS,并且 devnet 是演练的一等目标。
环境变量
Variable | 默认值 | 作用 |
| 未设置 | 铸造钱包的 Base58 私钥或 JSON 字节数组。 |
| 公共端点 | HTTPS RPC。生产流量请使用自己的端点。 |
|
| 默认集群( |
|
| 将花费操作置于 |
|
| 部署数据源的主机地址。 |
以库的形式使用
构建器(builders)已导出供直接嵌入使用(Web 应用、脚本):
import { buildAgentMint, sendAgentMint, buildUmi, toBase58Signature } from '@three-ws/metaplex-agent-mcp/lib';
const umi = buildUmi({ network: 'devnet', secret: process.env.SOLANA_SECRET_KEY });
const mint = buildAgentMint(umi, {
network: 'devnet',
creator: umi.identity.publicKey.toString(),
name: 'Astra',
description: 'An autonomous 3D agent',
image: 'https://example.com/astra.png',
modelUrl: 'https://example.com/astra.glb',
x402Support: true,
});
const { signatures, atomic } = await sendAgentMint(umi, mint, { toBase58Signature });注册和元数据构建器还可以从 @three-ws/metaplex-agent-mcp/lib/registration 单独导入(无依赖、浏览器安全),以及从 @three-ws/metaplex-agent-mcp/lib/mint 导入交易构建器。three.full /deploy-onchain 页面正是基于这些构建器运行的。
要求
Node 20 或更高版本
目标网络上有用于铸造的 SOL(主网每个代理约 ~0.007 SOL;devnet 可通过水龙头免费获取)
链接
three.ws:https://three.ws
在线部署数据源:https://three.ws/deployments
Metaplex Agent Registry:https://www.metaplex.com/agents
Metaplex 文档:https://www.metaplex.com/docs/agents
源代码:https://github.com/nirholas/three.ws/tree/main/packages/metaplex-agent-mcp
关于本仓库
这是 @three.ws/metaplex-agent-mcp 的独立仓库。开发工作主要在 three.ws monorepo 中进行,并在此处同步发布,因此本仓库始终与 npm 以及官方 MCP 注册表中(io.github.nirholas/metaplex-agent)发布的版本保持一致。我们欢迎在任意一个位置提交 Issue 和 PR。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables AI agents to interact with cryptocurrency ecosystems through wallet management, trading operations (swaps, DCA, limit orders), staking, and multi-chain support starting with Solana.37GPL 3.0
- AlicenseAqualityDmaintenanceProvides permissionless wallet infrastructure for AI agents to manage wallets, sign transactions, and handle tokens across Solana and all EVM-compatible chains. It includes 29 specialized tools for on-chain operations, featuring built-in security guards and automated x402 payment processing without KYC requirements.293343MIT
- AlicenseAqualityDmaintenanceEnables AI agents to read chain data, execute transactions, swap tokens, and manage wallets on Solana through 38 tools across 7 modules. Supports write operations with a private key and includes built-in prompts for common workflows.381MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with the Solana blockchain, manage accounts and tokens, and develop and deploy smart contracts end-to-end.4
Related MCP Connectors
Native Solana staking for AI agents. 26 MCP tools, one-shot signing, webhooks.
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Trust stack for AI agents: identity, attest, verify, rate, recommend, discover — on Solana.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nirholas/metaplex-agent-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server