PalPluss MCP Server (@palpluss/mcp)
@palpluss/mcp is the PalPluss Model Context Protocol server. Add it to an AI tool that supports MCP and you can ask, in plain language, things like:
- “What’s my PalPluss service wallet balance?”
- “Show my latest failed STK payments.”
- “Add my KCB Paybill 522522, account 1188990011, as a payment channel.”
- “Send KES 500 to 0712345678 as a refund for order 1042.”
Anything that moves money or changes where money lands asks you to approve it first. The approval request goes to your MCP client’s interface, not to the AI model, so the model can’t approve its own actions.
Choose a key
For AI tools, create an MCP key in the console under API Keys → AI tools (MCP). PalPluss itself enforces the permissions, payout limits and approvals you choose for it, so they hold whichever tool uses the key. See MCP keys and approvals. To try things without real money, create the key in test mode. See Test mode.Use the hosted server (no install)
Point any MCP client that supports remote servers at:Authorization: Bearer <your MCP key>. The hosted server only accepts MCP keys and sign-ins, not standard keys.
Or run it locally
You need Node.js 18 or later.- Claude Code
- Cursor
- VS Code
Tools
Who approves
- MCP keys with approvals on: payouts and channel changes wait for you in the console under Approvals. The tool reports that the request is waiting, and nothing happens until you approve it. Your editor doesn’t ask as well.
- Test keys: nothing to approve, because the money is simulated.
- Everything else: your MCP client shows an approval prompt. If it can’t (no MCP elicitation support), the action is refused.
Choosing toolsets
read is always on. By default the server also enables wallets and collect. Channel changes and payouts stay off until you turn them on:
PALPLUSS_MCP_READ_ONLY=true to remove every tool that changes anything.
How your account stays protected
Every call goes through the public PalPluss API, so the normal protections apply: rate limits, per-phone limits, STK abuse protection and the STK success-rate pause. On top of those, the MCP server adds:1
Your approval for every write
Top-ups, STK pushes, payouts and channel changes send an approval request that your MCP client shows you. It includes the amount, the masked phone number and, for channels, what changes. If your client can’t show approval requests (MCP elicitation), these tools refuse instead of going ahead.
2
Payout limits
Limits per payout, per day (total and count), and an optional allowlist of recipient numbers. They’re checked before you’re asked, and again just before the payout is sent. The MCP server enforces these limits itself, so each running copy keeps its own tally.
3
No double payments
Payouts and top-ups carry an idempotency key, so an AI retrying after a timeout can’t pay twice. Give each separate payout its own reference.
4
Protection against prompt injection
Text written by customers or providers (references, descriptions, customer names, result messages) comes back marked
untrusted:, and the server tells the AI never to act on instructions found in it.5
Privacy and an audit trail
Phone numbers are masked in everything returned to the AI. Set
PALPLUSS_MCP_AUDIT_FILE to record one JSON line per tool call; the API key is never logged.Configuration
For example, to allow payouts of up to KES 2,000, only to two numbers:
Running it over HTTP
For apps that connect over the network rather than starting a local process:- Every request needs
Authorization: Bearer <PALPLUSS_MCP_HTTP_TOKEN>. - Each MCP client gets its own session, and approval requests work across the requests in it.
- With
PALPLUSS_MCP_HTTP_ALLOW_KEY_HEADER=true, one endpoint can serve several PalPluss accounts. Each session starts with that account’s key inX-PalPluss-Api-Keyand stays bound to it. - The server listens on
127.0.0.1by default. Put it behind TLS before exposing it.
Embedding in your own app
createPalplussMcpServer() runs the server inside your own Node.js app. Use an MCP key with approval: 'backend' to let PalPluss hold payouts for console approval, or pass an approver to show approvals in your own interface. For hosts running several instances, handleStatelessMcpRequest() serves one request at a time without sessions:
Troubleshooting
For PalPluss API errors in general, see Errors.