
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@imazhar101/paypal-server
Advanced tools
PayPal MCP server for payment processing and transaction management
A comprehensive PayPal integration for the Model Context Protocol (MCP) that enables payment processing, transaction management, and PayPal API operations.
npm install @imazhar101/paypal-server
cd mcp-suite/servers/paypal
npm install
npm run build
The server requires the following environment variables:
PAYPAL_CLIENT_ID
- Your PayPal application client IDPAYPAL_CLIENT_SECRET
- Your PayPal application client secretPAYPAL_ENVIRONMENT
- Environment (optional, defaults to "sandbox")
sandbox
- PayPal sandbox environment for testingproduction
- PayPal production environment for live transactionsAdd to your Claude Code configuration:
{
"mcpServers": {
"paypal": {
"command": "npx",
"args": ["@imazhar101/paypal-server"],
"env": {
"PAYPAL_CLIENT_ID": "your-client-id",
"PAYPAL_CLIENT_SECRET": "your-client-secret",
"PAYPAL_ENVIRONMENT": "sandbox"
}
}
}
}
export PAYPAL_CLIENT_ID="your-client-id"
export PAYPAL_CLIENT_SECRET="your-client-secret"
export PAYPAL_ENVIRONMENT="sandbox"
npx @imazhar101/paypal-server
Create a new PayPal payment with specified intent.
Parameters:
intent
(required): Payment intent - "sale", "authorize", or "order"amount
(required): Payment amount with total and currencyreturn_url
(required): URL to redirect after successful paymentcancel_url
(required): URL to redirect after cancelled paymentdescription
: Payment descriptioninvoice_number
: Invoice number for trackingitems
: Array of item detailspayer_info
: Payer information (email, name)Example:
{
"intent": "sale",
"amount": {
"total": "10.00",
"currency": "USD"
},
"description": "Test payment",
"return_url": "https://example.com/success",
"cancel_url": "https://example.com/cancel"
}
Execute a PayPal payment after user approval.
Parameters:
payment_id
(required): Payment ID to executepayer_id
(required): Payer ID from PayPal approvaltransactions
: Optional transaction details for verificationGet details of a specific PayPal payment.
Parameters:
payment_id
(required): Payment ID to retrieveList PayPal payments with optional filtering.
Parameters:
count
: Number of payments to return (max 20)start_index
: Starting index for paginationstart_time
: Start time filter (RFC 3339 format)end_time
: End time filter (RFC 3339 format)sort_by
: Sort field ("create_time" or "update_time")sort_order
: Sort order ("asc" or "desc")Refund a completed PayPal sale.
Parameters:
sale_id
(required): Sale ID to refundamount
: Refund amount (leave empty for full refund)description
: Refund descriptioninvoice_number
: Invoice number for trackingCapture funds from a PayPal authorization.
Parameters:
authorization_id
(required): Authorization ID to captureamount
(required): Amount to capture with total and currencyis_final_capture
: Whether this is the final captureVoid a PayPal authorization.
Parameters:
authorization_id
(required): Authorization ID to voidGet PayPal webhook events for monitoring transactions.
Parameters:
page_size
: Number of events to return (max 300)start_time
: Start time filter (RFC 3339 format)end_time
: End time filter (RFC 3339 format)transaction_id
: Filter by transaction IDTest the PayPal API connection and authentication.
Parameters: None
npm run build
# Set environment variables
export PAYPAL_CLIENT_ID="your-test-client-id"
export PAYPAL_CLIENT_SECRET="your-test-client-secret"
export PAYPAL_ENVIRONMENT="sandbox"
# Test connection
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "paypal_test_connection", "arguments": {}}}' | node dist/index.js
{
"intent": "sale",
"amount": { "total": "25.00", "currency": "USD" },
"description": "Product purchase",
"return_url": "https://yoursite.com/success",
"cancel_url": "https://yoursite.com/cancel"
}
User approves payment on PayPal
Execute Payment:
{
"payment_id": "PAYID-123456",
"payer_id": "PAYER123"
}
{
"intent": "authorize",
"amount": { "total": "100.00", "currency": "USD" },
"return_url": "https://yoursite.com/success",
"cancel_url": "https://yoursite.com/cancel"
}
Execute Authorization
Capture Funds:
{
"authorization_id": "AUTH-123456",
"amount": { "total": "100.00", "currency": "USD" },
"is_final_capture": true
}
The server includes comprehensive error handling:
MIT License - see the LICENSE file for details.
FAQs
PayPal MCP server for payment processing and transaction management
The npm package @imazhar101/paypal-server receives a total of 0 weekly downloads. As such, @imazhar101/paypal-server popularity was classified as not popular.
We found that @imazhar101/paypal-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.