Skip to main content
Glama
agentmetal/mcp

agentmetal/mcp

by agentmetal

@agentmetal/mcp

MCP server that exposes AgentMetal as tools, so an agent can discover → pay → provision → SSH in → run commands → manage → renew its own Linux server (VPS / cloud instance) with no human signup. Paid tools sign USDC payments over x402 v2 (or pay by card); the rest are plain HTTP.

agentmetal/mcp MCP server CI

Tools

13 tools. Paid tools sign a USDC/x402 payment; account-gated tools need AGENTMETAL_API_KEY (am_live_…) and ownership of the server.

Tool

Pays?

Account key?

What it does

get_catalog

—

—

List plans, locations, and add-on pricing (bandwidth, storage). The free discovery hook.

provision_server

✅ USDC

—

Provision a VPS (plan, days, optional ssh_key/via, managed_key) → id, IPv4, SSH. With managed_key:true, a server-side keypair is generated, authorized, and the private key returned once (stored only encrypted) to enable exec_command.

get_server

—

—

Status, IPv4, expiry, bandwidth, storage for a server id

list_servers

—

—

Fleet for a wallet/account

extend_server

✅ USDC

—

Extend a lease by N days

destroy_server

—

✅

Destroy now

reboot_server

—

✅

Soft-reboot an owned server

server_logs

—

✅

Hypervisor-level diagnostics without logging in: status, recent provider actions, a VNC console URL, and live CPU/disk/net metrics (no text boot log exists provider-side)

exec_command

—

✅

Run a shell command as root over SSH → exit_code/stdout/stderr. Requires a server provisioned with managed_key:true. Bounded: 1–120 s timeout, 256 KB output cap.

get_firewall

—

—

Read a box's edge-firewall rules. Callable from the box itself (source-IP identity) or with an account key.

manage_firewall

—

—

Open/close inbound ports on a box's edge firewall (protocol/port/source_ips). From the box itself or with an account key; SSH-lockout guarded.

claim_account

—

—

Email a one-time claim code (via AWS SES)

verify_claim

—

—

Redeem the code for an account API key. Link a wallet by also passing wallet + wallet_signature.

Add-ons (currently API endpoints, not yet separate MCP tools): extra storage ($0.01/GB/day, attached block volume) via POST /v1/servers/{id}/storage and extra bandwidth ($2/TB beyond the 20 TB included) via POST /v1/servers/{id}/bandwidth.

Related MCP server: x402 Payment Gateway MCP Server

Configuration (env)

Var

Default

Purpose

AGENTMETAL_BASE_URL

https://api.agentmetal.dev

API base URL

WALLET_PRIVATE_KEY

—

0x… EVM key used to pay 402s. Omit and paid tools fail with a clear message.

AGENTMETAL_NETWORK

eip155:8453

CAIP-2 network (Base mainnet)

AGENTMETAL_MAX_USDC

50

Per-request spend cap, in USDC

AGENTMETAL_API_KEY

—

am_live_… account key, required for destroy_server / reboot_server / server_logs / exec_command

Use with Claude Code

// .mcp.json (or claude mcp add)
{
  "mcpServers": {
    "agentmetal": {
      "command": "node",
      "args": ["packages/mcp/src/index.ts"],
      "env": {
        "WALLET_PRIVATE_KEY": "0x…",
        "AGENTMETAL_MAX_USDC": "50"
      }
    }
  }
}

The wallet must hold USDC on Base. The spend cap (AGENTMETAL_MAX_USDC) bounds what any single tool call can pay; a 402 above the cap is refused before signing.

Status: client + server are unit-tested and the stdio handshake is verified. Live USDC settlement needs a funded wallet + an x402 facilitator that supports the exact / eip155:8453 kind.

Available Tools

11 tools
claim_accountClaim an account (request code)A

Begin claiming an AgentMetal account by email. Sends a one-time 6-digit code to the address; redeem it with verify_claim to get an account API key. Side effect: sends one email. Does not charge. Accounts are OPTIONAL — they add fleet management under one key, monthly card billing, and higher quotas, but are not required to provision or pay. Call verify_claim next with the emailed code.

Inputs: email (required).

destroy_serverDestroy a serverA

Permanently destroy a server RIGHT NOW, before its lease expires. IRREVERSIBLE — the VM and all its data are deleted and remaining lease time is NOT refunded. Requires an account API key (AGENTMETAL_API_KEY); without one this returns an auth error. Use to free quota or stop holding an unneeded box. To let a box expire naturally instead, simply do not extend it.

Inputs: id (required).

exec_commandRun a command on a serverA

Run a single shell command as ROOT on a server over SSH and get back its exit code, stdout, and stderr. Requires (1) an account API key (AGENTMETAL_API_KEY) AND ownership of the server, and (2) a server provisioned with managed_key:true — the only way the API holds a key it can log in with; a box created without managed_key returns "no_managed_key". The command runs in a non-interactive shell with no TTY, so avoid prompts; chain steps with && or ;. Execution is bounded by timeout_seconds (1–120, default 60); if it overruns, the process is killed and timed_out is true. Output is capped at 256 KB per stream. Use to install packages, run scripts, or inspect a box you own without opening your own SSH session.

Inputs: id (required), command (required), timeout_seconds.

extend_serverExtend a server leaseA

Extend an existing server's lease so it is not auto-destroyed at expiry. SPENDS REAL USDC — signed on-chain via x402 (Base) up to the per-call spend cap; a real charge. Adds days days to the current expiry and returns the new expiry (unix seconds). Use before a lease runs out to keep a box alive; check the current expiry first with get_server.

Inputs: id (required), days (required).

get_catalogList plans, locations, and pricingA

List available server plans (size + price), the regions servers can run in, and add-on pricing for bandwidth and storage. FREE — read-only, charges no money and needs no wallet or account. Call this FIRST to see what sizes, regions, and prices are on offer before provisioning a server.

Inputs: no named parameters.

get_serverGet server statusA

Look up one server's live status (provisioning | running | suspended | expired | destroyed), public IPv4, lease expiry (unix seconds), and bandwidth usage. Read-only — never charges money or changes the server. Use to confirm a box is up and reachable, or to see how long it has before auto-destroy.

Inputs: id (required).

list_serversList your serversA

List every server (the fleet) for a payer wallet, or for the whole account when an account API key is configured. Read-only — never charges or changes anything. Defaults to the wallet configured on this MCP server; pass wallet to list a different payer. Use to enumerate active boxes before calling extend_server or destroy_server.

Inputs: wallet.

provision_serverProvision a serverA

Provision a brand-new Linux VPS and pay for it in a single call. SPENDS REAL USDC — the payment is signed on-chain via x402 (Base) up to this MCP server's per-call spend cap; it is a real charge, not a quote or a dry run. Returns the server id (srv_…), public IPv4, and an ssh root@<ip> target, usually reachable in under 60 seconds. Use when an agent needs its own compute to build, run, or host something with no human signup. Pass ssh_key to get inbound SSH; omit it and the box boots with no way to log in. The lease lasts days days, after which the server is automatically destroyed unless you extend_server first.

Inputs: plan (required), days (required), ssh_key, managed_key, +1 more.

reboot_serverReboot a serverA

Soft-reboot a server (graceful ACPI restart) without destroying it or losing data. Use to recover a box that has become unresponsive or to apply changes that need a restart. Requires an account API key (AGENTMETAL_API_KEY) and ownership of the server; without one this returns an auth error. Does not charge money. Returns immediately with status "rebooting"; the box is back in well under a minute.

Inputs: id (required).

server_logsServer diagnostics (hypervisor-level)A

Hypervisor-level diagnostics for a server WITHOUT logging into it: current status, recent provider actions (with any error messages), a VNC console URL + one-time password, and live CPU / disk / network metrics. Use to diagnose a stuck, unreachable, or misbehaving box from the outside. Requires an account API key (AGENTMETAL_API_KEY) and ownership; does not charge money. NOTE: the cloud provider exposes no text serial-console / boot log, so this returns actions + console access + metrics, not a plain-text log — open the VNC console URL for screen-level access.

Inputs: id (required).

verify_claimVerify an account claimA

Complete an account claim using the 6-digit code emailed by claim_account. Returns a long-lived account API key (am_live_…) — store it securely; it authorizes destroy_server and account-scoped calls. Optionally link a wallet so its existing servers attach to the account. The code expires 10 minutes after claim_account and is invalidated after 5 wrong attempts (re-run claim_account to retry).

Inputs: email (required), code (required), wallet.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.5/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool targets a distinct operation: account claiming, server provisioning, lifecycle management, diagnostics, and catalog browsing. No overlapping purposes.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (e.g., claim_account, provision_server, get_catalog).

    Tool Count5/5

    11 tools are well-scoped for a VPS provisioning service, covering account management, server CRUD, diagnostics, and catalog without being overly numerous or sparse.

    Completeness4/5

    Covers core lifecycle: account creation, provision, destroy, extend, reboot, list, get details, execute commands, logs, and catalog. Minor gaps like no explicit SSH key management beyond initial provision.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers