Agent Press Wire

Agent Press Wire with the Vercel AI SDK

The agent-press-wire-mcp package has a /ai-sdk subpath with tools for the AI SDK. An agent can publish a press release about a product launch or send one over a newswire. Each call is paid in USDC on Base over x402 from a wallet you control. There is no account or API key.

Install

npm install agent-press-wire-mcp ai viem

Requires Node 20 or later and ai 7 or later.

Example

import { generateText, isStepCount } from 'ai';
import { agentPressWireTools } from 'agent-press-wire-mcp/ai-sdk';
import { privateKeyToAccount } from 'viem/accounts';

// Paid calls spend real USDC on Base from this wallet. maxPaymentUsd caps each
// call (default $1, enough for a newsroom release; the $99 and $299 wire tiers
// need a higher cap) and the model cannot raise it.
const tools = agentPressWireTools({
  wallet: privateKeyToAccount(process.env.AGENT_PRIVATE_KEY as `0x${string}`),
  maxPaymentUsd: 1,
});

const { text } = await generateText({
  model: 'openai/gpt-5-mini',
  prompt: 'We just shipped v2 of https://example.com with offline sync. Publish a press release about it.',
  tools,
  stopWhen: isStepCount(3),
});

console.log(text);

The model calls publishPressRelease. About 20 seconds later the result holds the headline, the release text and a public newsroom URL.

Tools

ToolPriceWhat it does
quotePressReleaseFreePrice of a tier (newsroom, wire, premium) and whether your limits allow it. Never signs anything.
publishPressRelease$1Drafts a 350 to 450 word AP-style release from the product URL and publishes it on a search-indexed newsroom page.
distributePressRelease$99 or $299wire: 500+ news sites plus 100+ TV and radio network sites. premium: adds AP News, USA Today, Barchart and StreetInsider. Needs city, country and a contact email. Returns an order_id.
getReleaseStatusFreeStatus and live links for a wire order.

Both paid tools take an optional announcement (what is new). If you already wrote the release, pass headline and body and it is published as written after the safety checks.

Spending limits

These are set in your code. The model cannot change them. Before signing, each paid tool reads the 402 payment terms and checks them against values pinned in the package: pay to 0xF7887C1fAf0DbAedc80C78F9D396D594B69eba95, exactly $1, $99 or $299, USDC on Base mainnet. Anything else is refused. Use a dedicated wallet funded with only what you plan to spend.

To have a person approve the wire tiers before they run, use the AI SDK approval setting:

toolApproval: { distributePressRelease: 'user-approval' }

Results and charges

You are charged only when the job succeeds. Every paid tool returns status and charged:

statuschargedMeaning
paidtrueDone. result has the release or the wire order.
not_paidfalseNothing was signed: no wallet, or the price is over a limit. quote has the price.
rejectedfalseThe service refused the job. 422 means the input needs fixing (often a missing announcement, a topic the wire does not accept, or supplied copy that failed a check); details lists the reasons. 409 is a duplicate of an order from the last 24 hours. 502 and 503 are failures on our side. None of these are charged or count toward maxTotalUsd.
unknown"unknown"The connection failed after the payment authorization was sent. Check the wallet for the returned nonce before retrying.

Not accepted

Crypto token sales, gambling, adult content, health or cure claims, cannabis. On the wire tiers also market-moving news: acquisitions, earnings, IPOs, stock news, FDA approvals, lawsuits.

Source and other clients

Source: github.com/dylancaponi/agent-press-wire-mcp. The same package runs as an MCP server for Claude, Cursor and other MCP clients (npx agent-press-wire-mcp). The HTTP API is described in /openapi.json.