Skip to content

Commit cc23e2b

Browse files
authored
Add PayPal to third-party tools (#1026)
* Update page content * Updates * Formatting * Update tool cards * Edit mkdocs.yml
1 parent 357c624 commit cc23e2b

File tree

5 files changed

+234
-0
lines changed

5 files changed

+234
-0
lines changed

docs/assets/tools-paypal.png

18.2 KB
Loading

docs/tools/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,16 @@ Check out the following pre-built tools that you can use with ADK agents:
273273
</div>
274274
</a>
275275

276+
<a href="/adk-docs/tools/third-party/paypal/" class="tool-card">
277+
<div class="tool-card-image-wrapper">
278+
<img src="../assets/tools-paypal.png" alt="Paypal">
279+
</div>
280+
<div class="tool-card-content">
281+
<h3>Paypal</h3>
282+
<p>Manage payments, send invoices, and handle subscriptions</p>
283+
</div>
284+
</a>
285+
276286
<a href="/adk-docs/tools/third-party/qdrant/" class="tool-card">
277287
<div class="tool-card-image-wrapper">
278288
<img src="../assets/tools-qdrant.png" alt="Qdrant">

docs/tools/third-party/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,16 @@ Check out the following third-party tools that you can use with ADK agents:
139139
</div>
140140
</a>
141141

142+
<a href="/adk-docs/tools/third-party/paypal/" class="tool-card">
143+
<div class="tool-card-image-wrapper">
144+
<img src="../../assets/tools-paypal.png" alt="Paypal">
145+
</div>
146+
<div class="tool-card-content">
147+
<h3>Paypal</h3>
148+
<p>Manage payments, send invoices, and handle subscriptions</p>
149+
</div>
150+
</a>
151+
142152
<a href="/adk-docs/tools/third-party/qdrant/" class="tool-card">
143153
<div class="tool-card-image-wrapper">
144154
<img src="../../assets/tools-qdrant.png" alt="Qdrant">

docs/tools/third-party/paypal.md

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
# PayPal
2+
3+
The [PayPal MCP Server](https://github.com/paypal/paypal-mcp-server) connects
4+
your ADK agent to the [PayPal](https://www.paypal.com/) ecosystem. This
5+
integration gives your agent the ability to manage payments, invoices,
6+
subscriptions, and disputes using natural language, enabling automated commerce
7+
workflows and business insights.
8+
9+
## Use cases
10+
11+
- **Streamline Financial Operations**: Create orders, send invoices, and process
12+
refunds directly through chat without switching context. You can instruct your
13+
agent to "bill Client X" or "refund order Y" immediately.
14+
15+
- **Manage Subscriptions & Products**: Handle the full lifecycle of recurring
16+
billing by creating products, setting up subscription plans, and managing
17+
subscriber details using natural language.
18+
19+
- **Resolve Issues & Track Performance**: Summarize and accept dispute claims,
20+
track shipment statuses, and retrieve merchant insights to make data-driven
21+
decisions on the fly.
22+
23+
## Prerequisites
24+
25+
- Create a [PayPal Developer account](https://developer.paypal.com/)
26+
- Create an app and retrieve your credentials from the
27+
[PayPal Developer Dashboard](https://developer.paypal.com/)
28+
- [Generate an access token](https://developer.paypal.com/reference/get-an-access-token/)
29+
from your credentials
30+
31+
## Use with agent
32+
33+
=== "Local MCP Server"
34+
35+
```python
36+
from google.adk.agents import Agent
37+
from google.adk.tools.mcp_tool import McpToolset
38+
from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams
39+
from mcp import StdioServerParameters
40+
41+
PAYPAL_ENVIRONMENT = "SANDBOX" # Options: "SANDBOX" or "PRODUCTION"
42+
PAYPAL_ACCESS_TOKEN = "YOUR_PAYPAL_ACCESS_TOKEN"
43+
44+
root_agent = Agent(
45+
model="gemini-2.5-pro",
46+
name="paypal_agent",
47+
instruction="Help users manage their PayPal account",
48+
tools=[
49+
McpToolset(
50+
connection_params=StdioConnectionParams(
51+
server_params=StdioServerParameters(
52+
command="npx",
53+
args=[
54+
"-y",
55+
"@paypal/mcp",
56+
"--tools=all",
57+
# (Optional) Specify which tools to enable
58+
# "--tools=subscriptionPlans.list,subscriptionPlans.show",
59+
],
60+
env={
61+
"PAYPAL_ACCESS_TOKEN": PAYPAL_ACCESS_TOKEN,
62+
"PAYPAL_ENVIRONMENT": PAYPAL_ENVIRONMENT,
63+
}
64+
),
65+
timeout=300,
66+
),
67+
)
68+
],
69+
)
70+
```
71+
72+
=== "Remote MCP Server"
73+
74+
```python
75+
from google.adk.agents import Agent
76+
from google.adk.tools.mcp_tool import McpToolset
77+
from google.adk.tools.mcp_tool.mcp_session_manager import SseConnectionParams
78+
79+
PAYPAL_MCP_ENDPOINT = "https://mcp.sandbox.paypal.com/sse" # Production: https://mcp.paypal.com/sse
80+
PAYPAL_ACCESS_TOKEN = "YOUR_PAYPAL_ACCESS_TOKEN"
81+
82+
root_agent = Agent(
83+
model="gemini-2.5-pro",
84+
name="paypal_agent",
85+
instruction="Help users manage their PayPal account",
86+
tools=[
87+
McpToolset(
88+
connection_params=SseConnectionParams(
89+
url=PAYPAL_MCP_ENDPOINT,
90+
headers={
91+
"Authorization": f"Bearer {PAYPAL_ACCESS_TOKEN}",
92+
},
93+
),
94+
)
95+
],
96+
)
97+
```
98+
99+
!!! note
100+
101+
**Token Expiration**: PayPal Access Tokens have a limited lifespan of 3-8
102+
hours. If your agent stops working, ensure your token has not expired and
103+
generate a new one if necessary. You should implement token refresh logic to
104+
handle token expiration.
105+
106+
## Available tools
107+
108+
### Catalog management
109+
110+
Tool | Description
111+
---- | -----------
112+
`create_product` | Create a new product in the PayPal catalog
113+
`list_products` | List products from the PayPal catalog
114+
`show_product_details` | Show details of a specific product from the PayPal catalog
115+
`update_product` | Update an existing product in the PayPal catalog
116+
117+
### Dispute management
118+
119+
Tool | Description
120+
---- | -----------
121+
`list_disputes` | Retrieve a summary of all disputes with optional filtering
122+
`get_dispute` | Retrieve detailed information about a specific dispute
123+
`accept_dispute_claim` | Accept a dispute claim, resolving it in favor of the buyer
124+
125+
### Invoices
126+
127+
Tool | Description
128+
---- | -----------
129+
`create_invoice` | Create a new invoice in the PayPal system
130+
`list_invoices` | List invoices
131+
`get_invoice` | Retrieve details about a specific invoice
132+
`send_invoice` | Send an existing invoice to the specified recipient
133+
`send_invoice_reminder` | Send a reminder for an existing invoice
134+
`cancel_sent_invoice` | Cancel a sent invoice
135+
`generate_invoice_qr_code` | Generate a QR code for an invoice
136+
137+
### Payments
138+
139+
Tool | Description
140+
---- | -----------
141+
`create_order` | Create an order in the PayPal system based on the provided details
142+
`create_refund` | Process a refund for a captured payment
143+
`get_order` | Get details of a specific payment
144+
`get_refund` | Get the details for a specific refund
145+
`pay_order` | Capture payment for an authorized order
146+
147+
### Reporting and insights
148+
149+
Tool | Description
150+
---- | -----------
151+
`get_merchant_insights` | Retrieve business intelligence metrics and analytics for a merchant
152+
`list_transactions` | List all transactions
153+
154+
### Shipment tracking
155+
156+
Tool | Description
157+
---- | -----------
158+
`create_shipment_tracking` | Create shipment tracking information for a PayPal transaction
159+
`get_shipment_tracking` | Get shipment tracking information for a specific shipment
160+
`update_shipment_tracking` | Update shipment tracking information for a specific shipment
161+
162+
### Subscription management
163+
164+
Tool | Description
165+
---- | -----------
166+
`cancel_subscription` | Cancel an active subscription
167+
`create_subscription` | Create a new subscription
168+
`create_subscription_plan` | Create a new subscription plan
169+
`update_subscription` | Update an existing subscription
170+
`list_subscription_plans` | List subscription plans
171+
`show_subscription_details` | Show details of a specific subscription
172+
`show_subscription_plan_details` | Show details of a specific subscription plan
173+
174+
## Configuration
175+
176+
You can control which tools are enabled using the `--tools` command-line
177+
argument. This is useful for limiting the scope of the agent's permissions.
178+
179+
You can enable all tools with `--tools=all` or specify a comma-separated list of
180+
specific tool identifiers.
181+
182+
**Note**: The configuration identifiers below use dot notation (e.g.,
183+
`invoices.create`) which differs from the tool names exposed to the agent (e.g.,
184+
`create_invoice`).
185+
186+
**Products**: `products.create`, `products.list`, `products.update`,
187+
`products.show`
188+
189+
**Disputes**:
190+
`disputes.list`, `disputes.get`, `disputes.create`
191+
192+
**Invoices**: `invoices.create`, `invoices.list`, `invoices.get`,
193+
`invoices.send`, `invoices.sendReminder`, `invoices.cancel`,
194+
`invoices.generateQRC`
195+
196+
**Orders & Payments**: `orders.create`, `orders.get`, `orders.capture`,
197+
`payments.createRefund`, `payments.getRefunds`
198+
199+
**Transactions**:
200+
`transactions.list`
201+
202+
**Shipment**:
203+
`shipment.create`, `shipment.get`
204+
205+
**Subscriptions**: `subscriptionPlans.create`, `subscriptionPlans.list`,
206+
`subscriptionPlans.show`, `subscriptions.create`, `subscriptions.show`,
207+
`subscriptions.cancel`
208+
209+
## Additional resources
210+
211+
- [PayPal MCP Server Documentation](https://docs.paypal.ai/developer/tools/ai/mcp-quickstart)
212+
- [PayPal MCP Server Repository](https://github.com/paypal/paypal-mcp-server)
213+
- [PayPal Agent Tools Reference](https://docs.paypal.ai/developer/tools/ai/agent-tools-ref)

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ nav:
227227
- Linear: tools/third-party/linear.md
228228
- n8n: tools/third-party/n8n.md
229229
- Notion: tools/third-party/notion.md
230+
- PayPal: tools/third-party/paypal.md
230231
- Qdrant: tools/third-party/qdrant.md
231232
- ScrapeGraphAI: tools/third-party/scrapegraphai.md
232233
- Tavily: tools/third-party/tavily.md

0 commit comments

Comments
 (0)