This section explains how to run a Stripe MCP agent and tools in the cloud using Meshagent Rooms.

You’ll need a Stripe Secret Key to use the Stripe API.

Environment Variables Required

  • STRIPE_SECRET_KEY — Your Stripe API Secret Key.

Steps

  1. Install Meshagent CLI and dependencies:

    pip install "meshagent[all]"
    
  2. Sign up and authenticate with Meshagent:

  3. Launch the Stripe MCP agent in a Meshagent Room:

    meshagent service test \
      --room=test \
      --role=agent \
      --image=meshagent/mcp-stripe:latest \
      --env MESHAGENT_PORT=8001 \
      --env STRIPE_SECRET_KEY=sk_YOUR_STRIPE_SECRET_KEY \
      --port="num=8001 path=/webhook liveness=/ type=meshagent.callable" \
      --name=mcp-stripe-service
    
    • Replace sk_YOUR_STRIPE_SECRET_KEY with your actual Stripe Secret Key.
    • This command launches the MCP server in a Meshagent Room. The room will automatically close if it goes inactive.
  4. Join the room with a chatbot agent and toolkit:

    meshagent chatbot join \
      --room=test \
      --agent-name=sample \
      --name=sample \
      --toolkit=mcp-stripe
    
    • This starts a chatbot in the Meshagent Room with access to the Stripe toolkit.
    • Multiple toolkits and agents can be attached to the same room.
    • The command output will provide a room link to interact with the agent and tools via web UI.

Tools Available

Interact with Stripe services over the Stripe API using these tools in Meshagent Rooms.

Tool summary:

ToolShort Description
cancel_subscriptionCancel a subscription in Stripe.
create_couponCreate a coupon in Stripe.
create_customerCreate a customer in Stripe.
create_invoiceCreate an invoice in Stripe.
create_invoice_itemCreate an invoice item in Stripe.
create_payment_linkCreate a payment link in Stripe.
create_priceCreate a price in Stripe.
create_productCreate a product in Stripe.
create_refundRefund a payment intent in Stripe.
finalize_invoiceFinalize an invoice in Stripe.
list_couponsFetch a list of Coupons from Stripe.
list_customersFetch a list of Customers from Stripe.
list_disputesFetch a list of disputes in Stripe.
list_payment_intentsList payment intents in Stripe.
list_pricesFetch a list of Prices from Stripe.
list_productsFetch a list of Products from Stripe.
list_subscriptionsList all subscriptions in Stripe.
retrieve_balanceRetrieve the balance from Stripe.
update_disputeUpload evidence or respond to a dispute in Stripe.
update_subscriptionUpdate an existing subscription in Stripe.

Tools Details

cancel_subscription

Cancels a subscription in Stripe.

Parameters:

  • subscription (string, required): The ID of the subscription to cancel.

create_coupon

Creates a coupon in Stripe.

Parameters:

  • name (string): Coupon display name.
  • amount_off (number, optional): Amount to subtract (in cents).
    • currency (string, optional): ISO currency code; required if amount_off is set.
  • percent_off (number, optional): Percentage discount (0–100), required if amount_off is not set.
  • duration (string, optional): How long the discount lasts (once, repeating, or forever). Defaults to once.
  • duration_in_months (number, optional): If duration is repeating.

create_customer

Creates a customer in Stripe.

Parameters:

  • name (string): Customer name.
  • email (string, optional): Customer email.

create_invoice

Creates an invoice in Stripe.

Parameters:

  • customer (string): Customer ID.
  • days_until_due (integer, optional): Number of days until due.

create_invoice_item

Creates an invoice item in Stripe.

Parameters:

  • customer (string): Customer ID.
  • invoice (string): Invoice ID.
  • price (string): Price ID.

Creates a payment link in Stripe.

Parameters:

  • price (string): Price ID.
  • quantity (integer): Quantity.

create_price

Creates a price in Stripe.

Parameters:

  • product (string): Product ID.
  • unit_amount (integer): Price (in cents).
  • currency (string): Currency code.

create_product

Creates a product in Stripe.

Parameters:

  • name (string): Product name.
  • description (string, optional): Product description.

create_refund

Refunds a payment intent in Stripe.

Parameters:

  • payment_intent (string): PaymentIntent ID.
  • amount (integer, optional): Amount (in cents).
  • reason (string, optional): Reason for refund.

finalize_invoice

Finalizes an invoice in Stripe.

Parameters:

  • invoice (string): Invoice ID.

list_coupons

Fetches a list of coupons from Stripe.

Parameters:

  • limit (integer, optional): Maximum number to return (1–100).

list_customers

Fetches a list of customers from Stripe.

Parameters:

  • limit (integer, optional): Maximum number to return (1–100).
  • email (string, optional): Filter by email.

list_disputes

Fetches a list of disputes in Stripe.

Parameters:

  • charge (string, optional): Filter by charge ID.
  • payment_intent (string, optional): Filter by PaymentIntent ID.
  • limit (integer, optional): Maximum number to return (1–100, default 10).

list_payment_intents

Lists payment intents in Stripe.

Parameters:

  • customer (string, optional): Customer ID.
  • limit (integer, optional): Number to return (1–100).

list_prices

Fetches a list of prices from Stripe.

Parameters:

  • product (string, optional): Product ID.
  • limit (integer, optional): Number to return (default 10).

list_products

Fetches a list of products from Stripe.

Parameters:

  • limit (integer, optional): Number to return (default 10).

list_subscriptions

Lists subscriptions in Stripe.

Parameters:

  • customer (string, optional): Customer ID.
  • price (string, optional): Price ID.
  • status (string, optional): Subscription status.
  • limit (integer, optional): Number to return (1–100).

retrieve_balance

Retrieves the balance from Stripe.

Parameters: None.


update_dispute

Uploads evidence or responds to a dispute in Stripe.

Parameters:

  • dispute (string): Dispute ID.
  • evidence (object, optional): Evidence fields.
    • cancellation_policy_disclosure, cancellation_rebuttal, duplicate_charge_explanation, uncategorized_text.
  • submit (boolean, optional): Whether to immediately submit evidence.

update_subscription

Updates an existing subscription in Stripe.

Parameters:

  • subscription (string): Subscription ID.
  • proration_behavior (string, optional): Proration handling (create_prorations, none, always_invoice, none_implicit).
  • items (array, optional): List of items — each may contain:
    • id, price, quantity, deleted.