Skip to main content
Glama
oborseth

Official Porkbun MCP Server

Create Mailbox

create_mailbox
Idempotent

Spends account credit, or pays directly by card (pay_with_card) or in USDC (pay_with_usdc). Buy one email hosting mailbox ($36.00 a year, renewing automatically; the current price is price in list_mailboxes) and set it up in…

Instructions

Spends account credit, or pays directly by card (pay_with_card) or in USDC (pay_with_usdc). Buy one email hosting mailbox ($36.00 a year, renewing automatically; the current price is price in list_mailboxes) and set it up in the same call. Check list_mailboxes first: if a mailbox is already waiting (the free trial every registration includes), setup_mailbox is free. Tell the user the price and that it renews yearly before buying. cost_cents must equal the price; dry_run: true with cost_cents: 0 quotes it and checks everything without charging. If the charge succeeds but setup does not, the result says setupComplete: false with a mailboxId: finish with setup_mailbox, do not buy again. Leave password out and Porkbun generates a strong one and returns it ONCE in password: give it to the user straight away, it is not shown again (it can be changed later with set_email_password). If you pass one, it needs 12-72 characters with an upper case letter, a lower case letter, a number and a special character. A mailbox needs Porkbun's MX records and SPF include at the domain apex (the same records as email forwarding), and the call puts them in place. If that would delete MX records for another mail service or rewrite the domain's SPF record, it returns DNS_CHANGE_CONFIRMATION_REQUIRED with dnsChanges and changes (and charges) nothing: tell the user what will change, and only with their OK call again with confirm_dns_changes: true. The answer includes clientSettings (IMAP/SMTP hosts and ports) for setting up a mail app. DKIM and DMARC are set up on the website. Needs a verified account email and phone.

How a purchase is paid. From prepaid account credit by default; a card saved at Porkbun is never charged by a purchase itself. Or directly, for this one purchase: pay_with_card: true (the user's card from their Stripe Link agent wallet, held and charged only if the purchase succeeds) or pay_with_usdc: true (USDC on Base over x402). If the credit is short, the call fails with INSUFFICIENT_FUNDS carrying cost, balance, shortfall, topUpAvailable and usdcAmountToCover (dry_run: true reports the same without charging). Ways forward, simplest first, always telling the user the dollar amount and getting their OK: (1) if they use Stripe Link, retry this exact call with pay_with_card: true; (2) if you can pay x402 (a wallet tool, or this server has PORKBUN_X402_PRIVATE_KEY), retry with pay_with_usdc: true; (3) when topUpAvailable is true a card is saved: top_up_account_credit (amount_cents at least topUpAmountToCover, or omit it for their configured amount), then retry; (4) add credit with top_up_with_card_mpp (Link) or top_up_with_usdc (for usdcAmountToCover, which allows for Coinbase's ~1% fee), then retry; (5) the user adds credit at https://porkbun.com/account/credit. If a purchase fails with VERIFICATION_REQUIRED, the phone (send_phone_verification_code then confirm_phone_verification) and the email (send_email_verification_code then confirm_email_verification) can both be verified without leaving the conversation, the user reading out each code. Suggest configure_auto_topup if they want credit refilled automatically. Money parameters are integer cents: state amounts to the user in dollars (cost_cents: 1108 is $11.08). If you do not move money on a user's behalf, hand it back instead: tell them the shortfall and that they can add it with buy account credit at https://porkbun.com/account/credit, then retry once they have.

Buying for a new or unfunded account: the whole path, including what only the human can do, is at https://porkbun.com/llms/guides/buy-a-domain-from-an-agent. Paying directly in USDC (no account credit needed): set pay_with_usdc: true. If this server has a wallet configured (PORKBUN_X402_PRIVATE_KEY, local installs only), the payment is signed and the purchase completes in this one call. Otherwise the result is status: PAYMENT_REQUIRED with a checkoutId, an x402Url and a payUrl, and nothing is charged: pay the x402Url with a wallet tool that pays x402 URLs (for example Coinbase's awal x402 pay <x402Url> --scheme auth-capture), or have the user pay the payUrl page, then call this tool again with the same arguments plus usdc_checkout_id. Tell the user the dollar amount first. If the purchase fails after payment, the payment is NOT returned to the wallet: it stays on the Porkbun account as credit (the error says keptAsCredit: true with the new balance), so retry without pay_with_usdc to buy from that credit.

Paying directly by card, with a hold (no account credit needed): set pay_with_card: true when the user pays with Stripe Link. The result is status: PAYMENT_REQUIRED with a payUrl and a cardPaymentId; nothing is charged. Pay the payUrl with an MPP wallet tool. With Link's CLI that is two commands: link-cli mpp pay <payUrl> -X POST --context "..." (context at least 100 characters) creates a spend request the user approves in Link; once approved, complete it with link-cli mpp pay <payUrl> --spend-request-id <lsrq_id> -X POST. That only authorizes the card. If link-cli answers NOT_AUTHENTICATED, run link-cli auth login first (a one-time device login the user approves). Then call this tool again with the same arguments plus card_payment_id: if the purchase succeeds the card is charged, and if it fails the hold is released and nothing is charged. The link works until expiresAt; if that passes before it is paid, call this tool again without card_payment_id for a fresh link instead of paying the old one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain for the mailbox, e.g. `example.com`.
addressYesThe mailbox address: the part before the @ (`me`) or the whole address.
dry_runNoIf true, validate everything and return a preview without buying.
passwordNoOptional. Omit to have a strong password generated and returned once.
cost_centsYesThe mailbox price, 3600 for $36.00 a year. Must match exactly. Integer US cents: 803 means $8.03, not $803.
pay_with_cardNoPay for this purchase by card from the user's Stripe Link agent wallet (MPP), with a hold: charged only if the purchase succeeds. Tell the user the amount first.
pay_with_usdcNoPay for this purchase directly in USDC on Base (x402) instead of from account credit. Tell the user the amount first.
card_payment_idNoThe cardPaymentId from an earlier PAYMENT_REQUIRED (pay_with_card), once its payUrl has been paid. Send it with the same arguments as that call.
usdc_checkout_idNoThe checkoutId from an earlier PAYMENT_REQUIRED result, once its x402Url or payUrl has been paid. Send it with the same arguments as that call.
confirm_dns_changesNoSet only after the user agreed to the DNS changes a `DNS_CHANGE_CONFIRMATION_REQUIRED` result described.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.51.1

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare non-readOnly, non-destructive, idempotent, non-openWorld; the description adds far more — that real money is spent, the annual renewal, the DNS mutation and its confirmation gate, that the generated password is shown exactly once, that a failed setup after a successful charge must not be re-purchased, and that a failed post-payment purchase is kept as account credit rather than refunded.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical scoping and DNS-confirmation rules are front-loaded, but the three payment paragraphs run to roughly 1500 words and duplicate generic purchase/payment mechanics that apply to other buying tools on this server, which dilutes the mailbox-specific content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and 10 parameters, the description compensates by documenting return shapes (setupComplete/mailboxId, clientSettings, DNS_CHANGE_CONFIRMATION_REQUIRED, INSUFFICIENT_FUNDS with topUpAvailable, PAYMENT_REQUIRED with checkoutId/x402Url/payUrl) and the prerequisite of a verified account email and phone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine operational meaning: cost_cents must equal the listed price, dry_run with cost_cents 0 quotes without charging, omitting password triggers one-time generation while supplying one must satisfy 12-72 chars with mixed classes, and card_payment_id/usdc_checkout_id must be resent with the original arguments after a PAYMENT_REQUIRED.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource ('Buy one email hosting mailbox ... and set it up in the same call') and immediately distinguishes it from siblings by routing to list_mailboxes and setup_mailbox. An agent can tell this apart from setup_mailbox/renew_mailbox without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing is given for every branch: check list_mailboxes first because a trial mailbox makes setup_mailbox free, use dry_run to quote, use setup_mailbox instead of re-buying after a partial failure, and use confirm_dns_changes only after user approval. Payment alternatives (pay_with_card vs pay_with_usdc vs account credit vs top-up tools) are enumerated with conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools