Pugi
Passive website security check graded A+ to F, free with a no-signup agent key; credit top-ups by card link or USDC over x402.
Hosted MCP Server
npx add-mcp 'https://api.pugi.io/api/agent/v1/mcp'Installs into Claude Code, Codex, Cursor and more
Documentation
Pugi for AI agents
Pugi is an AI product team that builds, checks and publishes websites and apps. This page is for AI agents and the people who run them. It describes only what works today.
1. Get a key
curl -X POST https://api.pugi.io/api/agent/v1/keys \
-H "content-type: application/json" \
-d '{"name": "my-agent"}'
- With no Authorization header, Pugi creates a new agent account and its first key.
- Signed in (send your Pugi API key as
Authorization: Bearer ...), the key joins your account. - The key starts with
pugi_agent_and is shown once. Store it. - A new key comes with $0.50 of free credit (once per signed-in account).
- Optional fields:
scopes(a list of tool names this key may call) anddaily_cap_usd(default 5, up to 500). - Revoke the calling key with
DELETE /api/agent/v1/keys/self. Signed-in owners can list keys withGET /api/agent/v1/keysand revoke any of them withDELETE /api/agent/v1/keys/{id}. - Pugi creates a limited number of new keys a day. If the limit is reached, try again after midnight UTC.
2. Connect the MCP server
- Address:
https://api.pugi.io/api/agent/v1/mcp - Transport: Streamable HTTP, JSON responses.
- Auth:
Authorization: Bearer pugi_agent_...
Tools today:
| Tool | What it does | Price |
|---|---|---|
scan_url | Passive, read-only security check of a public website, graded A+ to F. 10 a day per key. | Free |
get_balance | Credit balance, today's spend, the daily cap, the price list. | Free |
buy_credits_link | A card checkout link a person opens to add credit. It never charges by itself. | Free |
publish_status | Status and address of the apps this account has published. | Free |
catalog_search | Search the public Pugi catalogue of sites and apps to start from. | Free |
scan_repo | Leaked secrets, vulnerable dependencies and risky code in a public GitHub repository, with file and line. | $1, charged only when the check finishes |
The same tools answer over plain HTTP: POST https://api.pugi.io/api/agent/v1/tools/{tool} with the tool's arguments as the JSON body.
Search the catalogue
curl -X POST https://api.pugi.io/api/agent/v1/tools/catalog_search \
-H "Authorization: Bearer pugi_agent_..." \
-H "content-type: application/json" \
-d '{"query": "booking", "tags": ["saas"], "category": "productivity", "limit": 5}'
- All arguments are optional:
query(words in the title or description, up to 80 characters),tags(up to 8; a card must carry every one),category(productivity,ecommerce,marketing,finance,education,health,entertainment,developer_tools,social,other),limit(1 to 20, default 10). - Each item has
title,description,tags,preview_image_url,page_url(its page on pugi.io/catalog) andstart_from_this_url: the Pugi console with a brief for a new project like it. A person signs in there; it does not copy the card's code. - Free, up to 300 searches a day per key.
Check a GitHub repository
curl -X POST https://api.pugi.io/api/agent/v1/tools/scan_repo \
-H "Authorization: Bearer pugi_agent_..." \
-H "Idempotency-Key: scan-acme-shop-0001" \
-H "content-type: application/json" \
-d '{"repo_url": "https://github.com/acme/shop", "ref": "main"}'
repo_url(required): a public GitHub repository, up to 50 MB. Private repositories, other hosts, tags and commit SHAs are not supported yet.ref(optional): a branch name; default the repository's default branch.- The check reads the committed files of the branch head: dependency advisories (including known malicious packages), secret patterns and code rules. No code is run. It is not a pentest.
- A check can take a few minutes. When the answer is
"state": "running", call again with the sameIdempotency-Keyandrepo_urlafterretry_after_seconds. When it is"state": "finished", it hasverdict(passorissues_found),summary,blocking(the lines that fail the check, such as a leaked key with its file and line) andfindings(each withseverity,rule,fileandlineorpackage, and a shortfix). - $1 from credit, charged only when a finished check is handed over. A failed check costs nothing. Collecting the same check again is never charged twice. Over MCP the key is the
idempotency_keyargument. - One running check per account at a time.
3. Prices
One credit balance pays for every tool. Prices are per call, in US dollars, before tax. The live list is at https://api.pugi.io/api/agent/v1/pricing.
| Tool | Price | Open to agents |
|---|---|---|
| scan_url | Free | Yes |
| scan_deep | $0.50 | Not yet |
| scan_repo | $1 | Yes |
| catalog_search | Free | Yes |
| build_site | $1.50 | Not yet |
| build_app | $8 | Not yet |
| edit | $0.25 | Not yet |
| make_logo (four logos) | $2 | Not yet |
| brand_kit | $29 | Not yet |
A tool that is not open yet answers HTTP 501 and charges nothing.
4. When credit runs out
A paid call without enough credit answers HTTP 402:
{
"error": "insufficient_credit",
"required_usd": 1.5,
"balance_usd": 0.2,
"buy_credits_url": "https://api.pugi.io/api/agent/v1/checkout?t=...",
"buy_credits_amount_usd": 5
}
Show buy_credits_url to a person. They open it and pay by card on a hosted checkout page; the credit lands on the account in the link. Paid calls need an Idempotency-Key header, so a retry is never charged twice. Each key also has a daily spend cap. An agent can also pay the 402 itself, without a person, as a business purchase: see section 5.
5. Payments
- Card top-ups through a hosted card checkout. Tax, where it applies, is added at checkout.
- No tool takes a payment by itself. Agents spend credit a person has already added, or credit the agent's own wallet paid for (below).
Paying without a person (a business purchase)
Agent payments are business purchases. Buyers in the EU and the UK need a valid VAT number; anyone else can pay as a person on our checkout page. Pugi Inc. is the seller.
-
Your country decides whether a declaration is needed. It is the country you declared, else the country Cloudflare sees for the request, else unknown. If the two disagree, the stricter rule applies.
- Outside the EU and the UK, or when the country is unknown: nothing to declare. The account is a business by default, and the first payment records that, with the country and where it came from.
- In the EU or the UK: declare the business once with its VAT number. Pugi checks it in the EU (VIES) or UK (HMRC) VAT register. Without a valid number, a person adds credit by card at
buy_credits_urlinstead, and VAT is handled there.
curl -X POST https://api.pugi.io/api/agent/v1/business \
-H "Authorization: Bearer pugi_agent_..." \
-H "content-type: application/json" \
-d '{"business_name": "Acme GmbH", "country": "DE", "vat_id": "DE123456789", "business_use": true}'
- Anyone may declare, to put the business name on the record. An account declared outside the EU and the UK still needs a VAT number when its requests come from the EU or the UK.
- Prices are before tax. EU and UK businesses account for VAT under the reverse charge.
- A paid call without enough credit answers HTTP 402 with two ways to pay. Pick one, pay, and retry the same request with the same
Idempotency-Key:
| Way to pay | What the 402 carries | How the agent answers | What it buys |
|---|---|---|---|
| Card, through an agent wallet (for example Link) | WWW-Authenticate: Payment ... method="stripe" (Machine Payments Protocol) | A Shared Payment Token, sent as Payment-Authorization: Payment <credential> | A credit pack: $5, or the smallest pack that covers the call |
| USDC on Base | PAYMENT-REQUIRED (x402 v2, exact) | A signed transfer, sent as PAYMENT-SIGNATURE | Exactly this call, from $0.01 |
- A paid answer carries a receipt:
Payment-Receiptfor a card,PAYMENT-RESPONSEfor USDC. - Sending the same credential twice never charges twice.
- A card issued in the EU or UK needs a confirmed VAT number on the account.
- To add credit without making a call, use
POST https://api.pugi.io/api/agent/v1/creditswith{"amount_usd": 5}. It answers 402 with the same options. Over MCP, theadd_credittool does the same with the MCP payment binding: error-32042carries the challenge, and the wallet retries with the credential in_meta.
Refunds go back to the card or wallet that paid, and take back the credit they bought, as far as it is still unused.
6. Limits and rules
- Each key has a request rate limit and a daily spend cap.
- The site check reads only what a browser receives. It is not a pentest and does not prove a site is secure.
- Publishing stays under the person's control. Building and publishing through the agent API is not open yet.
Questions: https://pugi.io/support