Model Context Protocol (MCP) • SSE

PayXT MCP Server Tutorial & Guide

Connect Claude, ChatGPT, Cursor, Windsurf, or any MCP-compatible AI agent directly to PayXT to generate instant Stripe Checkout links shortened to pay.payxt.app.

1. Hosted MCP SSE Endpoints

PayXT hosts a production Model Context Protocol (MCP) server on Firebase Cloud Functions (Gen 2) using the official @modelcontextprotocol/sdk over Server-Sent Events (SSE) with CORS enabled for web and desktop AI clients.

GET — SSE Stream Endpoint

https://us-central1-payxt-3c9d1.cloudfunctions.net/mcp/sse

POST — JSON-RPC Messages Endpoint

https://us-central1-payxt-3c9d1.cloudfunctions.net/mcp/messages

2. Tool Reference: generate_invoice

Once connected, your AI assistant discovers the generate_invoice tool. When invoked, it creates a live Stripe Checkout Session, shortens the URL with P1.do under https://pay.payxt.app/… (capped at 10 clicks and 90-day expiration), and returns the short link as text.

Parameter Type Required Description
payerName string Yes Client or company name (e.g., "Sarah Jenkins").
amount number Yes Total invoice amount in USD dollars (minimum 0.50, e.g., 275.00).
services string | string[] Yes Service description or array of line item labels (e.g., ["HVAC diagnostic", "Capacitor replacement"]).
applyTax boolean No Whether to apply sales tax to the base amount (adds an itemized Tax line on Stripe Checkout).
taxRate number No Sales tax rate percentage (e.g., 8.5 for 8.5%; defaults to 8.5 when applyTax is true).
convenienceFee boolean No Whether to gross-up the total to pass Stripe processing fees (2.9% + $0.30) to the client as a Processing Fee line item.
userEmail string No Your PayXT account email. Free users can send up to 5 invoices/month total across the mobile app, MCP, and all AI tools.

Example Tool Call Payload

{
  "name": "generate_invoice",
  "arguments": {
    "payerName": "Sarah Jenkins",
    "amount": 275,
    "services": ["HVAC Diagnostic", "Capacitor Replacement"],
    "applyTax": true,
    "taxRate": 8.5,
    "convenienceFee": true
  }
}

Tool Output (Text)

https://pay.payxt.app/jqb9b5m

3. Connecting Your AI Assistant (Step-by-Step)

A. Claude Desktop / Cursor / Windsurf (mcp.json)

Add the PayXT SSE server to your MCP configuration file (claude_desktop_config.json or .cursor/mcp.json):

{
  "mcpServers": {
    "payxt": {
      "url": "https://us-central1-payxt-3c9d1.cloudfunctions.net/mcp/sse"
    }
  }
}

If your desktop client only supports stdio servers, bridge it with npx -y mcp-remote https://us-central1-payxt-3c9d1.cloudfunctions.net/mcp/sse.

B. ChatGPT & Claude Web (Remote MCP Connector)

  1. Open Settings → Connectors / Integrations → Add MCP Server.
  2. Set the Server Name to PayXT.
  3. Paste the SSE URL: https://us-central1-payxt-3c9d1.cloudfunctions.net/mcp/sse.
  4. Save and ask in chat: “Generate a PayXT invoice for Alex Rivera for $185 for emergency drain cleaning with 8.5% tax and convenience fee.”

C. Glama (glama.ai) & Smithery (smithery.ai) MCP Gateways

PayXT supports both unbuffered SSE streaming and Streamable HTTP POST on /mcp/sse, making it directly compatible with hosted MCP directories and gateways:

  • Glama (glama.ai): Open MCP Connectors, create an Egress MCP Connection Profile named PayXT.app, set Endpoint URL to https://us-central1-payxt-3c9d1.cloudfunctions.net/mcp/sse, set Authentication Type to None, and click Test Connection.
  • Smithery (smithery.ai): Register or connect to https://us-central1-payxt-3c9d1.cloudfunctions.net/mcp/sse on Smithery to inspect and invoke generate_invoice from any Smithery-enabled agent.
  • See our dedicated PayXT AI Skills & Agent Guide for portable SKILL.md files.

4. Automated Server-Side Delivery (Twilio SMS & SendGrid Email)

In addition to manual device SMS sharing (deliveryMethod: "manual"), PayXT's createStripeLink Cloud Function supports automated server-side dispatch with built-in timeout protection and Firestore deliveryStatus tracking ('sent' or 'failed'):

SMS (Twilio)

deliveryMethod: "sms"

Sends “Your invoice for [Amount] is ready. Pay securely here: [ShortLink]” to contactValue.

Email (SendGrid)

deliveryMethod: "email"

Sends a formatted HTML & plain-text invoice email with the pay.payxt.app link and total.

Manual / App Share

deliveryMethod: "manual"

Returns the pay.payxt.app short link directly to the mobile app for native SMS, WhatsApp, or clipboard sharing.

MCP & AI Integration FAQ

What is the PayXT MCP Server? ▼
The PayXT MCP Server is a hosted Model Context Protocol server running on Firebase Cloud Functions over Server-Sent Events (SSE). It exposes PayXT’s generate_invoice tool so AI assistants (Claude, ChatGPT, Cursor, Windsurf) can create live Stripe Checkout links shortened to pay.payxt.app.
Do links generated through MCP have the same security limits? ▼
Yes. Every invoice link shortened via P1.do (https://pay.payxt.app/…) allows up to 10 visits and automatically expires after 90 days.
Does the 5-invoice monthly free limit apply to MCP and AI tools too? ▼
Yes. Free users can send up to 5 invoices per calendar month total across all channels—whether generated from the PayXT mobile app, the MCP server, Glama, Smithery, Siri, Google Assistant, or any other AI tool. Every invoice increments the same monthly counter on the Billing screen, which shows your sent count, remaining count, and exact monthly reset date and time. Upgrade to PayXT Pro for unlimited invoices across every surface.