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.

Cursor and .mcp.json
{
  "mcpServers": {
    "pokayoke": {
      "type": "http",
      "url": "https://pokayoke.sh/mcp",
      "headers": {
        "Authorization": "Bearer pk_your_api_key"
      }
    }
  }
}
Claude Code
claude mcp add --transport http pokayoke https://pokayoke.sh/mcp \
  --header "Authorization: Bearer pk_your_api_key"
VS Code: .vscode/mcp.json
{
  "servers": {
    "pokayoke": {
      "type": "http",
      "url": "https://pokayoke.sh/mcp",
      "headers": {
        "Authorization": "Bearer pk_your_api_key"
      }
    }
  }
}
curl
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.

Discovery documents
DocumentWhat it holdsFormat
/docs/agents.mdThe agent reference: what the service is and how to call it, for a model to read first.Markdown
/llms.txtThe site index for language models: each page and its Markdown copy.Plain text
/openapi.jsonThe HTTP API as OpenAPI 3.1, with the envelope schemas.JSON
/.well-known/mcp/server-card.jsonThe 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.

MCP tools
ToolArgumentsWhat it does
review_submitone of repo_url, code
optional 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_getone of job_id, review_idRead 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_listoptional page, sort, dir, scope, statusList 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_getreview_id, finding_idRead one finding from one finished review, by review_id and finding_id.
review_patchdiff
optional repo_url
Review a unified diff without cloning anything. repo_url, when given, is the repository the diff targets and supplies its conventions.
server_scanhostScan 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_eventsreview_id
optional after
Read a review’s progress events (queued, cloning, hunting, verifying, done …) after a sequence number, and whether the review is done.
finding_listreview_idList 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_promptreview_id
optional 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_getnoneRead 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_listoptional sort, dirList 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_monitorrepo, monitoredSwitch push and pull-request reviews of one installed repository on or off.
installation_listnoneList the GitHub App installations linked to the account, with the install link and the fixer App’s.
fix_listoptional limitList the fix pull requests and private advisories delivered to the account’s repositories, newest first.
billing_checkoutoptional plan, intervalOpen 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_portalnoneOpen a Stripe billing portal session (invoices, payment method, cancel) and return its link for the user to open in a browser.
billing_creditsnoneOpen 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_listnoneList the account’s API keys by label and prefix, with when each was created, last used and revoked.
api_key_revokeidRevoke one of the account’s API keys by id (from api_key_list).
notifications_getnoneRead where the account’s exploit alerts go: one email per review that proves an exploit, to a verified address.
notifications_setoptional email, enabled, min_severityChange 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.

HTTP API endpoints
MethodPathWhat it does
GET/api/v1/accountThe account behind the key: user, plan, usage and links.
GET/api/v1/reviewsReviews, 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/api/v1/reviewsQueue 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/api/v1/reviews/{id}One review, with its envelope once finished.
GET/api/v1/reviews/{id}/eventsA review’s progress events after ?after (a sequence number).
GET/api/v1/reviews/{id}/findingsThe findings of one review.
GET/api/v1/reviews/{id}/findings/{finding_id}One finding of one review.
GET/api/v1/reviews/{id}/promptA 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/api/v1/repositoriesInstalled 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/api/v1/repositories/{owner}/{name}/monitoringSwitch push reviews of one repository on or off: JSON {monitored}. 409 limit_reached past the plan; 404 not_installed.
GET/api/v1/installationsThe linked GitHub App installations and the install links.
GET/api/v1/fixesFix pull requests and advisories delivered to the account’s repositories; ?limit.
GET/api/v1/billingThe plan, its price, status and renewal.
POST/api/v1/billing/checkoutA 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/api/v1/billing/portalA Stripe billing portal link. 409 no_customer; 503 billing_disabled.
POST/api/v1/billing/creditsA 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/api/v1/keysThe account’s API keys, without their secrets.
DELETE/api/v1/keys/{id}Revoke one API key (the calling key included).
GET/api/v1/notificationsExploit alerts: the verified address they go to, on or off, the least severity that sends one, and any address waiting for verification.
PUT/api/v1/notificationsChange 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/api/v1/notifications/verifyMail 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/v1 answers 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 ?sort and ?dir, ?scope=repositories for repository reviews only; it answers page, pages, per_page and total. 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 (asc or desc, 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 pasted code or a diff at its 512 KiB limit (UTF-8) fits once JSON escapes it; an archive upload at most 25 MiB, as multipart/form-data with kind=upload and an archive file 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.

HTTP API error codes
CodeStatusMeaning
invalid_args400The arguments are wrong: a missing or unknown field, a bad value, or a target this server will not take.
unauthenticated401No API key, or a key that is unknown or revoked. The answer carries WWW-Authenticate: Bearer.
forbidden403The 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_target403A 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_found404No 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_allowed405The path exists, but not for this method; the Allow header names the ones it takes.
limit_reached409The 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_subscribed409The account already pays for a plan, a grandfathered one included; switch plans in the billing portal instead.
no_customer409The account has no billing history yet; open billing_checkout first.
payload_too_large413A JSON body over 1 MiB (a review submission over 1600 KiB), or an upload over 25 MiB.
unsupported_media_type415The body is not application/json, or multipart/form-data for an upload.
quota_exhausted429The 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_limited429Too many server scans started recently; retry_after_seconds says how long to wait.
internal500The server failed; the detail says what, never where.
upstream_error502GitHub or Stripe did not answer; try again.
billing_disabled503Billing 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.

MCP tool error codes
CodeMeaning
invalid_argsThe arguments are wrong: a missing or unknown field, a bad value, or a target this server will not take.
not_foundNo such review, finding, job, repository or key, or one the calling key may not read (an embargoed review answers exactly as a missing one).
pendingThe job finished but its report is not readable yet; poll again.
forbidden_targetThe 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_exhaustedThe server scan spent its request budget before it finished.
quota_exhaustedThe 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_limitedThe account started too many server scans recently; the detail says how long to wait.
limit_reachedThe 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_subscribedThe account already pays for a plan, a grandfathered one included; switch plans in billing_portal instead.
no_customerThe account has no billing history yet; open billing_checkout first.
billing_disabledBilling is not enabled on this server.
not_configuredThis 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).
internalThe server failed; the detail says what, never where.

Plans and limits

The limits this server is configured with. Prices are on the pricing page.

Plans and their limits
PlanMonitored repositoriesReviews a monthContributors includedSold
Free31001Free
Pro101,0003Monthly or annually
Team405,00010Monthly or annually
Enterpriseunlimited20,000no 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

pokeyoka-review/1 fields
FieldTypeRequiredNotes
schema"pokeyoka-review/1"yesAlways "pokeyoka-review/1".
idstringyesUnique run id.
repoobjectyes
triggercli | ci | schedule | mcpyes
runnerengine | agentnoWhich 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).
statuscomplete | partial | failedyesWhat the run did: complete when it finished its work, partial when it could not finish it, failed when it stopped.
degradedbooleanyesTrue when a phase ran with a fallback.
statsobjectnoCounts about the findings the status does not carry.
errorstringnoSet only when status is failed and the run stopped after it had recorded findings: the review’s public error.
coverageobjectyes
runtimeobjectnoHow 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.
runHealthobjectnoHow 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.
examinedarraynoOne 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.
fixAuditobjectnoThe 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.
huntobjectnoThe hunt’s per-lens coverage.
threatModelobjectyes
findingsarrayyes
resolvedarraynoEvery 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.
controlsCheckedarrayyes
inconclusivearrayyes
usageobjectyes
timingsobjectyes

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 value pokeyoka-verify=<token>, or as the body of https://<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.

pokeyoka-server/1 fields
FieldTypeRequiredNotes
schema"pokeyoka-server/1"yesAlways "pokeyoka-server/1".
targetobjectyes
contractsarrayyes
findingsarrayyesThe shared finding shape, with `line` anchored at 0 because a live target has no source line.
controlsCheckedarrayyes
usageobjectyes
timingsobjectyes

Updated