Menu

402-mcp enables x402 payments in MCP - Vercel
📰
0

402-mcp enables x402 payments in MCP - Vercel

Vercel News·Ethan Niser·4 days ago
#ULQsxnDc
#vercel#import#tools#payments#const#article
Reading 0:00
15s threshold

Introducing x402-mcp , a library that integrates with the AI SDK to bring x402 paywalls to Model Context Protocol (MCP) servers to let agents discover and call pay for MCP tools easily and securely. With x402-mcp, you can define MCP servers with paidTools that require payment to run, enabling account-less, low-latency, anonymous payments directly in AI workflows. Payments confirm in ~100–200ms, with fees under $0.01 and support for minimums under $0.001. Getting started is easy, here's how you can define a paid tool: import { createPaidMcpHandler } from "x402-mcp" ; import z from "zod" ; const handler = createPaidMcpHandler ( ( server ) => { server . paidTool ( "add_numbers" , { // declare a price of $0.001 price : 0.001 } , { a : z . number ( ) , b : z . number ( ) } , async ( args ) => { // ...your tool call } ) ; } , { recipient : process . env .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More