From 12ec61936a37bd20d06a1ee8ac7767eb60aaa303 Mon Sep 17 00:00:00 2001 From: Hemanth HM Date: Sat, 27 Sep 2025 22:46:21 -0700 Subject: [PATCH] feat: add PayPal MCP server configuration for registry publishing - add server.json with complete PayPal MCP server configuration - include comprehensive README with setup instructions - add validation script for server.json verification - configure remote deployment for https://mcp.paypal.com/sse - set up OAuth Bearer token authentication --- .../paypal-mcp-server/README.md | 83 +++++++++++++++++++ .../paypal-mcp-server/server.json | 59 +++++++++++++ .../paypal-mcp-server/validate.py | 60 ++++++++++++++ 3 files changed, 202 insertions(+) create mode 100644 modelcontextprotocol/paypal-mcp-server/README.md create mode 100644 modelcontextprotocol/paypal-mcp-server/server.json create mode 100755 modelcontextprotocol/paypal-mcp-server/validate.py diff --git a/modelcontextprotocol/paypal-mcp-server/README.md b/modelcontextprotocol/paypal-mcp-server/README.md new file mode 100644 index 0000000..0917a84 --- /dev/null +++ b/modelcontextprotocol/paypal-mcp-server/README.md @@ -0,0 +1,83 @@ +# PayPal MCP Server + +A Model Context Protocol (MCP) server that provides AI assistants with secure access to PayPal's payment processing, transaction management, and compliance services. + +## Features + +- **Secure Authentication**: OAuth Bearer token authentication +- **SSE Transport**: Server-Sent Events for real-time communication +- **Enterprise Ready**: Built for PayPal's internal development environment +- **Payment Processing**: Tools for payment transactions and management +- **Transaction Queries**: Access to transaction history and status +- **Compliance Services**: PayPal compliance and regulatory tools + +## Connection Details + +- **Server URL**: `https://mcp.paypal.com/mcp` +- **SSE Endpoint**: `https://mcp.paypal.com/sse` +- **Transport**: Server-Sent Events (SSE) +- **Authentication**: Bearer token in Authorization header + +## Setup + +1. Obtain PayPal OAuth credentials from your PayPal developer account +2. Configure Bearer token authentication +3. Connect to the SSE endpoint using your MCP client +4. Ensure SSL certificate validation for PayPal's internal PKI + +## Usage with MCP Clients + +### Claude Desktop Configuration + +```json +{ + "mcpServers": { + "paypal": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-everything"], + "env": { + "MCP_SERVER_URL": "https://mcp.paypal.com/sse", + "MCP_AUTH_TOKEN": "your-paypal-oauth-token" + } + } + } +} +``` + +### FastAgent Configuration + +```yaml +mcp: + servers: + paypal_mcp: + transport: sse + url: https://mcp.paypal.com/sse + headers: + Authorization: Bearer YOUR_PAYPAL_TOKEN +``` + +## Security + +- All connections require valid PayPal OAuth tokens +- SSL/TLS encryption for all communications +- Certificate validation against PayPal's PKI +- Enterprise-grade security standards + +## Publishing to MCP Registry + +This server configuration is ready for publishing to the Model Context Protocol registry. The automated workflow will handle: + +1. JSON schema validation +2. GitHub OIDC authentication +3. Registry publication +4. Verification + +## Support + +For support and documentation: +- PayPal Developer Portal: https://developer.paypal.com/ +- MCP Documentation: https://modelcontextprotocol.io/ + +## License + +MIT License - see LICENSE file for details. \ No newline at end of file diff --git a/modelcontextprotocol/paypal-mcp-server/server.json b/modelcontextprotocol/paypal-mcp-server/server.json new file mode 100644 index 0000000..63434c9 --- /dev/null +++ b/modelcontextprotocol/paypal-mcp-server/server.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://raw.githubusercontent.com/modelcontextprotocol/registry/main/schema/server.schema.json", + "name": "paypal-mcp", + "namespace": "com.paypal.mcp", + "description": "PayPal Model Context Protocol server providing access to PayPal services and operations for AI assistants", + "license": "MIT", + "keywords": ["paypal", "payments", "financial", "api", "enterprise"], + "homepage": "https://mcp.paypal.com", + "repository": { + "type": "git", + "url": "https://github.com/hemanth/agent-toolkit" + }, + "version": "1.0.0", + "author": { + "name": "PayPal", + "email": "developer@paypal.com" + }, + "deployment": { + "remote": { + "url": "https://mcp.paypal.com/mcp", + "transport": "sse", + "endpoints": { + "sse": "https://mcp.paypal.com/sse" + }, + "auth": { + "type": "bearer", + "description": "Requires PayPal OAuth Bearer token in Authorization header" + } + } + }, + "capabilities": { + "tools": true, + "resources": true, + "prompts": false + }, + "documentation": { + "readme": "PayPal MCP Server provides AI assistants with secure access to PayPal's payment processing, transaction management, and compliance services through the Model Context Protocol.", + "setup": "1. Obtain PayPal OAuth credentials\n2. Configure Bearer token authentication\n3. Connect to https://mcp.paypal.com/sse using SSE transport\n4. Use SSL certificate bundle for PayPal's internal PKI", + "examples": [ + { + "title": "Process Payment", + "description": "Process a payment transaction through PayPal", + "code": "// Connect to PayPal MCP server and use payment processing tools" + }, + { + "title": "Transaction Query", + "description": "Query transaction history and status", + "code": "// Use transaction query tools to retrieve payment information" + } + ] + }, + "tags": ["enterprise", "payments", "secure", "oauth"], + "maintainers": [ + { + "name": "PayPal Developer Team", + "email": "developer@paypal.com" + } + ] +} \ No newline at end of file diff --git a/modelcontextprotocol/paypal-mcp-server/validate.py b/modelcontextprotocol/paypal-mcp-server/validate.py new file mode 100755 index 0000000..4ff939c --- /dev/null +++ b/modelcontextprotocol/paypal-mcp-server/validate.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +""" +Validation script for PayPal MCP Server configuration +""" + +import json +import sys +from pathlib import Path + +def validate_server_json(): + """Validate the server.json file structure and required fields""" + try: + server_json_path = Path(__file__).parent / "server.json" + + with open(server_json_path, 'r') as f: + data = json.load(f) + + print('✅ server.json is valid JSON') + + # Check required fields + required_fields = ['name', 'namespace', 'description', 'version', 'deployment'] + missing = [field for field in required_fields if field not in data] + + if missing: + print(f'❌ Missing required fields: {missing}') + return False + + print('✅ All required fields present') + + # Check deployment structure + if 'remote' in data['deployment']: + remote = data['deployment']['remote'] + if 'url' in remote and 'transport' in remote: + print('✅ Remote deployment configuration valid') + else: + print('❌ Missing url or transport in remote deployment') + return False + + # Validate PayPal-specific fields + if data['name'] != 'paypal-mcp': + print('❌ Server name should be "paypal-mcp"') + return False + + if 'paypal' not in data['keywords']: + print('❌ Missing "paypal" in keywords') + return False + + print('✅ PayPal MCP server.json validation passed') + return True + + except json.JSONDecodeError as e: + print(f'❌ Invalid JSON: {e}') + return False + except Exception as e: + print(f'❌ Validation error: {e}') + return False + +if __name__ == "__main__": + success = validate_server_json() + sys.exit(0 if success else 1) \ No newline at end of file