Skip to main content
Glama
@three-ws/metaplex-agent-mcp

@three-ws/metaplex-agent-mcp

by nirholas

@three-ws/metaplex-agent-mcp

GitHub stars License Last commit PRs welcome AI agent friendly

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;base64 URI (name, image, animation_url GLB)

  • Royalties plugin (5% to the owner), VerifiedCreators (the signing wallet), ImmutableMetadata

  • AgentIdentity plugin carrying the eip-8004#registration-v1 document (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_mint builds the transaction, the wallet signs it, send_signed_transaction broadcasts 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

Related MCP server: AgentWallet MCP Server

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_agent preview and every prepare_agent_mint response returns deploy_fee_sol and deploy_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 (FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump is 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_agent and register_agent_identity broadcast only with confirm: true (set REQUIRE_CONFIRM=false to opt out); previews cost nothing.

  • Keys stay yours: SOLANA_SECRET_KEY or a per-call secret, 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. When atomic is false, combinedBuilder still holds the whole mint: compiled as a Solana transaction v1 (4,096-byte limit) it lands create + register in one atomic transaction, which is what /deploy-onchain does for any wallet that advertises v1 signing.

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)

Support the project

If metaplex-agent-mcp saves you time, star it on GitHub. Stars are how other developers and AI agents find the repositories worth trusting, and they cost you one click.

Know someone who would use it? Post on X · Share on Bluesky · Share on LinkedIn · Submit to Hacker News · Share on Reddit

Built for AI agents too

Coding agents and LLM tooling can read this repo directly: AGENTS.md, llms.txt, llms-full.txt. Point an agent at https://github.com/nirholas/metaplex-agent-mcp and it has the context it needs.

More from the same author

Contributors

Contributors

Star history

Star History Chart

Part of three.ws

three.ws is a platform for 3D AI agents with Solana wallets: avatars, a skill marketplace, x402 payments and more than seventy MCP servers. @three-ws/metaplex-agent-mcp is one package from it.

Available Tools

11 tools
agent_walletAn agent's built-in wallet, or the signer wallet, with balanceA
Read-only

Show a wallet address and its live SOL balance. Pass asset to derive an on-chain agent's built-in wallet (the Metaplex Core Asset Signer PDA, the wallet shown on metaplex.com/agents). Pass address to inspect any wallet. Pass neither to see the configured signing wallet, e.g. to confirm it is funded before mint_onchain_agent. On mainnet it also reports the wallet $THREE balance and the deploy-fee tier that balance earns (see three_status). Use this to check a balance before a mint or after funding a wallet. Read-only; never moves funds.

Inputs: asset, address, network.

build_registrationBuild an EIP-8004 registration document (no chain access)A
Read-onlyIdempotent

Build the Genesis-style EIP-8004 registration-v1 JSON document and its self-contained data:application/json;base64 URI, without touching Solana. Use it to preview exactly what mint_onchain_agent / register_agent_identity will write on-chain, or to host the document yourself and pass it back as registration_uri.

Inputs: name (required), asset, image, active, +8 more.

get_onchain_agentRead an on-chain agent (asset, registration, wallet)A
Read-only

Fetch a Metaplex Agent Registry agent by its Core asset address: name, owner, update authority, plugins (royalties, verified creators, immutable metadata, attributes), the decoded asset metadata and EIP-8004 registration documents, whether the identity PDA exists, and the built-in agent wallet (Asset Signer PDA) with its live SOL balance. Read-only. Works on any registered agent, e.g. the three.ws Genesis mints. Use this to inspect one agent by its asset address; to discover recent agents call list_onchain_agents.

Inputs: asset (required), network.

list_onchain_agentsList the latest on-chain agent registrationsA
Read-only

The latest agents to land on-chain in the Metaplex Agent Registry, newest first, from the live three.ws /api/deployments feed (which also indexes registrations minted outside three.ws). Each entry carries the Core asset address, name, description, image, owner, 3D and x402 flags, and explorer links. Set all_chains:true to include EVM ERC-8004 registrations in the same stream. Use this to discover recent registrations; call get_onchain_agent on an address for the full record. Read-only.

Inputs: limit, cursor, network, all_chains.

mint_onchain_agentMint an on-chain agent into the Metaplex Agent RegistryA
Destructive

Deploy an AI agent on-chain, Genesis-333 style: mints a Metaplex Core asset (data: URI metadata, verified creator, royalties, immutable metadata) AND registers its EIP-8004 Agent Identity, so it appears on metaplex.com/agents with its own built-in wallet. Runs as ONE atomic transaction when it fits Solana's 1232-byte limit, otherwise as create followed by register (how the Genesis 333 landed). Signs with the configured SOLANA_SECRET_KEY (or a per-call secret) and spends ~0.007 SOL in rent + fees, plus a flat SOL deploy fee on mainnet that funds $THREE buybacks (holding $THREE halves it, then waives it; devnet is free; see three_status). The fee rides in the same transaction as the mint, so a failed mint pays nothing. Without confirm:true it returns a full preview (both JSON documents, the paying wallet, every cost line including the fee and its recipient) and broadcasts NOTHING. Use this when the server holds the paying key and the person approved the preview_agent_mint cost; for Phantom/Solflare users, use prepare_agent_mint instead.

Inputs: name (required), image, owner, active, +24 more.

prepare_agent_mintPrepare an agent mint for a Phantom/Solflare wallet to signA
Read-only

Build the exact Genesis-style mint+register flow (Metaplex Core asset + Agent Identity) for an EXTERNAL Solana wallet: Phantom, Solflare, Backpack, Ledger, anything. Needs no secret key. Returns unsigned transactions base64 in txs_base64 (already co-signed by the new asset keypair) with wallet as the fee payer: one atomic tx when it fits Solana's size limit, else create + register to sign together via signAllTransactions. The wallet signs and broadcasts, or hands the signed array to send_signed_transaction. Includes the same mainnet deploy fee as mint_onchain_agent, priced against the wallet's live $THREE balance and returned as deploy_fee_sol/deploy_fee_to before anything is signed. Broadcasts nothing itself. The blockhash expires after roughly a minute, so sign promptly and re-prepare if a wallet reports an expired transaction. Use this instead of mint_onchain_agent when the person pays from their own browser or hardware wallet.

Inputs: name (required), wallet (required), image, owner, +23 more.

preview_agent_identityPreview an Agent Identity registration (no funds move)A
Read-onlyIdempotent

Preview register_agent_identity before it runs: the identity PDA, whether the asset is already registered, the paying wallet, the cost, and the exact registration document that would be written. Broadcasts nothing. Show it to the user, get a clear yes, then call register_agent_identity with the same arguments, the returned preview_id and confirm_spend: true. Use this before register_agent_identity every time, so the person sees the cost and the document before any SOL moves.

Inputs: name (required), asset (required), image, active, +11 more.

preview_agent_mintPreview an on-chain agent mint (no funds move)A
Read-only

Preview mint_onchain_agent before it runs: both JSON documents, the paying wallet and its live SOL balance, every cost line including the deploy fee and its recipient, and whether the balance covers it. Broadcasts nothing. Show it to the user, get a clear yes, then call mint_onchain_agent with the same arguments, the returned preview_id and confirm_spend: true. Use this before mint_onchain_agent every time, so the person sees the full cost before any SOL moves.

Inputs: name (required), image, owner, active, +23 more.

register_agent_identityRegister an existing Core asset in the Metaplex Agent RegistryA
DestructiveIdempotent

Give an ALREADY-MINTED Metaplex Core asset its Agent Identity: writes the EIP-8004 registration document (as a self-contained data: URI) onto the asset and creates its identity PDA, after which it appears on metaplex.com/agents. The signing wallet must be the asset authority (or the collection authority for collection-bound assets). Registration is one-time per asset and costs ~0.003 SOL; an already-registered asset returns already_registered without spending. Without confirm:true it returns a spend-nothing preview. Use this when the Core asset already exists and only needs its identity; to mint a NEW agent, use mint_onchain_agent or prepare_agent_mint instead.

Inputs: name (required), asset (required), image, active, +12 more.

send_signed_transactionBroadcast signed Solana transactions in order and confirm themA
Destructive

Broadcast one or more fully signed Solana transactions (base64) IN ORDER, polling each to confirmation before the next. Use it to complete the prepare_agent_mint flow: pass the wallet-signed txs_base64 array and the create/register sequencing (including the propagation race) is handled. Whatever the transactions do on-chain happens for real, so only send bytes you built and inspected.

Inputs: network, tx_base64, txs_base64.

three_statusDeploy fee, $THREE holder tier, and the live buyback ledgerA
Read-only

What the next on-chain deploy costs and why. Returns the deploy-fee schedule (a flat SOL fee on mainnet, free on devnet), the live $THREE balance of a wallet and the tier it earns (half price, then free), the wallet the fee is paid to, and the live $THREE market + buyback figures from the public three.ws ledger. Pass wallet to price a specific payer, or omit it to price the configured signer. Read-only: it moves nothing and needs no key. Use this before a mint to tell the person what the deploy fee will be and how holding $THREE lowers it.

Inputs: wallet, network.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 11 tools

    Disambiguation4/5

    The two primary paths (server-held key vs. external browser/hardware wallet) are clearly separated by mint_onchain_agent, prepare_agent_mint, and send_signed_transaction, and the descriptions explicitly say which tool to pick when. The main blur is that mint_onchain_agent and register_agent_identity both have built-in preview modes that duplicate the standalone preview_agent_mint and preview_agent_identity tools, and build_registration overlaps with the JSON shown in those previews, so an agent has to decide between two ways to inspect before spending.

    Naming Consistency3/5

    Everything is snake_case and readable, but verb patterns and vocabulary drift: preview_agent_mint / mint_onchain_agent / prepare_agent_mint use three different phrasings for the same mint domain, and 'agent' vs. 'onchain_agent' vs. 'agent_identity' is inconsistent. Two tools (agent_wallet, three_status) are bare nouns with no verb at all.

    Tool Count5/5

    11 tools is comfortably within the 3-15 range, and each one maps to a distinct step of the mint/register/discover lifecycle rather than padding. The preview tooling is heavier than strictly necessary, but nothing feels gratuitous for a full mint-and-register surface.

    Completeness4/5

    The surface covers preview, two signing models, broadcasting, identity registration, single-agent reads, listing, wallet balance, document building, and fee status, so end-to-end workflows are achievable. Gaps are around post-mint lifecycle operations (metadata update, transfer/authority changes, deregistration) which are largely constrained by Core's immutable metadata, so agents can mostly work around them.

    Maintenance

    ActivityNo data
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      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.
      40
      399 npm
      3
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Fundraising infrastructure for AI agents on Solana: register agents, create milestone-escrowed campaigns, and donate via the x402 pay-to-call flow. Backed by Anchor programs (agent_registry, escrow, reputation) with on-chain reputation for every verified action.
      9
      5
      MIT