File size: 40,119 Bytes
fa15dc5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>PayPal MCP Server Installation Guide</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .codeblock {
            font-family: 'Courier New', monospace;
            background-color: #2d3748;
            color: #f7fafc;
            border-radius: 0.5rem;
            overflow-x: auto;
        }
        .step-number {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2rem;
            height: 2rem;
            border-radius: 50%;
            background-color: #3182ce;
            color: white;
            margin-right: 1rem;
            flex-shrink: 0;
        }
        .sidebar-link {
            transition: all 0.2s ease;
        }
        .sidebar-link:hover {
            background-color: #2d3748;
            transform: translateX(3px);
        }
        .nav-highlight {
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 4px;
            background-color: #4299e1;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        .pulse-animation {
            animation: pulse 2s infinite;
        }
    </style>
</head>
<body class="bg-gray-100 min-h-screen">
    <div class="flex">
        <!-- Sidebar -->
        <div class="w-64 bg-gray-900 text-white h-screen sticky top-0 overflow-y-auto hidden md:block">
            <div class="p-6">
                <h1 class="text-2xl font-bold mb-6 flex items-center">
                    <i class="fab fa-paypal text-blue-400 mr-2"></i>
                    <span>MCP Server</span>
                </h1>
                <div class="space-y-2">
                    <div class="relative sidebar-link active">
                        <div class="nav-highlight"></div>
                        <a href="#overview" class="flex items-center px-4 py-2 text-blue-200">
                            <i class="fas fa-home mr-2"></i> Overview
                        </a>
                    </div>
                    <div class="relative sidebar-link">
                        <a href="#structure" class="flex items-center px-4 py-2 hover:text-blue-200">
                            <i class="fas fa-folder-open mr-2"></i> Repository Structure
                        </a>
                    </div>
                    <div class="relative sidebar-link">
                        <a href="#installation" class="flex items-center px-4 py-2 hover:text-blue-200">
                            <i class="fas fa-download mr-2"></i> Installation Steps
                        </a>
                    </div>
                    <div class="relative sidebar-link">
                        <a href="#configuration" class="flex items-center px-4 py-2 hover:text-blue-200">
                            <i class="fas fa-cog mr-2"></i> MCP Configuration
                        </a>
                    </div>
                    <div class="relative sidebar-link">
                        <a href="#validation" class="flex items-center px-4 py-2 hover:text-blue-200">
                            <i class="fas fa-check-circle mr-2"></i> Validation Steps
                        </a>
                    </div>
                    <div class="relative sidebar-link">
                        <a href="#issues" class="flex items-center px-4 py-2 hover:text-blue-200">
                            <i class="fas fa-exclamation-triangle mr-2"></i> Common Issues
                        </a>
                    </div>
                    <div class="relative sidebar-link">
                        <a href="#testing" class="flex items-center px-4 py-2 hover:text-blue-200">
                            <i class="fas fa-vial mr-2"></i> Testing
                        </a>
                    </div>
                    <div class="relative sidebar-link">
                        <a href="#security" class="flex items-center px-4 py-2 hover:text-blue-200">
                            <i class="fas fa-shield-alt mr-2"></i> Security
                        </a>
                    </div>
                    <div class="relative sidebar-link">
                        <a href="#resources" class="flex items-center px-4 py-2 hover:text-blue-200">
                            <i class="fas fa-book mr-2"></i> Resources
                        </a>
                    </div>
                </div>
            </div>
        </div>

        <!-- Main content -->
        <div class="flex-1 p-8">
            <div class="max-w-4xl mx-auto">
                <header class="mb-12">
                    <h1 class="text-4xl font-bold text-gray-800 mb-4">
                        PayPal MCP Server<br>Installation Guide
                    </h1>
                    <p class="text-xl text-gray-600">
                        Comprehensive guide for setting up the PayPal Model Context Protocol server
                    </p>
                    <div class="mt-6 flex flex-wrap gap-4">
                        <div class="flex items-center bg-blue-100 px-4 py-2 rounded-full">
                            <i class="fas fa-code-branch text-blue-500 mr-2"></i>
                            <span class="text-sm font-medium">v2.4.1</span>
                        </div>
                        <div class="flex items-center bg-green-100 px-4 py-2 rounded-full">
                            <i class="fas fa-lock text-green-500 mr-2"></i>
                            <span class="text-sm font-medium">Production Ready</span>
                        </div>
                        <div class="flex items-center bg-purple-100 px-4 py-2 rounded-full">
                            <i class="fab fa-node-js text-purple-500 mr-2"></i>
                            <span class="text-sm font-medium">Node.js 16+</span>
                        </div>
                    </div>
                </header>

                <section id="overview" class="mb-12">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
                        <i class="fas fa-home text-blue-500 mr-2"></i>Overview
                    </h2>
                    <div class="bg-white rounded-xl shadow-md p-6 mb-6">
                        <p class="text-gray-700 mb-4">
                            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.
                        </p>
                        <div class="grid md:grid-cols-3 gap-4">
                            <div class="bg-blue-50 p-4 rounded-lg">
                                <h3 class="font-semibold text-blue-800 mb-2"><i class="fas fa-check-circle mr-2"></i>Key Features</h3>
                                <ul class="text-sm text-gray-700 space-y-1">
                                    <li>Type-safe PayPal API integration</li>
                                    <li>Secure credential management</li>
                                    <li>Comprehensive error handling</li>
                                    <li>Cross-platform configuration</li>
                                </ul>
                            </div>
                            <div class="bg-purple-50 p-4 rounded-lg">
                                <h3 class="font-semibold text-purple-800 mb-2"><i class="fas fa-bolt mr-2"></i>Requirements</h3>
                                <ul class="text-sm text-gray-700 space-y-1">
                                    <li>Node.js 16.x or later</li>
                                    <li>TypeScript 5.0+</li>
                                    <li>PayPal developer account</li>
                                    <li>MCP SDK</li>
                                </ul>
                            </div>
                            <div class="bg-green-50 p-4 rounded-lg">
                                <h3 class="font-semibold text-green-800 mb-2"><i class="fas fa-clock mr-2"></i>Est. Setup Time</h3>
                                <ul class="text-sm text-gray-700 space-y-1">
                                    <li>Basic setup: 10-15 mins</li>
                                    <li>Full configuration: 30 mins</li>
                                    <li>Testing/debugging: 15-30 mins</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </section>

                <section id="structure" class="mb-12">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
                        <i class="fas fa-folder-open text-blue-500 mr-2"></i>Repository Structure
                    </h2>
                    <div class="bg-white rounded-xl shadow-md p-6">
                        <div class="codeblock p-4 mb-4">
                            <pre class="text-sm">
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</pre>
                        </div>
                        <div class="grid md:grid-cols-2 gap-4">
                            <div class="bg-gray-50 p-4 rounded-lg">
                                <h3 class="font-semibold text-gray-800 mb-2"><i class="fas fa-file-code mr-2"></i>Key Files</h3>
                                <ul class="text-sm text-gray-700 space-y-2">
                                    <li><span class="font-mono text-orange-600">index.ts</span> - Main server implementation</li>
                                    <li><span class="font-mono text-orange-600">ci.yml</span> - CI/CD pipeline configuration</li>
                                    <li><span class="font-mono text-orange-600">package.json</span> - Dependencies and scripts</li>
                                </ul>
                            </div>
                            <div class="bg-gray-50 p-4 rounded-lg">
                                <h3 class="font-semibold text-gray-800 mb-2"><i class="fas fa-info-circle mr-2"></i>Notes</h3>
                                <ul class="text-sm text-gray-700 space-y-2">
                                    <li>All source files are in <span class="font-mono">src/</span></li>
                                    <li>GitHub Actions handles automated testing</li>
                                    <li>TypeScript configuration must be valid</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </section>

                <section id="installation" class="mb-12">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
                        <i class="fas fa-download text-blue-500 mr-2"></i>Installation Steps
                    </h2>
                    <div class="bg-white rounded-xl shadow-md p-6">
                        <div class="space-y-6">
                            <div class="flex items-start">
                                <div class="step-number">1</div>
                                <div class="flex-1">
                                    <h3 class="font-semibold text-gray-800 mb-2">Project Setup</h3>
                                    <p class="text-gray-700 mb-3">Initialize the project directory and install required dependencies.</p>
                                    <div class="codeblock p-4 mb-2">
                                        <pre class="text-sm">
# 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</pre>
                                    </div>
                                    <div class="bg-yellow-50 border-l-4 border-yellow-400 p-4">
                                        <div class="flex">
                                            <div class="flex-shrink-0">
                                                <i class="fas fa-exclamation-triangle text-yellow-400"></i>
                                            </div>
                                            <div class="ml-3">
                                                <p class="text-sm text-yellow-700">
                                                    Ensure Node.js version 16 or higher is installed before proceeding.
                                                </p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="flex items-start">
                                <div class="step-number">2</div>
                                <div class="flex-1">
                                    <h3 class="font-semibold text-gray-800 mb-2">TypeScript Configuration</h3>
                                    <p class="text-gray-700">Configure TypeScript for ES modules and strict type checking.</p>
                                </div>
                            </div>

                            <div class="flex items-start">
                                <div class="step-number">3</div>
                                <div class="flex-1">
                                    <h3 class="font-semibold text-gray-800 mb-2">Environment Configuration</h3>
                                    <p class="text-gray-700">Guide users through setting up PayPal credentials:</p>
                                    <div class="grid md:grid-cols-3 gap-4 mt-4">
                                        <div class="border rounded-lg p-4">
                                            <div class="flex items-center justify-center w-12 h-12 bg-blue-100 rounded-full mb-3 mx-auto">
                                                <i class="fas fa-sign-in-alt text-blue-500 text-xl"></i>
                                            </div>
                                            <h4 class="text-center font-medium text-gray-800">1. Developer Dashboard</h4>
                                            <p class="text-sm text-center text-gray-600 mt-1">
                                                Direct to developer.paypal.com
                                            </p>
                                        </div>
                                        <div class="border rounded-lg p-4">
                                            <div class="flex items-center justify-center w-12 h-12 bg-blue-100 rounded-full mb-3 mx-auto">
                                                <i class="fas fa-cogs text-blue-500 text-xl"></i>
                                            </div>
                                            <h4 class="text-center font-medium text-gray-800">2. Create API App</h4>
                                            <p class="text-sm text-center text-gray-600 mt-1">
                                                Guide through REST API setup
                                            </p>
                                        </div>
                                        <div class="border rounded-lg p-4">
                                            <div class="flex items-center justify-center w-12 h-12 bg-blue-100 rounded-full mb-3 mx-auto">
                                                <i class="fas fa-key text-blue-500 text-xl"></i>
                                            </div>
                                            <h4 class="text-center font-medium text-gray-800">3. Secure Storage</h4>
                                            <p class="text-sm text-center text-gray-600 mt-1">
                                                Help store Client ID/Secret
                                            </p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>

                <section id="configuration" class="mb-12">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
                        <i class="fas fa-cog text-blue-500 mr-2"></i>MCP Configuration
                    </h2>
                    <div class="bg-white rounded-xl shadow-md p-6">
                        <h3 class="font-semibold text-gray-800 mb-4">Settings File Locations</h3>
                        <div class="grid md:grid-cols-3 gap-4 mb-6">
                            <div class="border rounded-lg p-4">
                                <div class="flex items-center">
                                    <i class="fab fa-windows text-blue-500 mr-2"></i>
                                    <span class="font-medium">Windows</span>
                                </div>
                                <div class="codeblock text-xs mt-2 p-2">
                                    %APPDATA%/Windsurf/User/globalStorage/.../cline_mcp_settings.json
                                </div>
                            </div>
                            <div class="border rounded-lg p-4">
                                <div class="flex items-center">
                                    <i class="fab fa-apple text-gray-500 mr-2"></i>
                                    <span class="font-medium">macOS</span>
                                </div>
                                <div class="codeblock text-xs mt-2 p-2">
                                    ~/Library/Application Support/Claude/..._config.json
                                </div>
                            </div>
                            <div class="border rounded-lg p-4">
                                <div class="flex items-center">
                                    <i class="fab fa-linux text-yellow-500 mr-2"></i>
                                    <span class="font-medium">Linux</span>
                                </div>
                                <div class="codeblock text-xs mt-2 p-2">
                                    ~/.config/claude/settings.json
                                </div>
                            </div>
                        </div>

                        <h3 class="font-semibold text-gray-800 mb-4">Configuration Template</h3>
                        <div class="codeblock p-4 mb-6">
                            <pre class="text-sm">
{
  "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": []
    }
  }
}</pre>
                        </div>

                        <div class="bg-orange-50 border-l-4 border-orange-400 p-4">
                            <div class="flex">
                                <div class="flex-shrink-0">
                                    <i class="fas fa-exclamation-circle text-orange-400"></i>
                                </div>
                                <div class="ml-3">
                                    <h4 class="text-sm font-medium text-orange-800">Important Security Note</h4>
                                    <p class="text-sm text-orange-700 mt-1">
                                        Never commit these configuration files with real credentials. Use environment variables in production.
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>

                <section id="validation" class="mb-12">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
                        <i class="fas fa-check-circle text-blue-500 mr-2"></i>Validation Steps
                    </h2>
                    <div class="bg-white rounded-xl shadow-md p-6">
                        <div class="grid md:grid-cols-2 gap-6">
                            <div>
                                <h3 class="font-semibold text-gray-800 mb-3 flex items-center">
                                    <i class="fas fa-code text-blue-500 mr-2"></i>TypeScript Checks
                                </h3>
                                <ul class="text-gray-700 space-y-3">
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                        <span>Verify TypeScript compilation succeeds</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                        <span>Check all API endpoints are properly typed</span>
                                    </li>
                                </ul>
                            </div>
                            <div>
                                <h3 class="font-semibold text-gray-800 mb-3 flex items-center">
                                    <i class="fas fa-bug text-blue-500 mr-2"></i>Error Handling
                                </h3>
                                <ul class="text-gray-700 space-y-3">
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                        <span>Implement interface checks for parameters</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                        <span>Handle network and API failures gracefully</span>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </section>

                <section id="issues" class="mb-12">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
                        <i class="fas fa-exclamation-triangle text-blue-500 mr-2"></i>Common Issues
                    </h2>
                    <div class="bg-white rounded-xl shadow-md p-6">
                        <div class="space-y-6">
                            <div class="p-4 border rounded-lg">
                                <h3 class="font-semibold text-gray-800 flex items-center mb-2">
                                    <i class="fas fa-shield-alt text-red-500 mr-2"></i>Type Safety
                                </h3>
                                <ul class="text-gray-700 text-sm space-y-2">
                                    <li class="flex items-start">
                                        <i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
                                        <span>Always use proper type validation for PayPal API responses</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
                                        <span>Implement interface checks for all input parameters</span>
                                    </li>
                                </ul>
                            </div>

                            <div class="p-4 border rounded-lg">
                                <h3 class="font-semibold text-gray-800 flex items-center mb-2">
                                    <i class="fas fa-lock text-red-500 mr-2"></i>Authentication
                                </h3>
                                <ul class="text-gray-700 text-sm space-y-2">
                                    <li class="flex items-start">
                                        <i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
                                        <span>Handle token expiration and refresh cycles</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
                                        <span>Validate credentials before making API calls</span>
                                    </li>
                                </ul>
                            </div>

                            <div class="p-4 border rounded-lg">
                                <h3 class="font-semibold text-gray-800 flex items-center mb-2">
                                    <i class="fas fa-bug text-red-500 mr-2"></i>Error Handling
                                </h3>
                                <ul class="text-gray-700 text-sm space-y-2">
                                    <li class="flex items-start">
                                        <i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
                                        <span>Implement specific error types for different scenarios</span>
                                    </li>
                                    <li class="flex items-start">
                                        <i class="fas fa-arrow-right text-gray-400 mt-1 mr-2"></i>
                                        <span>Provide clear, actionable error messages</span>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </section>

                <section id="testing" class="mb-12">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
                        <i class="fas fa-vial text-blue-500 mr-2"></i>Testing Instructions
                    </h2>
                    <div class="bg-white rounded-xl shadow-md p-6">
                        <h3 class="font-semibold text-gray-800 mb-4">Credential Verification</h3>
                        <div class="codeblock p-4 mb-6">
                            <pre class="text-sm">
const result = await mcpClient.useTool('paypal', 'create_order', {
  intent: 'CAPTURE',
  purchase_units: [{
    amount: {
      currency_code: 'USD',
      value: '1.00'
    }
  }]
});</pre>
                        </div>

                        <h3 class="font-semibold text-gray-800 mb-4">Error Handling Test</h3>
                        <div class="codeblock p-4 mb-4">
                            <pre class="text-sm">
// Test invalid credentials
const result = await mcpClient.useTool('paypal', 'create_order', {
  // Invalid parameters to test error handling
});</pre>
                        </div>
                    </div>
                </section>

                <section id="security" class="mb-12">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
                        <i class="fas fa-shield-alt text-blue-500 mr-2"></i>Security Best Practices
                    </h2>
                    <div class="bg-white rounded-xl shadow-md p-6">
                        <div class="grid md:grid-cols-2 gap2-4">
                            <div class="space-y-4">
                                <div class="flex items-start">
                                    <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
                                        <i class="fas fa-key text-blue-500"></i>
                                    </div>
                                    <div class="ml-4">
                                        <h3 class="text-lg font-medium text-gray-900">Credential Protection</h3>
                                        <p class="text-gray-600 mt-1">
                                            Never store credentials in source code. Use environment variables for sensitive data.
                                        </p>
                                    </div>
                                </div>

                                <div class="flex items-start">
                                    <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
                                        <i class="fas fa-check-circle text-blue-500"></i>
                                    </div>
                                    <div class="ml-4">
                                        <h3 class="text-lg font-medium text-gray-900">Input Validation</h3>
                                        <p class="text-gray-600 mt-1">
                                            Validate all input parameters before processing to prevent injection attacks.
                                        </p>
                                    </div>
                                </div>
                            </div>

                            <div class="space-y-4">
                                <div class="flex items-start">
                                    <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
                                        <i class="fas fa-lock text-blue-500"></i>
                                    </div>
                                    <div class="ml-4">
                                        <h3 class="text-lg font-medium text-gray-900">Secure Communications</h3>
                                        <p class="text-gray-600 mt-1">
                                            Use HTTPS for all API calls to encrypt data in transit.
                                        </p>
                                    </div>
                                </div>

                                <div class="flex items-start">
                                    <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
                                        <i class="fas fa-bolt text-blue-500"></i>
                                    </div>
                                    <div class="ml-4">
                                        <h3 class="text-lg font-medium text-gray-900">Error Handling</h3>
                                        <p class="text-gray-600 mt-1">
                                            Never expose sensitive information in error messages.
                                        </p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>

                <section id="resources" class="mb-12">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-6 border-b pb-2">
                        <i class="fas fa-book text-blue-500 mr-2"></i>Additional Resources
                    </h2>
                    <div class="bg-white rounded-xl shadow-md p-6">
                        <div class="grid md:grid-cols-2 gap-6">
                            <div>
                                <h3 class="font-semibold text-gray-800 mb-3">Documentation Links</h3>
                                <ul class="space-y-2">
                                    <li>
                                        <a href="https://developer.paypal.com/docs/api/overview/" class="text-blue-600 hover:text-blue-800 flex items-center">
                                            <i class="fas fa-external-link-alt mr-2 text-sm"></i>
                                            PayPal API Documentation
                                        </a>
                                    </li>
                                    <li>
                                        <a href="https://github.com/modelcontextprotocol/typescript-sdk" class="text-blue-600 hover:text-blue-800 flex items-center">
                                            <i class="fas fa-external-link-alt mr-2 text-sm"></i>
                                            MCP SDK Documentation
                                        </a>
                                    </li>
                                    <li>
                                        <a href="https://www.typescriptlang.org/docs/" class="text-blue-600 hover:text-blue-800 flex items-center">
                                            <i class="fas fa-external-link-alt mr-2 text-sm"></i>
                                            TypeScript Documentation
                                        </a>
                                    </li>
                                </ul>
                            </div>
                            <div>
                                <h3 class="font-semibold text-gray-800 mb-3">Support Contacts</h3>
                                <ul class="space-y-2">
                                    <li class="flex items-center">
                                        <i class="fas fa-bug text-gray-500 mr-2"></i>
                                        <a href="https://github.com/DynamicEndpoints/Paypal-MCP/issues" class="text-blue-600 hover:text-blue-800">
                                            GitHub Issues
                                        </a>
                                    </li>
                                    <li class="flex items-center">
                                        <i class="fas fa-envelope text-gray-500 mr-2"></i>
                                        <a href="mailto:kameron@dynamicendpoints.com" class="text-blue-600 hover:text-blue-800">
                                            kameron@dynamicendpoints.com
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </section>

                <footer class="border-t pt-8 text-center text-gray-600">
                    <p>PayPal MCP Server Installation Guide v2.4.1</p>
                    <p class="text-sm mt-2">Last updated: June 2023</p>
                </footer>
            </div>
        </div>
    </div>

    <!-- Mobile menu button -->
    <div class="md:hidden fixed bottom-6 right-6">
        <button id="mobileMenuBtn" class="bg-blue-600 text-white p-4 rounded-full shadow-lg hover:bg-blue-700 transition-colors">
            <i class="fas fa-bars text-xl"></i>
        </button>
    </div>

    <!-- Mobile menu -->
    <div id="mobileMenu" class="hidden fixed inset-0 bg-gray-900 bg-opacity-90 z-50 flex items-center justify-center">
        <div class="bg-white rounded-xl p-6 w-11/12 max-w-sm max-h-[80vh] overflow-y-auto">
            <div class="flex justify-between items-center mb-6">
                <h2 class="text-xl font-bold">Menu</h2>
                <button id="closeMobileMenu" class="text-gray-500 hover:text-gray-700">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            <div class="space-y-4">
                <a href="#overview" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Overview</a>
                <a href="#structure" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Repository Structure</a>
                <a href="#installation" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Installation Steps</a>
                <a href="#configuration" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">MCP Configuration</a>
                <a href="#validation" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Validation Steps</a>
                <a href="#issues" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Common Issues</a>
                <a href="#testing" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Testing</a>
                <a href="#security" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Security</a>
                <a href="#resources" class="block px-4 py-2 rounded hover:bg-blue-50 text-gray-700">Resources</a>
            </div>
        </div>
    </div>

    <script>
        // Mobile menu functionality
        const mobileMenuBtn = document.getElementById('mobileMenuBtn');
        const mobileMenu = document.getElementById('mobileMenu');
        const closeMobileMenu = document.getElementById('closeMobileMenu');

        mobileMenuBtn.addEventListener('click', () => {
            mobileMenu.classList.remove('hidden');
            mobileMenu.classList.add('flex');
        });

        closeMobileMenu.addEventListener('click', () => {
            mobileMenu.classList.add('hidden');
            mobileMenu.classList.remove('flex');
        });

        // Smooth scrolling for anchor links
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function(e) {
                e.preventDefault();
                
                const target = document.querySelector(this.getAttribute('href'));
                if (target) {
                    target.scrollIntoView({
                        behavior: 'smooth'
                    });

                    // Close mobile menu if open
                    if (!mobileMenu.classList.contains('hidden')) {
                        mobileMenu.classList.add('hidden');
                        mobileMenu.classList.remove('flex');
                    }
                }
            });
        });

        // Highlight current section in sidebar
        window.addEventListener('scroll', function() {
            const sections = document.querySelectorAll('section');
            let currentSection = '';
            
            sections.forEach(section => {
                const sectionTop = section.offsetTop - 100;
                if (window.pageYOffset >= sectionTop) {
                    currentSection = section.getAttribute('id');
                }
            });

            document.querySelectorAll('.sidebar-link').forEach(link => {
                link.classList.remove('active');
                if (link.querySelector('a').getAttribute('href') === `#${currentSection}`) {
                    link.classList.add('active');
                }
            });
        });
    </script>
<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>
</html>