@three-ws/metaplex-agent-mcp
Deploys AI agents on-chain into the Metaplex Agent Registry on Solana, minting Core assets with EIP-8004 identity. Supports self-custodial signing via server keypair or external wallets, with devnet support for free rehearsal.
README
@three-ws/metaplex-agent-mcp
Deploy AI agents on-chain into the Metaplex Agent Registry on Solana, from any MCP client.
One flow mints a Metaplex Core asset and registers its EIP-8004 agent identity (a single atomic transaction when it fits Solana's 1232-byte limit, create + register in sequence otherwise, exactly how the Genesis 333 landed), so the agent shows up on metaplex.com/agents with its own built-in wallet, reputation surface, and explorer pages. The default output reproduces the exact shape of the three.ws Genesis 333 mints, verified byte-for-byte against the live assets:
- asset metadata as a self-contained
data:application/json;base64URI (name,image,animation_urlGLB) - Royalties plugin (5% to the owner), VerifiedCreators (the signing wallet), ImmutableMetadata
- AgentIdentity plugin carrying the
eip-8004#registration-v1document (model.uri,active,x402Support,registrations,supportedTrust)
Two signing lanes, both self-custodial:
- Agents sign with their own keypair (
SOLANA_SECRET_KEY):mint_onchain_agent. - People sign with Phantom, Solflare, Backpack, Ledger, or any Solana wallet:
prepare_agent_mintbuilds the transaction, the wallet signs it,send_signed_transactionbroadcasts it. No key ever touches the server.
A mainnet deploy pays a flat 0.02 SOL fee, in the same transaction as the mint, and that fee funds $THREE buybacks. Hold $THREE and it halves, then disappears; devnet never pays it. Every preview shows the number and its recipient before anything is signed. See $THREE: the deploy fee and the holder waiver.
Nothing is mocked: real Metaplex programs, real Solana, and devnet support for free end-to-end rehearsal.
Install
npm install -g @three-ws/metaplex-agent-mcp
# or run ad hoc
npx -y @three-ws/metaplex-agent-mcp
Setup
Claude Code:
claude mcp add metaplex-agent -e SOLANA_SECRET_KEY=<base58> -- npx -y @three-ws/metaplex-agent-mcp
Cursor / any MCP client (mcp.json):
{
"mcpServers": {
"metaplex-agent": {
"command": "npx",
"args": ["-y", "@three-ws/metaplex-agent-mcp"],
"env": { "SOLANA_SECRET_KEY": "<base58 secret key>" }
}
}
}
SOLANA_SECRET_KEY is optional: every read tool and the whole Phantom/Solflare flow works without it.
Quick start
Rehearse on devnet for free, then go to mainnet:
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" }
A mainnet deploy costs ~0.027 SOL: ~0.007 in Core rent, identity PDA rent, and network fees, plus a flat 0.02 SOL deploy fee that funds $THREE buybacks. Holding $THREE halves that fee and then waives it, and devnet is free. See $THREE.
Tools
| Tool | What it does |
|---|---|
mint_onchain_agent |
Mint + register, signed by your key (atomic when it fits, auto-split otherwise). confirm:true gates the spend; anything else returns a full preview. |
prepare_agent_mint |
The same mint, built for an external wallet (wallet param) to sign. Returns txs_base64, already co-signed by the new asset keypair; sign with signTransaction / signAllTransactions. |
send_signed_transaction |
Broadcast wallet-signed transactions in order, polling each to confirmation and absorbing the create/register propagation race. |
register_agent_identity |
Enrol an already-minted Core asset in the Agent Registry (idempotent; the signer must be the asset authority). |
get_onchain_agent |
Read any registered agent: asset, plugins, decoded metadata + registration documents, identity PDA, built-in wallet + balance. |
agent_wallet |
An asset's built-in wallet (mpl-core Asset Signer PDA), any address, or the configured signer, with live SOL balance. |
build_registration |
The EIP-8004 registration JSON + data: URI, fully offline. |
list_onchain_agents |
Latest registrations from the live three.ws /api/deployments feed (Solana by default, all_chains:true for EVM ERC-8004 too). |
three_status |
Prices your next deploy: fee schedule, a wallet's live $THREE balance and tier, and the public buyback ledger. |
$THREE: the deploy fee and the holder waiver
A mainnet deploy carries a flat 0.02 SOL fee. Three things about it matter:
- It rides in the same transaction that creates the asset. A deploy that fails, is rejected, or expires moves no money. There is no separate payment step and nothing to reconcile.
- It is disclosed before anything is signed. Every
mint_onchain_agentpreview and everyprepare_agent_mintresponse returnsdeploy_fee_solanddeploy_fee_to, with the tier that produced them. - It funds $THREE buybacks. The fee is paid to the wallet the three.ws
$THREE buyback lane spends from
(
FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpumpis the mint), and the public ledger of what that lane has bought is at/api/three-token/stats. Deploys are the only revenue this package has.
Holding $THREE makes it cheaper, then free:
| $THREE in the paying wallet | Deploy fee |
|---|---|
| under 50,000 | 0.02 SOL |
| 50,000 or more | 0.01 SOL |
| 250,000 or more | free |
The balance is read live from the chain when the transaction is built. Nothing is staked, escrowed, locked, or spent to earn it: hold the tokens in your own wallet and keep them, and the waiver applies to every agent you deploy. Devnet always pays zero, so a full end-to-end rehearsal stays free.
three_status {} → what your next deploy costs and why
three_status { wallet: "<any base58 address>" } → price it for someone else's wallet
Self-hosting a fork with different economics is DEPLOY_FEE_SOL, DEPLOY_FEE_WALLET, and
DEPLOY_FEE_ENABLED.
Customization
Every field the mint touches is a parameter: owner, collection, royalty basis points and splits, verified creator, immutable metadata, on-chain Attributes, permanent freeze/transfer/burn delegates, AddBlocker, off-chain metadata attributes, external_url, services, trust models, registration entries, and full metadata_uri / registration_uri overrides for documents you host yourself. The defaults are the Genesis 333 values, so calling with just name, description, image, and model_url produces an asset indistinguishable in shape from the originals.
Safety
mint_onchain_agentandregister_agent_identitybroadcast only withconfirm: true(setREQUIRE_CONFIRM=falseto opt out); previews cost nothing.- Keys stay yours:
SOLANA_SECRET_KEYor a per-callsecret, never a custodial wallet. The wallet lane needs no key at all. - Balances are checked before spending, RPC endpoints must be HTTPS, and devnet is a first-class target for rehearsal.
Environment variables
| Variable | Default | Meaning |
|---|---|---|
SOLANA_SECRET_KEY |
unset | Base58 secret key or JSON byte array for the minting wallet. |
SOLANA_RPC_URL |
public endpoint | HTTPS RPC. Bring your own for production traffic. |
METAPLEX_AGENT_NETWORK |
mainnet |
Default cluster (mainnet or devnet); every tool takes a per-call network too. |
REQUIRE_CONFIRM |
true |
Gate spends behind confirm: true. |
THREE_WS_BASE |
https://three.ws |
Host for the deployments feed and the $THREE ledger. |
DEPLOY_FEE_SOL |
0.02 |
Mainnet deploy fee, in SOL. |
DEPLOY_FEE_WALLET |
three.ws buyback wallet | Where the deploy fee is paid. |
DEPLOY_FEE_ENABLED |
true |
Set false to build a fork that charges nothing. |
THREE_HALF_PRICE_AT / THREE_FREE_AT |
50000 / 250000 |
$THREE balances that halve, then waive, the fee. |
THREE_MINT |
$THREE mint | Only to track an updated canonical contract. |
Library use
The builders are exported for direct embedding (web apps, scripts):
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 });
The registration and metadata builders are also importable on their own (dependency-free, browser-safe) from @three-ws/metaplex-agent-mcp/lib/registration, and the transaction builders from @three-ws/metaplex-agent-mcp/lib/mint. The three.ws /deploy-onchain page runs on exactly these.
Requirements
- Node 20+
- SOL on the target network for minting (~0.027 SOL per agent on mainnet, or ~0.007 with the holder waiver; devnet is free via faucet)
Links
- three.ws: https://three.ws
- $THREE: https://three.ws/three
- Live deployments feed: https://three.ws/deployments
- Metaplex Agent Registry: https://www.metaplex.com/agents
- Metaplex docs: https://www.metaplex.com/docs/agents
- Source: https://github.com/nirholas/three.ws/tree/main/packages/metaplex-agent-mcp
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。