Logo von PayPal Agent Toolkit

PayPal Agent Toolkit

Organisation
paypal

PayPal Agent

Herausgeberpaypal
Repositoryagent-toolkit
SpracheTypeScript
Forks
114
Sterne
193
Verfügbare Tools
0
Transporttypstreamable-http
LizenzApache-2.0
Links
  • Tools mit KI-Workflows verbinden

    PayPal Agent Toolkit stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • 0 verfügbare Tools

    Sehen Sie sich unten die aufrufbaren Aktionen an, einschließlich Namen und Beschreibungen, sofern der Server diese bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    193 Sterne und 114 Forks im verlinkten Repository.

PayPal Agent Toolkit

The PayPal Agent Toolkit enables popular agent frameworks including OpenAI's Agent SDK, LangChain, Vercel's AI SDK, and Model Context Protocol (MCP) to integrate with PayPal APIs through function calling. It includes support for TypeScript and is built on top of PayPal APIs and the PayPal SDKs.

Available tools

The PayPal Agent toolkit provides the following tools:

Invoices

  • create_invoice: Create a new invoice in the PayPal system, including recipient billing details, line items, an invoice note, a custom color theme, an optional shipping cost, and an option to enable PAY_BY_BANK as a payment method

  • list_invoices: List invoices with optional pagination and filtering

  • get_invoice: Retrieve details of a specific invoice

  • send_invoice: Send an invoice to recipients

  • send_invoice_reminder: Send a reminder for an existing invoice

  • cancel_sent_invoice: Cancel a sent invoice

  • generate_invoice_qr_code: Generate a QR code for an invoice

  • delete_invoice: Permanently delete a draft or scheduled invoice

  • generate_invoice_number: Generate the next invoice number available to the merchant

  • search_invoicing: Search for invoices or recurring invoice series

  • update_invoicing: Update an existing invoice or recurring invoice series (full-replacement)

  • cancel_invoice_auto_reminder: Cancel all scheduled automatic reminders for an invoice

  • record_payment_for_invoice: Record an external or manual payment against an invoice

  • record_refund_for_invoice: Record a refund against an invoice

  • create_conditional_rules_for_invoice: Create conditional rules for an invoice, such as an early payment discount or automatic cancellation date

  • create_recurring_series: Create a recurring invoice series that automatically generates and sends invoices on a schedule

  • activate_recurring_series: Activate a draft recurring invoice series

  • get_recurring_series: Retrieve details of a specific recurring invoice series

  • cancel_recurring_series: Cancel an active recurring invoice series

  • delete_recurring_series: Delete a draft recurring invoice series

Payments

  • create_order: Create an order in PayPal system based on provided details
  • get_order: Retrieve the details of an order
  • pay_order: Process payment for an authorized order
  • create_refund: Process a refund for a captured payment.
  • get_refund: Get the details for a specific refund.

Dispute Management

  • list_disputes: Retrieve a summary of all open disputes
  • get_dispute: Retrieve detailed information of a specific dispute
  • accept_dispute_claim: Accept a dispute claim

Shipment Tracking

  • create_shipment_tracking: Create a shipment tracking record
  • get_shipment_tracking: Retrieve shipment tracking information
  • update_shipment_tracking: Update shipment tracking information

Catalog Management

  • create_product: Create a new product in the PayPal catalog
  • list_products: List products with optional pagination and filtering
  • show_product_details: Retrieve details of a specific product

Subscription Management

  • create_subscription_plan: Create a new subscription plan
  • list_subscription_plans: List subscription plans
  • show_subscription_plan_details: Retrieve details of a specific subscription plan
  • create_subscription: Create a new subscription
  • show_subscription_details: Retrieve details of a specific subscription
  • update_subscription: update an existing subscription
  • cancel_subscription: Cancel an active subscription

Reporting and Insights

  • list_transactions: List transactions with optional pagination and filtering
  • get_merchant_insights: Retrieve business intelligence metrics and analytics for a merchant

TypeScript

Installation

You don't need this source code unless you want to modify the package. If you just want to use the package run:

sh
npm install @paypal/agent-toolkit

Requirements

  • Node 18+

Usage

The library needs to be configured with your account's client id and secret which is available in your PayPal Developer Dashboard.

The toolkit works with Vercel's AI SDK and can be passed as a list of tools. For more details, refer our examples

typescript
import { PayPalAgentToolkit } from '@paypal/agent-toolkit/ai-sdk';
const paypalToolkit = new PayPalAgentToolkit({
  clientId: process.env.PAYPAL_CLIENT_ID,
  clientSecret: process.env.PAYPAL_CLIENT_SECRET,
  configuration: {
    actions: {
      invoices: {
        create: true,
        createRecurringSeries: true,
        list: true,
        send: true,
        sendReminder: true,
        cancel: true,
        delete: true,
        generateQRC: true,
        generateInvoiceNumber: true,
        search: true,
        update: true,
        cancelReminders: true,
        recordPayment: true,
        recordRefund: true,
        createConditionalRules: true,
      },
      products: { create: true, list: true, update: true },
      subscriptionPlans: { create: true, list: true, show: true },
      shipment: { create: true, show: true, cancel: true },
      orders: { create: true, get: true },
      disputes: { list: true, get: true },
    },
  },
});

To use sandbox mode, add context within your configuration.

typescript
configuration: {
  context: {
    sandbox: true,
  }
}

Initializing the Workflows

typescript
import { PayPalWorkflows, ALL_TOOLS_ENABLED } from '@paypal/agent-toolkit/ai-sdk';
const paypalWorkflows = new PayPalWorkflows({
  clientId: process.env.PAYPAL_CLIENT_ID,
  clientSecret: process.env.PAYPAL_CLIENT_SECRET,
  configuration: {
    actions: ALL_TOOLS_ENABLED,
  },
});

Usage

Using the toolkit

typescript
const llm: LanguageModelV1 = getModel(); // The model to be used with ai-sdk
const { text: response } = await generateText({
  model: llm,
  tools: paypalToolkit.getTools(),
  maxSteps: 10,
  prompt: `Create an order for $50 for custom handcrafted item and get the payment link.`,
});

Environment Variables

The following environment variables can be used:

  • PAYPAL_ACCESS_TOKEN: Your PayPal Access Token
  • PAYPAL_ENVIRONMENT: Set to SANDBOX for sandbox mode, PRODUCTION for production (defaults to SANDBOX mode)

This guide explains how to generate an access token for PayPal API integration, including how to find your client ID and client secret.

Prerequisites

  • PayPal Developer account (for Sandbox)
  • PayPal Business account (for production)

Finding Your Client ID and Client Secret

  1. Create a PayPal Developer Account:

  2. Access Your Credentials:

    • In the Developer Dashboard, click on Apps & Credentials in the menu
    • Switch between Sandbox and Live modes depending on your needs
  3. Create or View an App:

    • To create a new app, click Create App
    • Give your app a name and select a Business account to associate with it
    • For existing apps, click on the app name to view details
  4. Retrieve Credentials:

    • Once your app is created or selected, you'll see a screen with your:
      • Client ID: A public identifier for your app
      • Client Secret: A private key (shown after clicking "Show")
    • Save these credentials securely as they are required for generating access tokens

Generating an Access Token

Using cURL

bash
curl -v https://api-m.sandbox.paypal.com/v1/oauth2/token \\
  -H \"Accept: application/json\" \\
  -H \"Accept-Language: en_US\" \\
  -u \"CLIENT_ID:CLIENT_SECRET\" \\
  -d \"grant_type=client_credentials\"

Replace CLIENT_ID and CLIENT_SECRET with your actual credentials. For production, use https://api-m.paypal.com instead of the sandbox URL.

Using Postman

  1. Create a new request to https://api-m.sandbox.paypal.com/v1/oauth2/token
  2. Set method to POST
  3. Under Authorization, select Basic Auth and enter your Client ID and Client Secret
  4. Under Body, select x-www-form-urlencoded and add a key grant_type with value client_credentials
  5. Send the request

Response

A successful response will look like:

json
{
  "scope": "...",
  "access_token": "Your Access Token",
  "token_type": "Bearer",
  "app_id": "APP-80W284485P519543T",
  "expires_in": 32400,
  "nonce": "..."
}

Copy the access_token value for use in your Claude Desktop integration.

Token Details

  • Sandbox Tokens: Valid for 3-8 hours
  • Production Tokens: Valid for 8 hours
  • It's recommended to implement token refresh logic before expiration

Using the Token with Claude Desktop

Once you have your access token, update the PAYPAL_ACCESS_TOKEN value in your Claude Desktop connector configuration:

json
{
  "env": {
    "PAYPAL_ACCESS_TOKEN": "YOUR_NEW_ACCESS_TOKEN",
    "PAYPAL_ENVIRONMENT": "SANDBOX"
  }
}

Best Practices

  1. Store client ID and client secret securely
  2. Implement token refresh logic to handle token expiration
  3. Use environment-specific tokens (sandbox for testing, production for real transactions)
  4. Avoid hardcoding tokens in application code

Disclaimer

AI-generated content may be inaccurate or incomplete. Users are responsible for independently verifying any information before relying on it. PayPal makes no guarantees regarding output accuracy and is not liable for any decisions, actions, or consequences resulting from its use.

Installation

TypingMind
{
  "mcpServers": {
    "paypal-agent-toolkit": {
      "url": "https://mcp.paypal.com/sse",
      "env": null
    }
  }
}

PayPal Agent Toolkit MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald PayPal Agent Toolkit verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Diese MCP-Integration verbindet sich in TypingMind über die URL eines extern gehosteten MCP-Servers.

Eine MCP-Server-URL hinzufügen

Nutzen Sie diese Option, wenn PayPal Agent Toolkit bereits auf einem Remote-Server gehostet wird oder Ihr Team einen gemeinsamen Konnektor für mehrere Benutzer benötigt.

1

MCP-Konnektoren öffnen

Gehen Sie in TypingMind zu „Plugins“, öffnen Sie „MCP-Konnektoren“ und wählen Sie dann „URL hinzufügen“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Gehen Sie zu „Plugins“.
  3. Öffnen Sie „MCP-Konnektoren“.
  4. Klicken Sie auf „Neue URL“.
TypingMind-Formular zum Hinzufügen einer benutzerdefinierten MCP-Server-URL
2

Server-URL einfügen

Geben Sie https://mcp.paypal.com/sse in das Feld „Server-URL“ ein. Fügen Sie einen Verbindungsnamen, eine Beschreibung, ein Symbol, benutzerdefinierte HTTP-Header oder OAuth-Client-Einstellungen hinzu, falls der Server diese erfordert.

  1. Fügen Sie https://mcp.paypal.com/sse in das Feld „Server-URL“ ein.
  2. Geben Sie einen Verbindungsnamen für PayPal Agent Toolkit ein.
  3. Fügen Sie bei Bedarf eine Beschreibung und ein Symbol hinzu, um die Verbindung leichter zu erkennen.
  4. Fügen Sie benutzerdefinierte HTTP-Header oder OAuth-Client-Daten hinzu, falls der Server eine Authentifizierung erfordert.
3

Verbindung erstellen

Klicken Sie auf „Verbindung erstellen“, kehren Sie dann zur Plugin-Liste zurück und prüfen Sie, ob die neue MCP-Verbindung aktiv ist.

  1. Klicken Sie auf „Verbindung erstellen“.
  2. Kehren Sie zur Liste der MCP-Konnektoren zurück.
  3. Prüfen Sie, ob die Verbindung zu PayPal Agent Toolkit als aktiv angezeigt wird.
  4. Aktualisieren Sie die Plugin-Liste, falls die Verbindung nicht sofort angezeigt wird.
4

Modelle ohne erneuten Verbindungsaufbau wechseln

Starten Sie einen Chat mit Ihrem bevorzugten Modell, aktivieren Sie unter „Plugins“ die Tools von PayPal Agent Toolkit und wechseln Sie bei Bedarf zu einem anderen Modell. Die MCP-Verbindung bleibt im TypingMind-Arbeitsbereich verfügbar.

  1. Starten Sie einen neuen Chat in TypingMind.
  2. Wählen Sie das KI-Modell, das Sie verwenden möchten.
  3. Aktivieren Sie die Tools von PayPal Agent Toolkit unter „Plugins“.
  4. Bitten Sie das Modell, das Tool bei Bedarf zu verwenden.
  5. Wechseln Sie zu einem anderen KI-Modell und verwenden Sie dieselbe MCP-Verbindung weiter.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit PayPal Agent Toolkit bei dieser Aufgabe helfen?
PayPal Agent Toolkit
Gerne. Ich habe es gelesen.
Das habe ich mit PayPal Agent Toolkit gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server PayPal Agent Toolkit verwendet?

PayPal Agent Toolkit ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich PayPal Agent Toolkit MCP mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie PayPal Agent Toolkit mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum PayPal Agent Toolkit MCP mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald PayPal Agent Toolkit verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich PayPal Agent Toolkit MCP mit TypingMind?

Sie können PayPal Agent Toolkit in TypingMind verbinden, indem Sie die URL des gehosteten MCP-Servers hinzufügen. Das ist sinnvoll, wenn Sie eine entfernte MCP-Verbindung benötigen, die in Ihrem TypingMind-Arbeitsbereich verfügbar ist.

Welche Tools stellt PayPal Agent Toolkit MCP in TypingMind bereit?

PayPal Agent Toolkit stellt MCP-Funktionen bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um PayPal Agent Toolkit MCP zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal, sodass Sie die Kontrolle über Ihre Modellanbieter, API-Schlüssel, Prompts und MCP-Konfiguration behalten. Falls PayPal Agent Toolkit eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇