thedruid831 commited on
Commit
fa15dc5
Β·
verified Β·
1 Parent(s): 481d6d5

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +708 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Mcppaypal
3
- emoji: 🌍
4
- colorFrom: red
5
- colorTo: purple
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: mcppaypal
3
+ emoji: 🐳
4
+ colorFrom: purple
5
+ colorTo: pink
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,708 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>PayPal MCP Server Installation Guide</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .codeblock {
11
+ font-family: 'Courier New', monospace;
12
+ background-color: #2d3748;
13
+ color: #f7fafc;
14
+ border-radius: 0.5rem;
15
+ overflow-x: auto;
16
+ }
17
+ .step-number {
18
+ display: inline-flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ width: 2rem;
22
+ height: 2rem;
23
+ border-radius: 50%;
24
+ background-color: #3182ce;
25
+ color: white;
26
+ margin-right: 1rem;
27
+ flex-shrink: 0;
28
+ }
29
+ .sidebar-link {
30
+ transition: all 0.2s ease;
31
+ }
32
+ .sidebar-link:hover {
33
+ background-color: #2d3748;
34
+ transform: translateX(3px);
35
+ }
36
+ .nav-highlight {
37
+ position: absolute;
38
+ left: 0;
39
+ top: 0;
40
+ height: 100%;
41
+ width: 4px;
42
+ background-color: #4299e1;
43
+ }
44
+ @keyframes pulse {
45
+ 0%, 100% { opacity: 1; }
46
+ 50% { opacity: 0.5; }
47
+ }
48
+ .pulse-animation {
49
+ animation: pulse 2s infinite;
50
+ }
51
+ </style>
52
+ </head>
53
+ <body class="bg-gray-100 min-h-screen">
54
+ <div class="flex">
55
+ <!-- Sidebar -->
56
+ <div class="w-64 bg-gray-900 text-white h-screen sticky top-0 overflow-y-auto hidden md:block">
57
+ <div class="p-6">
58
+ <h1 class="text-2xl font-bold mb-6 flex items-center">
59
+ <i class="fab fa-paypal text-blue-400 mr-2"></i>
60
+ <span>MCP Server</span>
61
+ </h1>
62
+ <div class="space-y-2">
63
+ <div class="relative sidebar-link active">
64
+ <div class="nav-highlight"></div>
65
+ <a href="#overview" class="flex items-center px-4 py-2 text-blue-200">
66
+ <i class="fas fa-home mr-2"></i> Overview
67
+ </a>
68
+ </div>
69
+ <div class="relative sidebar-link">
70
+ <a href="#structure" class="flex items-center px-4 py-2 hover:text-blue-200">
71
+ <i class="fas fa-folder-open mr-2"></i> Repository Structure
72
+ </a>
73
+ </div>
74
+ <div class="relative sidebar-link">
75
+ <a href="#installation" class="flex items-center px-4 py-2 hover:text-blue-200">
76
+ <i class="fas fa-download mr-2"></i> Installation Steps
77
+ </a>
78
+ </div>
79
+ <div class="relative sidebar-link">
80
+ <a href="#configuration" class="flex items-center px-4 py-2 hover:text-blue-200">
81
+ <i class="fas fa-cog mr-2"></i> MCP Configuration
82
+ </a>
83
+ </div>
84
+ <div class="relative sidebar-link">
85
+ <a href="#validation" class="flex items-center px-4 py-2 hover:text-blue-200">
86
+ <i class="fas fa-check-circle mr-2"></i> Validation Steps
87
+ </a>
88
+ </div>
89
+ <div class="relative sidebar-link">
90
+ <a href="#issues" class="flex items-center px-4 py-2 hover:text-blue-200">
91
+ <i class="fas fa-exclamation-triangle mr-2"></i> Common Issues
92
+ </a>
93
+ </div>
94
+ <div class="relative sidebar-link">
95
+ <a href="#testing" class="flex items-center px-4 py-2 hover:text-blue-200">
96
+ <i class="fas fa-vial mr-2"></i> Testing
97
+ </a>
98
+ </div>
99
+ <div class="relative sidebar-link">
100
+ <a href="#security" class="flex items-center px-4 py-2 hover:text-blue-200">
101
+ <i class="fas fa-shield-alt mr-2"></i> Security
102
+ </a>
103
+ </div>
104
+ <div class="relative sidebar-link">
105
+ <a href="#resources" class="flex items-center px-4 py-2 hover:text-blue-200">
106
+ <i class="fas fa-book mr-2"></i> Resources
107
+ </a>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ </div>
112
+
113
+ <!-- Main content -->
114
+ <div class="flex-1 p-8">
115
+ <div class="max-w-4xl mx-auto">
116
+ <header class="mb-12">
117
+ <h1 class="text-4xl font-bold text-gray-800 mb-4">
118
+ PayPal MCP Server<br>Installation Guide
119
+ </h1>
120
+ <p class="text-xl text-gray-600">
121
+ Comprehensive guide for setting up the PayPal Model Context Protocol server
122
+ </p>
123
+ <div class="mt-6 flex flex-wrap gap-4">
124
+ <div class="flex items-center bg-blue-100 px-4 py-2 rounded-full">
125
+ <i class="fas fa-code-branch text-blue-500 mr-2"></i>
126
+ <span class="text-sm font-medium">v2.4.1</span>
127
+ </div>
128
+ <div class="flex items-center bg-green-100 px-4 py-2 rounded-full">
129
+ <i class="fas fa-lock text-green-500 mr-2"></i>
130
+ <span class="text-sm font-medium">Production Ready</span>
131
+ </div>
132
+ <div class="flex items-center bg-purple-100 px-4 py-2 rounded-full">
133
+ <i class="fab fa-node-js text-purple-500 mr-2"></i>
134
+ <span class="text-sm font-medium">Node.js 16+</span>
135
+ </div>
136
+ </div>
137
+ </header>
138
+
139
+ <section id="overview" class="mb-12">
140
+ <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
141
+ <i class="fas fa-home text-blue-500 mr-2"></i>Overview
142
+ </h2>
143
+ <div class="bg-white rounded-xl shadow-md p-6 mb-6">
144
+ <p class="text-gray-700 mb-4">
145
+ This guide provides detailed instructions for AI agents to assist with installing and configuring the PayPal MCP (Model Context Protocol) server. The MCP server enables secure integration between AI models and PayPal's payment services.
146
+ </p>
147
+ <div class="grid md:grid-cols-3 gap-4">
148
+ <div class="bg-blue-50 p-4 rounded-lg">
149
+ <h3 class="font-semibold text-blue-800 mb-2"><i class="fas fa-check-circle mr-2"></i>Key Features</h3>
150
+ <ul class="text-sm text-gray-700 space-y-1">
151
+ <li>Type-safe PayPal API integration</li>
152
+ <li>Secure credential management</li>
153
+ <li>Comprehensive error handling</li>
154
+ <li>Cross-platform configuration</li>
155
+ </ul>
156
+ </div>
157
+ <div class="bg-purple-50 p-4 rounded-lg">
158
+ <h3 class="font-semibold text-purple-800 mb-2"><i class="fas fa-bolt mr-2"></i>Requirements</h3>
159
+ <ul class="text-sm text-gray-700 space-y-1">
160
+ <li>Node.js 16.x or later</li>
161
+ <li>TypeScript 5.0+</li>
162
+ <li>PayPal developer account</li>
163
+ <li>MCP SDK</li>
164
+ </ul>
165
+ </div>
166
+ <div class="bg-green-50 p-4 rounded-lg">
167
+ <h3 class="font-semibold text-green-800 mb-2"><i class="fas fa-clock mr-2"></i>Est. Setup Time</h3>
168
+ <ul class="text-sm text-gray-700 space-y-1">
169
+ <li>Basic setup: 10-15 mins</li>
170
+ <li>Full configuration: 30 mins</li>
171
+ <li>Testing/debugging: 15-30 mins</li>
172
+ </ul>
173
+ </div>
174
+ </div>
175
+ </div>
176
+ </section>
177
+
178
+ <section id="structure" class="mb-12">
179
+ <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
180
+ <i class="fas fa-folder-open text-blue-500 mr-2"></i>Repository Structure
181
+ </h2>
182
+ <div class="bg-white rounded-xl shadow-md p-6">
183
+ <div class="codeblock p-4 mb-4">
184
+ <pre class="text-sm">
185
+ paypal-server/
186
+ β”œβ”€β”€ src/
187
+ β”‚ └── index.ts # Main server implementation
188
+ β”œβ”€β”€ .github/
189
+ β”‚ └── workflows/
190
+ β”‚ └── ci.yml # GitHub Actions workflow
191
+ β”œβ”€β”€ package.json # Node.js dependencies and scripts
192
+ β”œβ”€β”€ tsconfig.json # TypeScript configuration
193
+ β”œβ”€β”€ README.md # General documentation
194
+ β”œβ”€β”€ LICENSE # MIT license
195
+ └── .gitignore # Git ignore rules</pre>
196
+ </div>
197
+ <div class="grid md:grid-cols-2 gap-4">
198
+ <div class="bg-gray-50 p-4 rounded-lg">
199
+ <h3 class="font-semibold text-gray-800 mb-2"><i class="fas fa-file-code mr-2"></i>Key Files</h3>
200
+ <ul class="text-sm text-gray-700 space-y-2">
201
+ <li><span class="font-mono text-orange-600">index.ts</span> - Main server implementation</li>
202
+ <li><span class="font-mono text-orange-600">ci.yml</span> - CI/CD pipeline configuration</li>
203
+ <li><span class="font-mono text-orange-600">package.json</span> - Dependencies and scripts</li>
204
+ </ul>
205
+ </div>
206
+ <div class="bg-gray-50 p-4 rounded-lg">
207
+ <h3 class="font-semibold text-gray-800 mb-2"><i class="fas fa-info-circle mr-2"></i>Notes</h3>
208
+ <ul class="text-sm text-gray-700 space-y-2">
209
+ <li>All source files are in <span class="font-mono">src/</span></li>
210
+ <li>GitHub Actions handles automated testing</li>
211
+ <li>TypeScript configuration must be valid</li>
212
+ </ul>
213
+ </div>
214
+ </div>
215
+ </div>
216
+ </section>
217
+
218
+ <section id="installation" class="mb-12">
219
+ <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
220
+ <i class="fas fa-download text-blue-500 mr-2"></i>Installation Steps
221
+ </h2>
222
+ <div class="bg-white rounded-xl shadow-md p-6">
223
+ <div class="space-y-6">
224
+ <div class="flex items-start">
225
+ <div class="step-number">1</div>
226
+ <div class="flex-1">
227
+ <h3 class="font-semibold text-gray-800 mb-2">Project Setup</h3>
228
+ <p class="text-gray-700 mb-3">Initialize the project directory and install required dependencies.</p>
229
+ <div class="codeblock p-4 mb-2">
230
+ <pre class="text-sm">
231
+ # Create project directory
232
+ mkdir paypal-server
233
+ cd paypal-server
234
+
235
+ # Initialize Node.js project
236
+ npm init -y
237
+
238
+ # Install dependencies
239
+ npm install @modelcontextprotocol/sdk axios typescript @types/node</pre>
240
+ </div>
241
+ <div class="bg-yellow-50 border-l-4 border-yellow-400 p-4">
242
+ <div class="flex">
243
+ <div class="flex-shrink-0">
244
+ <i class="fas fa-exclamation-triangle text-yellow-400"></i>
245
+ </div>
246
+ <div class="ml-3">
247
+ <p class="text-sm text-yellow-700">
248
+ Ensure Node.js version 16 or higher is installed before proceeding.
249
+ </p>
250
+ </div>
251
+ </div>
252
+ </div>
253
+ </div>
254
+ </div>
255
+
256
+ <div class="flex items-start">
257
+ <div class="step-number">2</div>
258
+ <div class="flex-1">
259
+ <h3 class="font-semibold text-gray-800 mb-2">TypeScript Configuration</h3>
260
+ <p class="text-gray-700">Configure TypeScript for ES modules and strict type checking.</p>
261
+ </div>
262
+ </div>
263
+
264
+ <div class="flex items-start">
265
+ <div class="step-number">3</div>
266
+ <div class="flex-1">
267
+ <h3 class="font-semibold text-gray-800 mb-2">Environment Configuration</h3>
268
+ <p class="text-gray-700">Guide users through setting up PayPal credentials:</p>
269
+ <div class="grid md:grid-cols-3 gap-4 mt-4">
270
+ <div class="border rounded-lg p-4">
271
+ <div class="flex items-center justify-center w-12 h-12 bg-blue-100 rounded-full mb-3 mx-auto">
272
+ <i class="fas fa-sign-in-alt text-blue-500 text-xl"></i>
273
+ </div>
274
+ <h4 class="text-center font-medium text-gray-800">1. Developer Dashboard</h4>
275
+ <p class="text-sm text-center text-gray-600 mt-1">
276
+ Direct to developer.paypal.com
277
+ </p>
278
+ </div>
279
+ <div class="border rounded-lg p-4">
280
+ <div class="flex items-center justify-center w-12 h-12 bg-blue-100 rounded-full mb-3 mx-auto">
281
+ <i class="fas fa-cogs text-blue-500 text-xl"></i>
282
+ </div>
283
+ <h4 class="text-center font-medium text-gray-800">2. Create API App</h4>
284
+ <p class="text-sm text-center text-gray-600 mt-1">
285
+ Guide through REST API setup
286
+ </p>
287
+ </div>
288
+ <div class="border rounded-lg p-4">
289
+ <div class="flex items-center justify-center w-12 h-12 bg-blue-100 rounded-full mb-3 mx-auto">
290
+ <i class="fas fa-key text-blue-500 text-xl"></i>
291
+ </div>
292
+ <h4 class="text-center font-medium text-gray-800">3. Secure Storage</h4>
293
+ <p class="text-sm text-center text-gray-600 mt-1">
294
+ Help store Client ID/Secret
295
+ </p>
296
+ </div>
297
+ </div>
298
+ </div>
299
+ </div>
300
+ </div>
301
+ </div>
302
+ </section>
303
+
304
+ <section id="configuration" class="mb-12">
305
+ <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
306
+ <i class="fas fa-cog text-blue-500 mr-2"></i>MCP Configuration
307
+ </h2>
308
+ <div class="bg-white rounded-xl shadow-md p-6">
309
+ <h3 class="font-semibold text-gray-800 mb-4">Settings File Locations</h3>
310
+ <div class="grid md:grid-cols-3 gap-4 mb-6">
311
+ <div class="border rounded-lg p-4">
312
+ <div class="flex items-center">
313
+ <i class="fab fa-windows text-blue-500 mr-2"></i>
314
+ <span class="font-medium">Windows</span>
315
+ </div>
316
+ <div class="codeblock text-xs mt-2 p-2">
317
+ %APPDATA%/Windsurf/User/globalStorage/.../cline_mcp_settings.json
318
+ </div>
319
+ </div>
320
+ <div class="border rounded-lg p-4">
321
+ <div class="flex items-center">
322
+ <i class="fab fa-apple text-gray-500 mr-2"></i>
323
+ <span class="font-medium">macOS</span>
324
+ </div>
325
+ <div class="codeblock text-xs mt-2 p-2">
326
+ ~/Library/Application Support/Claude/..._config.json
327
+ </div>
328
+ </div>
329
+ <div class="border rounded-lg p-4">
330
+ <div class="flex items-center">
331
+ <i class="fab fa-linux text-yellow-500 mr-2"></i>
332
+ <span class="font-medium">Linux</span>
333
+ </div>
334
+ <div class="codeblock text-xs mt-2 p-2">
335
+ ~/.config/claude/settings.json
336
+ </div>
337
+ </div>
338
+ </div>
339
+
340
+ <h3 class="font-semibold text-gray-800 mb-4">Configuration Template</h3>
341
+ <div class="codeblock p-4 mb-6">
342
+ <pre class="text-sm">
343
+ {
344
+ "mcpServers": {
345
+ "paypal": {
346
+ "command": "node",
347
+ "args": ["path/to/paypal-server/build/index.js"],
348
+ "env": {
349
+ "PAYPAL_CLIENT_ID": "your_client_id",
350
+ "PAYPAL_CLIENT_SECRET": "your_client_secret"
351
+ },
352
+ "disabled": false,
353
+ "autoApprove": []
354
+ }
355
+ }
356
+ }</pre>
357
+ </div>
358
+
359
+ <div class="bg-orange-50 border-l-4 border-orange-400 p-4">
360
+ <div class="flex">
361
+ <div class="flex-shrink-0">
362
+ <i class="fas fa-exclamation-circle text-orange-400"></i>
363
+ </div>
364
+ <div class="ml-3">
365
+ <h4 class="text-sm font-medium text-orange-800">Important Security Note</h4>
366
+ <p class="text-sm text-orange-700 mt-1">
367
+ Never commit these configuration files with real credentials. Use environment variables in production.
368
+ </p>
369
+ </div>
370
+ </div>
371
+ </div>
372
+ </div>
373
+ </section>
374
+
375
+ <section id="validation" class="mb-12">
376
+ <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
377
+ <i class="fas fa-check-circle text-blue-500 mr-2"></i>Validation Steps
378
+ </h2>
379
+ <div class="bg-white rounded-xl shadow-md p-6">
380
+ <div class="grid md:grid-cols-2 gap-6">
381
+ <div>
382
+ <h3 class="font-semibold text-gray-800 mb-3 flex items-center">
383
+ <i class="fas fa-code text-blue-500 mr-2"></i>TypeScript Checks
384
+ </h3>
385
+ <ul class="text-gray-700 space-y-3">
386
+ <li class="flex items-start">
387
+ <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
388
+ <span>Verify TypeScript compilation succeeds</span>
389
+ </li>
390
+ <li class="flex items-start">
391
+ <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
392
+ <span>Check all API endpoints are properly typed</span>
393
+ </li>
394
+ </ul>
395
+ </div>
396
+ <div>
397
+ <h3 class="font-semibold text-gray-800 mb-3 flex items-center">
398
+ <i class="fas fa-bug text-blue-500 mr-2"></i>Error Handling
399
+ </h3>
400
+ <ul class="text-gray-700 space-y-3">
401
+ <li class="flex items-start">
402
+ <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
403
+ <span>Implement interface checks for parameters</span>
404
+ </li>
405
+ <li class="flex items-start">
406
+ <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
407
+ <span>Handle network and API failures gracefully</span>
408
+ </li>
409
+ </ul>
410
+ </div>
411
+ </div>
412
+ </div>
413
+ </section>
414
+
415
+ <section id="issues" class="mb-12">
416
+ <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
417
+ <i class="fas fa-exclamation-triangle text-blue-500 mr-2"></i>Common Issues
418
+ </h2>
419
+ <div class="bg-white rounded-xl shadow-md p-6">
420
+ <div class="space-y-6">
421
+ <div class="p-4 border rounded-lg">
422
+ <h3 class="font-semibold text-gray-800 flex items-center mb-2">
423
+ <i class="fas fa-shield-alt text-red-500 mr-2"></i>Type Safety
424
+ </h3>
425
+ <ul class="text-gray-700 text-sm space-y-2">
426
+ <li class="flex items-start">
427
+ <i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
428
+ <span>Always use proper type validation for PayPal API responses</span>
429
+ </li>
430
+ <li class="flex items-start">
431
+ <i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
432
+ <span>Implement interface checks for all input parameters</span>
433
+ </li>
434
+ </ul>
435
+ </div>
436
+
437
+ <div class="p-4 border rounded-lg">
438
+ <h3 class="font-semibold text-gray-800 flex items-center mb-2">
439
+ <i class="fas fa-lock text-red-500 mr-2"></i>Authentication
440
+ </h3>
441
+ <ul class="text-gray-700 text-sm space-y-2">
442
+ <li class="flex items-start">
443
+ <i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
444
+ <span>Handle token expiration and refresh cycles</span>
445
+ </li>
446
+ <li class="flex items-start">
447
+ <i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
448
+ <span>Validate credentials before making API calls</span>
449
+ </li>
450
+ </ul>
451
+ </div>
452
+
453
+ <div class="p-4 border rounded-lg">
454
+ <h3 class="font-semibold text-gray-800 flex items-center mb-2">
455
+ <i class="fas fa-bug text-red-500 mr-2"></i>Error Handling
456
+ </h3>
457
+ <ul class="text-gray-700 text-sm space-y-2">
458
+ <li class="flex items-start">
459
+ <i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
460
+ <span>Implement specific error types for different scenarios</span>
461
+ </li>
462
+ <li class="flex items-start">
463
+ <i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
464
+ <span>Provide clear, actionable error messages</span>
465
+ </li>
466
+ </ul>
467
+ </div>
468
+ </div>
469
+ </div>
470
+ </section>
471
+
472
+ <section id="testing" class="mb-12">
473
+ <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
474
+ <i class="fas fa-vial text-blue-500 mr-2"></i>Testing Instructions
475
+ </h2>
476
+ <div class="bg-white rounded-xl shadow-md p-6">
477
+ <h3 class="font-semibold text-gray-800 mb-4">Credential Verification</h3>
478
+ <div class="codeblock p-4 mb-6">
479
+ <pre class="text-sm">
480
+ const result = await mcpClient.useTool('paypal', 'create_order', {
481
+ intent: 'CAPTURE',
482
+ purchase_units: [{
483
+ amount: {
484
+ currency_code: 'USD',
485
+ value: '1.00'
486
+ }
487
+ }]
488
+ });</pre>
489
+ </div>
490
+
491
+ <h3 class="font-semibold text-gray-800 mb-4">Error Handling Test</h3>
492
+ <div class="codeblock p-4 mb-4">
493
+ <pre class="text-sm">
494
+ // Test invalid credentials
495
+ const result = await mcpClient.useTool('paypal', 'create_order', {
496
+ // Invalid parameters to test error handling
497
+ });</pre>
498
+ </div>
499
+ </div>
500
+ </section>
501
+
502
+ <section id="security" class="mb-12">
503
+ <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
504
+ <i class="fas fa-shield-alt text-blue-500 mr-2"></i>Security Best Practices
505
+ </h2>
506
+ <div class="bg-white rounded-xl shadow-md p-6">
507
+ <div class="grid md:grid-cols-2 gap2-4">
508
+ <div class="space-y-4">
509
+ <div class="flex items-start">
510
+ <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
511
+ <i class="fas fa-key text-blue-500"></i>
512
+ </div>
513
+ <div class="ml-4">
514
+ <h3 class="text-lg font-medium text-gray-900">Credential Protection</h3>
515
+ <p class="text-gray-600 mt-1">
516
+ Never store credentials in source code. Use environment variables for sensitive data.
517
+ </p>
518
+ </div>
519
+ </div>
520
+
521
+ <div class="flex items-start">
522
+ <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
523
+ <i class="fas fa-check-circle text-blue-500"></i>
524
+ </div>
525
+ <div class="ml-4">
526
+ <h3 class="text-lg font-medium text-gray-900">Input Validation</h3>
527
+ <p class="text-gray-600 mt-1">
528
+ Validate all input parameters before processing to prevent injection attacks.
529
+ </p>
530
+ </div>
531
+ </div>
532
+ </div>
533
+
534
+ <div class="space-y-4">
535
+ <div class="flex items-start">
536
+ <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
537
+ <i class="fas fa-lock text-blue-500"></i>
538
+ </div>
539
+ <div class="ml-4">
540
+ <h3 class="text-lg font-medium text-gray-900">Secure Communications</h3>
541
+ <p class="text-gray-600 mt-1">
542
+ Use HTTPS for all API calls to encrypt data in transit.
543
+ </p>
544
+ </div>
545
+ </div>
546
+
547
+ <div class="flex items-start">
548
+ <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
549
+ <i class="fas fa-bolt text-blue-500"></i>
550
+ </div>
551
+ <div class="ml-4">
552
+ <h3 class="text-lg font-medium text-gray-900">Error Handling</h3>
553
+ <p class="text-gray-600 mt-1">
554
+ Never expose sensitive information in error messages.
555
+ </p>
556
+ </div>
557
+ </div>
558
+ </div>
559
+ </div>
560
+ </div>
561
+ </section>
562
+
563
+ <section id="resources" class="mb-12">
564
+ <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
565
+ <i class="fas fa-book text-blue-500 mr-2"></i>Additional Resources
566
+ </h2>
567
+ <div class="bg-white rounded-xl shadow-md p-6">
568
+ <div class="grid md:grid-cols-2 gap-6">
569
+ <div>
570
+ <h3 class="font-semibold text-gray-800 mb-3">Documentation Links</h3>
571
+ <ul class="space-y-2">
572
+ <li>
573
+ <a href="https://developer.paypal.com/docs/api/overview/" class="text-blue-600 hover:text-blue-800 flex items-center">
574
+ <i class="fas fa-external-link-alt mr-2 text-sm"></i>
575
+ PayPal API Documentation
576
+ </a>
577
+ </li>
578
+ <li>
579
+ <a href="https://github.com/modelcontextprotocol/typescript-sdk" class="text-blue-600 hover:text-blue-800 flex items-center">
580
+ <i class="fas fa-external-link-alt mr-2 text-sm"></i>
581
+ MCP SDK Documentation
582
+ </a>
583
+ </li>
584
+ <li>
585
+ <a href="https://www.typescriptlang.org/docs/" class="text-blue-600 hover:text-blue-800 flex items-center">
586
+ <i class="fas fa-external-link-alt mr-2 text-sm"></i>
587
+ TypeScript Documentation
588
+ </a>
589
+ </li>
590
+ </ul>
591
+ </div>
592
+ <div>
593
+ <h3 class="font-semibold text-gray-800 mb-3">Support Contacts</h3>
594
+ <ul class="space-y-2">
595
+ <li class="flex items-center">
596
+ <i class="fas fa-bug text-gray-500 mr-2"></i>
597
+ <a href="https://github.com/DynamicEndpoints/Paypal-MCP/issues" class="text-blue-600 hover:text-blue-800">
598
+ GitHub Issues
599
+ </a>
600
+ </li>
601
+ <li class="flex items-center">
602
+ <i class="fas fa-envelope text-gray-500 mr-2"></i>
603
+ <a href="mailto:kameron@dynamicendpoints.com" class="text-blue-600 hover:text-blue-800">
604
+ kameron@dynamicendpoints.com
605
+ </a>
606
+ </li>
607
+ </ul>
608
+ </div>
609
+ </div>
610
+ </div>
611
+ </section>
612
+
613
+ <footer class="border-t pt-8 text-center text-gray-600">
614
+ <p>PayPal MCP Server Installation Guide v2.4.1</p>
615
+ <p class="text-sm mt-2">Last updated: June 2023</p>
616
+ </footer>
617
+ </div>
618
+ </div>
619
+ </div>
620
+
621
+ <!-- Mobile menu button -->
622
+ <div class="md:hidden fixed bottom-6 right-6">
623
+ <button id="mobileMenuBtn" class="bg-blue-600 text-white p-4 rounded-full shadow-lg hover:bg-blue-700 transition-colors">
624
+ <i class="fas fa-bars text-xl"></i>
625
+ </button>
626
+ </div>
627
+
628
+ <!-- Mobile menu -->
629
+ <div id="mobileMenu" class="hidden fixed inset-0 bg-gray-900 bg-opacity-90 z-50 flex items-center justify-center">
630
+ <div class="bg-white rounded-xl p-6 w-11/12 max-w-sm max-h-[80vh] overflow-y-auto">
631
+ <div class="flex justify-between items-center mb-6">
632
+ <h2 class="text-xl font-bold">Menu</h2>
633
+ <button id="closeMobileMenu" class="text-gray-500 hover:text-gray-700">
634
+ <i class="fas fa-times"></i>
635
+ </button>
636
+ </div>
637
+ <div class="space-y-4">
638
+ <a href="#overview" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Overview</a>
639
+ <a href="#structure" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Repository Structure</a>
640
+ <a href="#installation" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Installation Steps</a>
641
+ <a href="#configuration" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">MCP Configuration</a>
642
+ <a href="#validation" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Validation Steps</a>
643
+ <a href="#issues" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Common Issues</a>
644
+ <a href="#testing" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Testing</a>
645
+ <a href="#security" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Security</a>
646
+ <a href="#resources" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Resources</a>
647
+ </div>
648
+ </div>
649
+ </div>
650
+
651
+ <script>
652
+ // Mobile menu functionality
653
+ const mobileMenuBtn = document.getElementById('mobileMenuBtn');
654
+ const mobileMenu = document.getElementById('mobileMenu');
655
+ const closeMobileMenu = document.getElementById('closeMobileMenu');
656
+
657
+ mobileMenuBtn.addEventListener('click', () => {
658
+ mobileMenu.classList.remove('hidden');
659
+ mobileMenu.classList.add('flex');
660
+ });
661
+
662
+ closeMobileMenu.addEventListener('click', () => {
663
+ mobileMenu.classList.add('hidden');
664
+ mobileMenu.classList.remove('flex');
665
+ });
666
+
667
+ // Smooth scrolling for anchor links
668
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
669
+ anchor.addEventListener('click', function(e) {
670
+ e.preventDefault();
671
+
672
+ const target = document.querySelector(this.getAttribute('href'));
673
+ if (target) {
674
+ target.scrollIntoView({
675
+ behavior: 'smooth'
676
+ });
677
+
678
+ // Close mobile menu if open
679
+ if (!mobileMenu.classList.contains('hidden')) {
680
+ mobileMenu.classList.add('hidden');
681
+ mobileMenu.classList.remove('flex');
682
+ }
683
+ }
684
+ });
685
+ });
686
+
687
+ // Highlight current section in sidebar
688
+ window.addEventListener('scroll', function() {
689
+ const sections = document.querySelectorAll('section');
690
+ let currentSection = '';
691
+
692
+ sections.forEach(section => {
693
+ const sectionTop = section.offsetTop - 100;
694
+ if (window.pageYOffset >= sectionTop) {
695
+ currentSection = section.getAttribute('id');
696
+ }
697
+ });
698
+
699
+ document.querySelectorAll('.sidebar-link').forEach(link => {
700
+ link.classList.remove('active');
701
+ if (link.querySelector('a').getAttribute('href') === `#${currentSection}`) {
702
+ link.classList.add('active');
703
+ }
704
+ });
705
+ });
706
+ </script>
707
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=thedruid831/mcppaypal" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
708
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ # AI Agent Installation Guide This guide is specifically designed for AI agents like Cline to help with installing and configuring the PayPal MCP server. ## Repository Structure ``` paypal-server/ β”œβ”€β”€ src/ β”‚ └── index.ts # Main server implementation β”œβ”€β”€ .github/ β”‚ └── workflows/ β”‚ └── ci.yml # GitHub Actions workflow β”œβ”€β”€ package.json # Node.js dependencies and scripts β”œβ”€β”€ tsconfig.json # TypeScript configuration β”œβ”€β”€ README.md # General documentation β”œβ”€β”€ LICENSE # MIT license └── .gitignore # Git ignore rules ``` ## Installation Steps 1. **Project Setup** ```bash # Create project directory mkdir paypal-server cd paypal-server # Initialize Node.js project npm init -y # Install dependencies npm install @modelcontextprotocol/sdk axios typescript @types/node ``` 2. **TypeScript Configuration** - Ensure tsconfig.json is configured for ES modules - Set target to ES2020 or later - Enable strict type checking 3. **Environment Configuration** When helping users set up PayPal credentials: 1. Direct them to https://developer.paypal.com/dashboard/ 2. Guide them through creating a REST API app 3. Help them securely store the Client ID and Secret ## MCP Configuration ### Settings File Location - Windows: `%APPDATA%/Windsurf/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json` - Linux: `~/.config/claude/settings.json` ### Configuration Template ```json { "mcpServers": { "paypal": { "command": "node", "args": ["path/to/paypal-server/build/index.js"], "env": { "PAYPAL_CLIENT_ID": "your_client_id", "PAYPAL_CLIENT_SECRET": "your_client_secret" }, "disabled": false, "autoApprove": [] } } } ``` ## Validation Steps When implementing the server: 1. Verify TypeScript compilation succeeds 2. Check all API endpoints are properly typed 3. Ensure error handling is comprehensive 4. Validate input parameters thoroughly ## Common Issues and Solutions ### Type Safety - Always use proper type validation for PayPal API responses - Implement interface checks for all input parameters - Use type guards for error handling ### Authentication - Handle token expiration and refresh - Validate credentials before making API calls - Secure storage of API keys ### Error Handling - Implement specific error types for different scenarios - Provide clear error messages - Handle network and API failures gracefully ## Testing Instructions For validating the installation: 1. **Credential Verification** ```typescript const result = await mcpClient.useTool('paypal', 'create_order', { intent: 'CAPTURE', purchase_units: [{ amount: { currency_code: 'USD', value: '1.00' } }] }); ``` 2. **Error Handling Test** ```typescript // Test invalid credentials const result = await mcpClient.useTool('paypal', 'create_order', { // Invalid parameters to test error handling }); ``` ## Security Best Practices When implementing for users: 1. Never store credentials in code 2. Use environment variables for sensitive data 3. Validate all input parameters 4. Implement proper error handling 5. Use HTTPS for all API calls ## Debugging Guide Common issues to check: 1. TypeScript compilation errors 2. PayPal API authentication failures 3. Input validation errors 4. Network connectivity issues ## Version Compatibility - Node.js: 16.x or later - TypeScript: 5.0 or later - MCP SDK: latest version - PayPal API: v2 endpoints ## Additional Resources - [PayPal API Documentation](https://developer.paypal.com/docs/api/overview/) - [MCP SDK Documentation](https://github.com/modelcontextprotocol/typescript-sdk) - [TypeScript Documentation](https://www.typescriptlang.org/docs/) ## Support For issues or questions: - GitHub Issues: [Create an issue](https://github.com/DynamicEndpoints/Paypal-MCP/issues) - Contact: kameron@dynamicendpoints.com