Skip to main content
Glama
nirholas

@three-ws/metaplex-agent-mcp

by nirholas

@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;base64 URI(nameimageanimation_url GLB)

  • Royalties 插件(5% 给所有者)、VerifiedCreators(签名钱包)、ImmutableMetadata

  • AgentIdentity 插件,携带 eip-8004#registration-v1 文档(model.uriactivex402SupportregistrationssupportedTrust

两条签名通道,均为自我托管:

  • 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-mcp

Related MCP server: AgentWallet MCP Server

配置

Claude Code:

claude mcp add metaplex-agent -e SOLANA_SECRET_KEY=<base58> -- npx -y @three-ws/metaplex-agent-mcp

Cursor / 任何 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

功能

mint_onchain_agent

铸造 + 注册,由你的密钥签名(可容纳时原子完成,否则自动拆分)。confirm:true 控制实际花费;其他任何取值都会返回完整预览。

prepare_agent_mint

构建相同的铸造交易,供外部钱包(wallet 参数)签名。返回 txs_base64,已由新的资产密钥对共同签名;使用 signTransaction / signAllTransactions 签名。

send_signed_transaction

按顺序广播钱包已签名的交易,逐步轮询直至确认持有,并吸收创建/注册之间的传播竞争条件。

register_agent_identity

将已铸造的 Core 资产注册到 Agent Registry(幂等操作;签名者必须是资产管理员)。

get_onchain_agent

读取任意已注册的代理:资产、插件、解码后的元数据 + 注册文档、身份 PDA、内置钱包 + 余额。

agent_wallet

资产的任意地址(mpl-core Asset Signer PDA),或已配置的签名者,并显示实时的 SOL 余额。

build_registration

完全离线的 EIP-8004 注册 JSON + data: URI。

list_onchain_agents

来自真实 three.ws /api/deployments 数据源的最新注册(默认 Solana,all_chains:true 时也可获取 EVM ERC-8004)。

自定义

铸造流程涉及到的每个字段都是参数:所有者、集合、版税基点与拆分、已验证的创建者、不可变元数据、链上属性、冻结/转移/销毁委托、AddBlocker 以及链下元数据属性、external_url、服务、信任模型、注册条目、还有 metadata_uri / registration_uri 覆盖为您自己托管的文档。默认值为 Genesis 333 的值,因此只需传入 namedescriptionimagemodel_url,即可生成与原版在结构上无法区分的资产。

安全性

  • mint_onchain_agentregister_agent_identity 只会在 confirm: true 时广播(可通过设置 REQUIRE_CONFIRM=false 选择退出);预览不产生任何费用。

  • 密钥始终保留在您手中:SOLANA_SECRET_KEY 或每次调用的 production_prompt,绝不会使用托管钱包。钱包通道完全不需要密钥。

  • 花费前会检查余额,RPC 端点必须为 HTTPS,并且 devnet 是演练的一等目标。

环境变量

Variable

默认值

作用

SOLANA_SECRET_KEY

未设置

铸造钱包的 Base58 私钥或 JSON 字节数组。

SOLANA_RPC_URL

公共端点

HTTPS RPC。生产流量请使用自己的端点。

METAPLEX_AGENT_NETWORK

mainnet

默认集群(mainnetdevnet);每个工具也支持每次调用传入 network

REQUIRE_CONFIRM

true

将花费操作置于 confirm: true 之后。

THREE_WS_BASE

https://three.ws

部署数据源的主机地址。

以库的形式使用

构建器(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/metaplex-agent-mcp 的独立仓库。开发工作主要在 three.ws monorepo 中进行,并在此处同步发布,因此本仓库始终与 npm 以及官方 MCP 注册表中(io.github.nirholas/metaplex-agent)发布的版本保持一致。我们欢迎在任意一个位置提交 Issue 和 PR。

Install Server
F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    A
    quality
    D
    maintenance
    Provides 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.
    29
    334
    3
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables 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.
    38
    1
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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