A plugin that integrates PayPal's APIs and MCP server into your AI coding workflow. Get AI-assisted help with PayPal payments, subscriptions, invoices, disputes, and more — in Claude Code, OpenAI Codex, and other compatible agents.
> /plugin marketplace add paypal/AI-Toolkit> /plugin install paypal@paypal-ai-toolkit
Repo: paypal/AI-Toolkit
What's inside
A plugin that integrates PayPal's APIs and MCP server into your AI coding workflow. Get AI-assisted help with PayPal payments, subscriptions, invoices, disputes, and more — in Claude Code, OpenAI Codex, and other compatible agents.
claude --version) and/or OpenAI Codex (codex --version)PayPal AI Toolkit is available on the official Anthropic marketplace, which Claude Code adds automatically. Install it with:
/plugin install paypal@claude-plugins-official
Then run /reload-plugins to activate it.
To work on the plugin itself, clone the repo and load it directly instead:
git clone https://github.com/paypal/AI-Toolkit.git
Then start Claude Code with the plugin loaded:
cd your-project/
claude --plugin-dir /path/to/AI-Toolkit
Add the PayPal marketplace, then install the plugin:
codex plugin marketplace add paypal/AI-Toolkit
codex plugin add paypal@paypal-ai-toolkit
git clone https://github.com/paypal/AI-Toolkit.git
codex plugin marketplace add /path/to/AI-Toolkit
codex plugin add paypal@paypal-ai-toolkit
Restart Codex after installing so skills and the sandbox MCP server load.
Generate a sandbox access token:
curl -X POST https://api-m.sandbox.paypal.com/v1/oauth2/token \
-u "YOUR_SANDBOX_CLIENT_ID:YOUR_SANDBOX_CLIENT_SECRET" \
-d "grant_type=client_credentials" \
| jq -r .access_token
Get the client ID and secret from the PayPal Developer Dashboard.
Paste the single-line value into your agent's config.
Claude Code — merge into the existing "env" block in ~/.claude/settings.json:
"env": {
"PAYPAL_SANDBOX_ACCESS_TOKEN": "A21AA…"
}
OpenAI Codex — merge into ~/.codex/config.toml:
[shell_environment_policy.set]
PAYPAL_SANDBOX_ACCESS_TOKEN = "A21AA…"
Fully quit and reopen the agent (close the app — not just /clear).
In Claude Code, run /paypal:setup to verify. In Codex, ask the agent to list PayPal MCP tools or create a sandbox invoice.
Use the agent config file, not
~/.zshrc. GUI launches don't source~/.zshrc, and a line-wrappedexportembeds a newline in the token that breaks the HTTP header.
Tokens expire in up to 8 hours depending on scope — check the expires_in field in the response. Run /paypal:setup refresh when you hit a 401.
Slash commands are available in Claude Code. Codex uses the same skills and MCP server through natural language.
| Command | Description |
|---|---|
/paypal:doctor [symptom] | Scan your codebase for PayPal integration issues |
/paypal:explain-error <code> | Explain a PayPal error code with causes and fixes |
/paypal:sandbox [topic] | Sandbox setup, test accounts, and testing tips |
/paypal:setup [mode] | Configure the plugin, verify MCP, refresh tokens |
/paypal:test-accounts [topic] | Test cards, BNPL, Venmo, webhooks, and scenarios |
/paypal:explain-error INSTRUMENT_DECLINED
/paypal:explain-error 422 UNPROCESSABLE_ENTITY
/paypal:sandbox subscriptions
/paypal:sandbox webhooks
/paypal:setup
/paypal:doctor webhooks not firing
The plugin connects to PayPal's sandbox MCP server, which exposes tools for:
The server uses SSE at the /sse path. paypal-sandbox activates once you set PAYPAL_SANDBOX_ACCESS_TOKEN in ~/.claude/settings.json (Claude Code) or ~/.codex/config.toml (Codex).
The paypal-best-practices skill is automatically invoked when your agent detects you're working on PayPal integrations. It provides:
The paypal-routing skill routes PayPal-related questions to the right command or reference file and is not directly user-invocable.
A PreToolUse hook checks whether a file edit touches PayPal SDK, API, or checkout code. If it does, the agent is required to consult the paypal-best-practices skill and the correct SDK version reference (v5 or v6) before writing the code.
AI-Toolkit/
├── .agents/
│ └── plugins/
│ └── marketplace.json # Codex marketplace catalog
├── .claude-plugin/
│ ├── marketplace.json # Claude Code marketplace registry
│ └── plugin.json # Claude Code plugin manifest
├── .codex-plugin/
│ └── plugin.json # Codex plugin manifest
├── .mcp.json # PayPal sandbox MCP server (SSE)
├── skills/
│ ├── paypal-best-practices/
│ │ ├── SKILL.md # Auto-injected best practices context
│ │ └── references/ # Topic-specific integration guides
│ └── paypal-routing/
│ └── SKILL.md # Intent routing (non-user-invocable)
├── commands/
│ ├── doctor.md # /paypal:doctor
│ ├── explain-error.md # /paypal:explain-error
│ ├── sandbox.md # /paypal:sandbox
│ ├── setup.md # /paypal:setup
│ └── test-accounts.md # /paypal:test-accounts
├── hooks/
│ └── hooks.json # Pre-write best-practices check
├── LICENSE # Apache-2.0
├── CONTRIBUTING.md # Contribution and commit guidelines
└── README.md
See CONTRIBUTING.md for how to report issues, develop locally, and submit pull requests.
Commit messages and PR titles should follow Conventional Commits, for example:
feat: allow provided config object to extend other configs
FAQ
paypal is a Claude Code plugin with 2 hand-picked skills for development work, indexed on Flowy. Install it with the command on its page. It includes paypal-best-practices, paypal-routing. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it