Inspiration
AI agents are starting to hold payment credentials, and the risk is easy to underestimate. One hidden instruction on a web page can make an agent pay a stranger, and a normal API key can’t tell a real purchase from a hijacked one. I build payment systems for a living, so I know a payments team wouldn’t ship a feature without limits, approvals, and an audit trail. Agents deserve the same discipline. I built Kikomo to give them that, using PayPal as the payment rail.
What it does
Kikomo is an MCP gateway between any AI agent and PayPal. Every payment tool call passes a policy check before PayPal is touched:
Safe payments go straight through. Risky payments pause until a human approves them in an inbox. Payments that break the rules are denied, with a plain-language reason. A kill switch suspends an agent instantly. Every decision is written to a hash-chained audit log, so tampering is detectable.
The key design choice is that the AI never decides whether money moves. Fixed, deterministic rules do. AI is used only to draft a policy from a sentence, and nothing it drafts takes effect until a person confirms it.
How we built it
The backend is Java 21 and Spring Boot with plain JDBC and raw SQL migrations on Postgres, with no ORM, so I fully control the audit hash chain. The MCP server runs over Streamable HTTP. PayPal is called through its sandbox REST APIs. The admin portal is React, Vite, and Tailwind, built by Gradle and served by the same app. It runs in Docker on Render, with Neon for the database. A scripted demo agent connects over real MCP, so what judges see is what a real agent would see. The demo includes a prompt-injection attack from a malicious web page, which Kikomo blocks.
Challenges we ran into
- Keeping AI out of enforcement. It was tempting to let a model judge each payment. I kept the engine a pure function with fixed reason codes, so every decision is explainable and testable.
- Making the injection demo real. The system has to know a payee address first appeared in untrusted web content, and deny it even if it looks legitimate.
- Approvals that don’t hang agents. A call waits up to 25 seconds for a human, then returns a pending state the agent can poll.
- Rebuilding mid-project. I moved the backend from Node to Java and Spring Boot partway through, while keeping the same behavior and database design.
- Sandbox setup. Features such as Payouts, Invoicing, and Transaction search have to be enabled on the PayPal app before the matching tools work.
- A tight deadline. I built it as a solo developer in about ten days, so I had to cut scope hard.
Accomplishments that we're proud of
- The AI never decides whether money moves. The policy engine is a pure, deterministic function with fixed reason codes. The same input always gives the same answer, and every decision can be explained and tested. AI only drafts a policy from a sentence, and a person has to confirm it before it takes effect.
- A prompt-injection attack we can show and block. A web page hides an order that tells the agent to pay a stranger. Kikomo traces that payee back to untrusted content and denies the payment, even if the address looks legitimate.
- Humans stay in control without breaking agents. Risky payments pause for approval in an inbox, with the amount, payee and reason shown. If nobody answers in time, the agent gets a pending status it can poll. Approving later still executes the payment.
- A tamper-evident audit log. Each entry carries the fingerprint of the one before it, so changing history breaks the chain at the exact entry. I built the hash chain by hand in plain SQL and Java, with no ORM.
- A one-click kill switch. One button suspends an agent, and the next call from it is refused.
- Real MCP, not a mock. The demo agent connects over the Model Context Protocol, so judges see the same traffic a real agent would send. Any MCP-capable agent can connect with a token.
- A portal people can use. The admin portal has a Why panel that shows the reason codes, the policy values and exactly what the agent sent for every call. A denial explains itself.
- Tested and shippable. The project has unit tests, Postgres integration tests with Testcontainers and frontend tests. It ships as a single Docker container and is open source under MIT.
- Scope discipline. I rebuilt the backend in Java and Spring Boot partway through the project and kept the same behavior and database design, as a solo developer working against a deadline.
What we learned
- Guardrails are most convincing when they’re boring: deterministic rules plus an honest audit trail.
- A good policy denial is a product feature, not an error. The “why” is what builds trust.
- MCP makes it practical to put a safety layer in front of any agent without changing the agent.
What's next for Kikomo
- Teams and workspaces. Sign-up for individuals and teams, each with their own agents, guardrails, and approvers.
- Approvals and payments over WhatsApp. Many small businesses in Africa run on WhatsApp. A supplier payment would be one request, approved with a reply, and the same fixed rules would still decide.
- Reports and alerts. Spend by agent, blocked attempts, and alerts on denials and kill-switch use.
- More payment rails. PayPal first. The policy engine is independent of the payment provider, so mobile money and other providers can follow.
