Security review MCP server and HTTP API
How do I add a security review MCP server to my coding agent?
pokayoke runs a security review MCP server at https://pokayoke.sh/mcp. Create an API key on the dashboard, add the server to Cursor, VS Code or any MCP client with that key as a bearer token, and your coding agent can submit a repository, a pasted file or a diff for review and read each finding back as validated JSON.
Run pokayoke from an agent or a script. Every path returns the same validated envelope. The agent reference is the guide for a model to read first.
Everything the website does is available to a script: the MCP tools and the HTTP API cover every account operation. Creating an API key stays on the dashboard, by design.
Quick start
Create an API key on the dashboard, then point an MCP client or a script at this server with it.
Every call sends the key as Authorization: Bearer <key>. A key is shown once, when it is created on the dashboard's Agents & API page; replace pk_your_api_key below with it.
{
"mcpServers": {
"pokayoke": {
"type": "http",
"url": "https://pokayoke.sh/mcp",
"headers": {
"Authorization": "Bearer pk_your_api_key"
}
}
}
}
claude mcp add --transport http pokayoke https://pokayoke.sh/mcp \
--header "Authorization: Bearer pk_your_api_key"
{
"servers": {
"pokayoke": {
"type": "http",
"url": "https://pokayoke.sh/mcp",
"headers": {
"Authorization": "Bearer pk_your_api_key"
}
}
}
}
curl -sS https://pokayoke.sh/api/v1/account \
-H "Authorization: Bearer pk_your_api_key"
curl -sS -X POST https://pokayoke.sh/api/v1/reviews \
-H "Authorization: Bearer pk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"kind":"repo","repo_url":"https://github.com/example/app"}'
Agents
An agent reads these before it calls anything. Each is served by this deployment, with its own origin in every link.
| Document | What it holds | Format |
|---|---|---|
| /docs/agents.md | The agent reference: what the service is and how to call it, for a model to read first. | Markdown |
| /llms.txt | The site index for language models: each page and its Markdown copy. | Plain text |
| /openapi.json | The HTTP API as OpenAPI 3.1, with the envelope schemas. | JSON |
| /.well-known/mcp/server-card.json | The MCP server card: its name, version, transport and endpoint. | JSON |
Every MCP tool result and every API answer is a validated JSON object, never prose: an agent parses it or fails loudly. The MCP endpoint is https://pokayoke.sh/mcp, one JSON-RPC object per POST, with no session and no event stream.
MCP tools
21 tools, as tools/list returns them. Each carries an input and an output schema; the result is always a validated JSON object.
| Tool | Arguments | What it does |
|---|---|---|
review_submit | one of repo_url, codeoptional ref, scope | Queue a security review of a repository URL (https or git@) or inline source text; this server never reads a path on the server, so a path or file: URL is refused as forbidden_target (upload an archive to POST /api/v1/reviews instead). |
review_get | one of job_id, review_id | Read one review, by the job_id review_submit or review_patch returned or by a review_id (from review_list, a report link, or a server scan the website started). |
review_list | optional page, sort, dir, scope, status | List the calling account’s reviews, queued and running ones included, with the review id, repository, status, trigger, commit, finding count and the fixes open on GitHub, 25 to a numbered page, sorted by any column (newest first by default). |
finding_get | review_id, finding_id | Read one finding from one finished review, by review_id and finding_id. |
review_patch | diffoptional repo_url | Review a unified diff without cloning anything. repo_url, when given, is the repository the diff targets and supplies its conventions. |
server_scan | host | Scan one live HTTP server for the four declared attack-chain contracts and return the pokeyoka-server/1 envelope: the fingerprint, every contract outcome with per-link evidence, and the findings. |
review_events | review_idoptional after | Read a review’s progress events (queued, cloning, hunting, verifying, done …) after a sequence number, and whether the review is done. |
finding_list | review_id | List the findings of one review: id, severity, verdict, tier, title, file, line, CWE, and, when the review’s envelope is still stored, the evidence and the full verification beside those summary fields, and notProvenHere: true on a finding carried from an earlier review whose proof was not run at this commit. |
review_fix_prompt | review_idoptional finding_id | Write a prompt for a coding agent that fixes a finished review’s findings with their full context: confirmed findings first, then unproven ones, never a refuted one, each with its severity, CWE, file:line, the vulnerable line, the evidence, who can reach it, the impact, the proof in plain words and the suggested fix diff with its status; then the instructions and the report link. finding_id narrows it to one finding. |
account_get | none | Read the account behind the calling key: user, plan and its limits, the reviews left this month and when they reset, monitored repositories against the plan limit, the install, pricing and docs links, every open finding of the monitored repositories, how many exploits are proven and open, and how many fixes are open on GitHub with the link to them. |
repository_list | optional sort, dir | List the repositories a linked GitHub App installation covers or a review named: whether each is monitored (pushes and pull requests reviewed), its branch and head commit, its newest review with confirmed and unproven counts, open findings and pushes skipped this month; sorted by any column, the newest push first by default. |
repository_monitor | repo, monitored | Switch push and pull-request reviews of one installed repository on or off. |
installation_list | none | List the GitHub App installations linked to the account, with the install link and the fixer App’s. |
fix_list | optional limit | List the fix pull requests and private advisories delivered to the account’s repositories, newest first. |
billing_checkout | optional plan, interval | Open a Stripe Checkout session for a paid plan (plan pro, the default, team or enterprise; interval month, the default, or year; where this server sells it) and return its link for the user to open in a browser; no payment happens in this call. |
billing_portal | none | Open a Stripe billing portal session (invoices, payment method, cancel) and return its link for the user to open in a browser. |
billing_credits | none | Open a Stripe Checkout session for one review pack, a one-time purchase of more manual reviews for the current UTC month (they expire at its end), and return its link for the user to open in a browser; no payment happens in this call. |
api_key_list | none | List the account’s API keys by label and prefix, with when each was created, last used and revoked. |
api_key_revoke | id | Revoke one of the account’s API keys by id (from api_key_list). |
notifications_get | none | Read where the account’s exploit alerts go: one email per review that proves an exploit, to a verified address. |
notifications_set | optional email, enabled, min_severity | Change the account’s exploit alerts; every argument is optional and an absent one is kept. |
Left out on purpose:
api_key_create: A new key would land in the agent’s transcript. Keys are created on the dashboard; an agent can list and revoke them.archive upload: MCP has no file transport. Upload an archive over HTTP: POST /api/v1/reviews as multipart/form-data with kind=upload and an archive file part.
HTTP API
The bearer-key API at /api/v1: one endpoint per account operation, the same JSON the MCP tools answer.
| Method | Path | What it does |
|---|---|---|
GET | / | The account behind the key: user, plan, usage and links. |
GET | / | Reviews, queued and running included, each with its open fixes on GitHub, 25 to a numbered page: ?page (from 1; past the last, the last), ?sort (when, commit, repo, result, fixes, trigger, branch, took; when by default), ?dir (asc or desc; the column’s own by default), ?scope (all, or repositories: repository reviews with a commit), ?status. |
POST | / | Queue a review: JSON {kind: repo|code|patch|server, ...}, or a multipart upload with kind=upload and an archive file part. Spends one unit of the monthly quota. |
GET | / | One review, with its envelope once finished. |
GET | / | A review’s progress events after ?after (a sequence number). |
GET | / | The findings of one review. |
GET | / | One finding of one review. |
GET | / | A prompt for a coding agent that fixes the review’s confirmed and unproven findings, with their full context, as the prompt field; ?finding for one finding. 202 with prompt null while the review is queued or running. |
GET | / | Installed and reviewed repositories: monitoring, last review, open findings; with the monitored count and the plan limit. ?sort (repo, branch, head, result, monitoring, pushed; pushed, the newest push first, by default), ?dir (asc or desc; the column’s own by default); every tie by the name. |
PUT | / | Switch push reviews of one repository on or off: JSON {monitored}. 409 limit_reached past the plan; 404 not_installed. |
GET | / | The linked GitHub App installations and the install links. |
GET | / | Fix pull requests and advisories delivered to the account’s repositories; ?limit. |
GET | / | The plan, its price, status and renewal. |
POST | / | A Stripe Checkout link for a paid plan: JSON {plan, interval} or ?plan=&interval=; plan pro (the default), team or enterprise, interval month (the default) or year, where this deployment sells it. The quantity is the plan’s own. 409 already_subscribed on any paid plan; 400 invalid_args for an unknown field or a plan and interval not sold here; 503 billing_disabled. |
POST | / | A Stripe billing portal link. 409 no_customer; 503 billing_disabled. |
POST | / | A Stripe Checkout link for one review pack: more manual reviews, spent in the UTC month it is bought in, for any account, Free included. No body. 400 invalid_args where this deployment sells no pack; 503 billing_disabled. |
GET | / | The account’s API keys, without their secrets. |
DELETE | / | Revoke one API key (the calling key included). |
GET | / | Exploit alerts: the verified address they go to, on or off, the least severity that sends one, and any address waiting for verification. |
PUT | / | Change exploit alerts: JSON {email, enabled, min_severity}, each optional. A new address is mailed a verification link and receives alerts once it is opened; null or the sign-in address returns them to that address. 429 rate_limited past 5 links an account an hour, or 3 links an address a day across every account. |
POST | / | Mail a fresh verification link to the address waiting for one. 404 not_found when none waits; 429 rate_limited past 5 links an account an hour, or 3 links an address a day. |
- Every request sends
Authorization: Bearer <key>; without a valid key every path under/api/v1answers 401. The session cookie is never read here. - The review list pages by number, 25 to a page:
?page(from 1), sorted by any column with?sortand?dir,?scope=repositoriesfor repository reviews only; it answerspage,pages,per_pageandtotal. Other lists take?limit(default 20, at most 200). - The repository list sorts with
?sort(repo,branch,head,result,monitoring,pushed; the newest push first by default) and?dir(ascordesc, the column’s own by default), as the Repositories page does. - A JSON body is at most 1 MiB, but a review submission (
POST /api/v1/reviews) at most 1600 KiB, so pastedcodeor adiffat its 512 KiB limit (UTF-8) fits once JSON escapes it; an archive upload at most 25 MiB, asmultipart/form-datawithkind=uploadand anarchivefile part. - Every answer carries
Cache-Control: no-store. The full contract is https://pokayoke.sh/openapi.json. - Only on the site: create an API key. A key that could mint keys would survive its own revocation through the key it minted; keys are created on the dashboard, behind the session.
Errors
The API and the MCP tools refuse with the same codes. Branch on the code, never on the sentence.
The HTTP API answers every refusal as {"error":{"code","message"}} at the status below. A refusal with context carries it beside the code: upgrade_url on limit_reached (it is null on Enterprise, a grant, with billing off, or where no larger plan is sold), resets_at on quota_exhausted, and period: "day" when it is a free account's daily limit.
| Code | Status | Meaning |
|---|---|---|
invalid_args | 400 | The arguments are wrong: a missing or unknown field, a bad value, or a target this server will not take. |
unauthenticated | 401 | No API key, or a key that is unknown or revoked. The answer carries WWW-Authenticate: Bearer. |
forbidden | 403 | The key may not do this, or the target is not one this server will take: a private, loopback or local host, or a scan host the account has not proven it owns. |
forbidden_target | 403 | A review target that names a path on this server: a directory, a local path or a file: URL. Review a clone URL, pasted code or an uploaded archive instead. |
not_found | 404 | No such review, finding, job, repository or key, or one the calling key may not read (an embargoed review answers exactly as a missing one). |
method_not_allowed | 405 | The path exists, but not for this method; the Allow header names the ones it takes. |
limit_reached | 409 | The plan monitors no more repositories; switch one off, or upgrade at upgrade_url when it is not null (it is null on Enterprise, a grant, with billing off, or where no larger plan is sold). |
already_subscribed | 409 | The account already pays for a plan, a grandfathered one included; switch plans in the billing portal instead. |
no_customer | 409 | The account has no billing history yet; open billing_checkout first. |
payload_too_large | 413 | A JSON body over 1 MiB (a review submission over 1600 KiB), or an upload over 25 MiB. |
unsupported_media_type | 415 | The body is not application/json, or multipart/form-data for an upload. |
quota_exhausted | 429 | The account has used every review of its monthly quota, or (a free account, period: "day") every review of its daily limit; resets_at says when it refills. |
rate_limited | 429 | Too many server scans started recently; retry_after_seconds says how long to wait. |
internal | 500 | The server failed; the detail says what, never where. |
upstream_error | 502 | GitHub or Stripe did not answer; try again. |
billing_disabled | 503 | Billing is not enabled on this server. |
An MCP tool that fails answers JSON-RPC -32603 with the code in its message: tool "<name>" failed: pokayoke-mcp: <code>: <detail>. A missing or invalid bearer is HTTP 401, a batch request HTTP 400, and a body over 1 MiB (a tools/call over 1600 KiB, room for a code or diff argument at its 512 KiB limit once JSON escapes it) HTTP 413, before any tool runs.
| Code | Meaning |
|---|---|
invalid_args | The arguments are wrong: a missing or unknown field, a bad value, or a target this server will not take. |
not_found | No such review, finding, job, repository or key, or one the calling key may not read (an embargoed review answers exactly as a missing one). |
pending | The job finished but its report is not readable yet; poll again. |
forbidden_target | The target is not one this server will read: a scan host that is private, loopback, local or otherwise not public, or a review target that names a path on the server (a path or a file: URL); review a repository URL, pasted code or an uploaded archive instead. |
budget_exhausted | The server scan spent its request budget before it finished. |
quota_exhausted | The account has used every review of its monthly quota (the one the website and the HTTP API spend too), or a free account its daily limit (period "day": reviews that run the models in one UTC day, every route counted); the detail says when it resets. |
rate_limited | The account started too many server scans recently; the detail says how long to wait. |
limit_reached | The plan monitors no more repositories; switch one off, or upgrade at the detail’s upgrade_url when it is not null (it is null on Enterprise, a grant, with billing off, or where no larger plan is sold). |
already_subscribed | The account already pays for a plan, a grandfathered one included; switch plans in billing_portal instead. |
no_customer | The account has no billing history yet; open billing_checkout first. |
billing_disabled | Billing is not enabled on this server. |
not_configured | This server lacks a setting the call needs; the detail’s reason names it (no public URL: billing is on, but there is no address for Stripe to send the browser back to). |
internal | The server failed; the detail says what, never where. |
Plans and limits
The limits this server is configured with. Prices are on the pricing page.
| Plan | Monitored repositories | Reviews a month | Contributors included | Sold |
|---|---|---|---|---|
| Free | 3 | 100 | 1 | Free |
| Pro | 10 | 1,000 | 3 | Monthly or annually |
| Team | 40 | 5,000 | 10 | Monthly or annually |
| Enterprise | unlimited | 20,000 | no limit (fair use) | Monthly or annually |
A monitored repository is reviewed on every push and pull request. Free monitors 3 repositories, Pro 10 repositories, Team 40 repositories and Enterprise any number; switch one on or off on the dashboard, with repository_monitor or with PUT /api/v1/repositories/{owner}/{name}/monitoring. Past the limit the switch answers limit_reached. See pricing.
Buy a plan with billing_checkout, plan pro, team or enterprise and interval month or year (pro and month by default), or POST /api/v1/billing/checkout with {"plan":"pro","interval":"year"}. Pro, Team and Enterprise are sold monthly or annually. A plan asked for at an interval this server does not sell answers invalid_args. An account that already pays for a plan, a grandfathered one included, answers already_subscribed and switches plans in the billing portal.
A contributor is a distinct GitHub user who pushed to, or opened a pull request on, a monitored private repository in the last 90 days. Bots, the fixer App's among them, never count, and neither does anything on a public repository. usage.contributors on the account ({used, included}, included null where the plan does not count them) says where it stands.
Free reviews one contributor on private repositories: the account's linked GitHub user first, then the earliest seen. A push or pull request by anyone else is not reviewed: GitHub's webhook delivery gets 204 No Content with X-Pokayoke-Skip: contributor limit, and the repository counts it in contributor_skipped_pushes.
Pro and Team are never blocked: each includes the contributors in the table and bills each one past them per contributor. The subscription's quantity is the contributors used, at least 1, and the plan price covers the included ones: checkout counts the contributors the account has then, after it the quantity rises when a new contributor arrives and falls as one ages out of the 90 days, and Stripe prorates the change. Enterprise has no contributor limit (fair use).
An account that existed before this plan catalog is grandfathered (plan.grandfathered is true): on Free it has the Free repository limit and no contributor limit. A subscriber on an earlier price keeps the terms it bought, as legacy_pro, labelled Pro (original price), or legacy_max, labelled Max (original price), never sold again: plan.repo_limit and plan.review_quota say what it allows, its contributors are not counted against it, and it switches plans in the billing portal.
The free plan also has a daily limit: 5 reviews that run the models per UTC day, counted over the website, the HTTP API, the MCP tools and its pushes and pull requests. A review answered by reuse of one already run, and a server scan, do not count. Past it a submission answers 429 quota_exhausted with period: "day" and resets_at, and a push or pull request is accepted and waits: its check stays open, and after 00:00 UTC the newest waiting commit of each branch or pull request runs (an older one reads Replaced by a newer push: its record carries replaced: true and replaced_by, the review that ran instead, and keeps status failed only for compatibility; it is not a failed review). A pull request on its repository by an author without write access draws on its own allowance of the same size, 5 reviews a day, and never on the account's: past it such a pull request waits for 00:00 UTC and the account's own reviews still run. usage.daily on the account says where it stands: used and reached for the account's own reviews, strangers_used and strangers_reached for the allowance of authors without write access, and waiting for every review waiting, strangers_waiting of them those authors' pull requests; waiting_until on a review says when it runs. Paid plans and grants have no daily limit.
A push to a repository that is not monitored is not reviewed. GitHub's webhook delivery gets 204 No Content with X-Pokayoke-Skip: repository not monitored, which its delivery log shows, and the dashboard counts the pushes skipped this month.
The dashboard, repository_list and GET /api/v1/repositories show each repository's default branch and the branch its head is on, its head (the default branch's newest push's commit and the first line of its message, cut to 120 characters, or the commit of the default branch's newest review) and the default branch's latest review with the confirmed and unproven counts. A push to another branch, and a pull request, never move a repository's head or result: their reviews are listed with the reviews, under their branch. A push to the default branch of a repository that is not monitored still moves its head.
A confirmed finding is either an exploit proven, one an executed run demonstrated, or a finding confirmed by reading the code, which no run demonstrated. Only the first is ever called proven: a review's findings and a repository's latest_review carry confirmed with its two parts, proven and confirmed_by_reading; an open finding carries proven; and the account's open_exploits, the Overview's headline, counts the proven ones alone. Every one of these counts is the review report's own: a hardening note an enforced closure holds is in none of them.
A review started from the website, the HTTP API or an MCP tool spends one review of the account's monthly quota, which resets on the first of each UTC month. A review GitHub starts on a push or a pull request spends none.
Report format
A report is a pokeyoka-review/1 envelope, or pokeyoka-server/1 for a live server scan. Both carry findings, controls and a verification record.
Read any review as the envelope itself: https://pokayoke.sh/r/<id>?format=json answers 202 while it runs and 200 with the envelope when it is done; ?format=markdown renders it. With a key, GET /api/v1/reviews/{id} and the review_get tool return the same document.
To fix a review with a coding agent, https://pokayoke.sh/r/<id>?format=prompt answers a plain-text prompt: every confirmed finding, then every unproven one (never a refuted one), each with its location, the vulnerable line, the evidence, who can reach it, the impact, the proof and the suggested fix, then the instructions and the report link. Add &finding=<finding id> for one finding. GET /api/v1/reviews/{id}/prompt and the review_fix_prompt tool return the same text as their prompt field.
The machine-readable schema is review_get's output schema in tools/list, and ReviewEnvelope in openapi.json. Both envelopes are additive within v1: a reader ignores fields it does not know. Validation is part of the contract: an envelope without controls is invalid, not clean.
pokeyoka-review/1
| Field | Type | Required | Notes |
|---|---|---|---|
schema | "pokeyoka-review/1" | yes | Always "pokeyoka-review/1". |
id | string | yes | Unique run id. |
repo | object | yes | |
trigger | cli | ci | schedule | mcp | yes | |
runner | engine | agent | no | Which runner searched the repository: engine (the hosted engine) or agent (the agent runner ran the search stage; this site verified every finding itself, and usage covers verification and fixes, not the search). |
status | complete | partial | failed | yes | What the run did: complete when it finished its work, partial when it could not finish it, failed when it stopped. |
degraded | boolean | yes | True when a phase ran with a fallback. |
stats | object | no | Counts about the findings the status does not carry. |
error | string | no | Set only when status is failed and the run stopped after it had recorded findings: the review’s public error. |
coverage | object | yes | |
runtime | object | no | How the untrusted commands ran: the sandbox backend that contained the PoC (docker, unshare, sandbox-exec or process), and the uid/gid a direct-spawn child ran under when the deployment installed a uid boundary. childUid and childGid are null when the child inherited the worker’s own identity. |
runHealth | object | no | How the run’s attempts went, counted: provider refusals and attempts the environment stopped, and (when the containment probe ran) its fence record: the backend, whether the control read connected, whether the fenced read was refused, the host:port that decided it, and the derived ok. |
examined | array | no | One row per defect class a clean lens answer said it examined, and how many sites it checked in that class: the lens’s own account (by: agent-reported), never a map of what it read. |
fixAudit | object | no | The twelve-question audit of a published fix: the commit it was read at, whether the audit followed a call site or an input, and one answer per question (site, clean or n/a) with its detail. |
hunt | object | no | The hunt’s per-lens coverage. |
threatModel | object | yes | |
findings | array | yes | |
resolved | array | no | Every stored finding this review closed, never also listed in findings. state is fixed (its stored proof no longer fires on this commit), no-longer-present (its code changed and the verifier no longer finds it; never called fixed) or code-removed (its file is gone or its code can no longer be found; never called fixed). provenIn is the review that last confirmed it and provenAt the commit that review read; at is this review’s commit: the reviewed commit at which the site first observed the close, which may be later than the commit that made it. |
controlsChecked | array | yes | |
inconclusive | array | yes | |
usage | object | yes | |
timings | object | yes |
pokeyoka-server/1
A scan of a live target anchors each finding to an endpoint instead of a source line, so its line is 0.
A live scan runs only against a host the account has proven it owns, and only from this server:
- Ownership: add the host on the Submit page, then publish its token as a DNS TXT record
_pokeyoka-verify.<host>with the valuepokeyoka-verify=<token>, or as the body ofhttps://<host>/.well-known/pokeyoka-verify.txt. The proof is checked again before every scan, a queued one included; a check that passes stands for 30 days, and a record or file that is gone stops the scan. - Same host: every request stays on the proven host's origin. A link or API path the target hands back that leaves it is never requested.
- DNS pinned at connect: each request resolves the host, is refused when any answer is not public, and connects to exactly the address it checked, one the ownership check also saw.
- Redirects: a scan request follows none, so a 30x is the answer. The ownership file check follows one only to the same host over https.
- Refused addresses: loopback, private, link-local (cloud metadata included), carrier-grade NAT, unique-local, multicast and reserved ranges, and the networks this deployment blocks, such as its own fleet and cluster ranges. A refusal for a blocked network says so and does not name the range.
A scan sends at most 40 requests, with at most one state-changing request per check and no destructive method.
| Field | Type | Required | Notes |
|---|---|---|---|
schema | "pokeyoka-server/1" | yes | Always "pokeyoka-server/1". |
target | object | yes | |
contracts | array | yes | |
findings | array | yes | The shared finding shape, with `line` anchored at 0 because a live target has no source line. |
controlsChecked | array | yes | |
usage | object | yes | |
timings | object | yes |
Updated