MCP Census Audit API
The Audit API from MCP Census — 1 operation(s) for audit.
The Audit API from MCP Census — 1 operation(s) for audit.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/mcpcensus-com:mcpcensus-com-audit-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: MCP Census Audit API
description: Public-evidence Preflight for Model Context Protocol servers. Select one exact canonical Census server name and receive PASS, REVIEW, or BLOCK under an immutable built-in policy. A PASS is not a security finding or install authorization.
version: 2.2.0
contact:
email: info@mcpcensus.com
servers:
- url: https://api.mcpcensus.com
description: MCP Census API
tags:
- name: Audit
paths:
/v1/audit:
post:
operationId: auditMcpConfig
summary: 'Audit a whole MCP client config: one PASS / REVIEW / BLOCK / UNKNOWN per entry'
description: 'Resolves every entry of a config document without guessing (url → remote_url, npx → npm package, uvx → PyPI package, canonical alias → server_name) and evaluates each resolved server under one built-in policy through the same core as /v1/preflight. Returns CENSUS-AUDIT/1 JSON and text, valid_until_epoch for shell caches and an exit code for CI. UNKNOWN is a real verdict and is never upgraded to PASS. Keyed: 1 credit per config digest per UTC day. Keyless: one config of ≤25 entries per IP per UTC day, repeats free. Not a malware scan; PASS is not a sandbox. Contract: https://mcpcensus.com/agent-setup/audit.md'
security:
- {}
- ApiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AuditInput'
text/plain:
schema:
type: string
description: Raw Codex config.toml or JSON text
responses:
'200':
description: Completed audit
headers:
x-census-exit-code:
schema:
type: integer
x-tier:
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/AuditResult'
text/plain:
schema:
type: string
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'413':
description: Body over 256 KB
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
$ref: '#/components/responses/RateLimited'
tags:
- Audit
components:
schemas:
AuditEntry:
type: object
properties:
alias:
type: string
input:
type: object
description: 'What was read: url | command, args, type (never env/headers)'
server_name:
type:
- string
- 'null'
method:
type:
- string
- 'null'
enum:
- remote_url
- remote_host
- npm_package
- pypi_package
- server_name
- null
decision:
type: string
enum:
- PASS
- REVIEW
- BLOCK
- UNKNOWN
reasons:
type: array
items:
type: object
properties:
code:
type: string
result:
type: string
candidates:
type: array
items:
type: string
description: Present when resolution was ambiguous; the Census never picks
facts_digest:
type:
- string
- 'null'
decision_input_digest:
type:
- string
- 'null'
valid_until:
type:
- string
- 'null'
format: date-time
valid_until_epoch:
type:
- integer
- 'null'
tools_digest:
type:
- string
- 'null'
tools_drift:
type:
- boolean
- 'null'
audit_id:
type:
- string
- 'null'
description: Per-entry preflight_evaluation id for keyed callers
lookup_url:
type: string
Error:
type: object
required:
- ok
- error
properties:
ok:
const: false
error:
type: string
message:
type: string
retry_after:
type: integer
reset_at:
type: string
format: date-time
AuditInput:
type: object
description: A config document (mcpServers | servers | mcp_servers), an envelope {config, format, policy_id, previous_tools_digests, strict}, a plain {entries:[...]} list, or raw Codex config.toml text sent as text/plain. Only url, command, args and type are read; strip env and headers before posting.
properties:
config:
description: Config document (object) or raw text (JSON or Codex TOML)
oneOf:
- type: object
- type: string
format:
type: string
enum:
- json
- toml
policy_id:
type: string
enum:
- builtin:baseline
- builtin:first-party
- builtin:strict
default: builtin:baseline
previous_tools_digests:
type: object
additionalProperties:
type: string
description: alias → tools_digest from your last audit; sets tools_drift per entry
strict:
type: boolean
default: false
description: exit_code 2 when any entry is REVIEW or UNKNOWN
mcpServers:
type: object
servers:
type: object
mcp_servers:
type: object
entries:
type: array
items:
type: object
properties:
name:
type: string
url:
type: string
command:
type: string
args:
type: array
items:
type: string
AuditResult:
type: object
properties:
ok:
const: true
spec:
const: CENSUS-AUDIT/1
policy:
type: object
properties:
id:
type: string
digest:
type:
- string
- 'null'
as_of:
type: string
format: date-time
valid_until:
type:
- string
- 'null'
format: date-time
description: Minimum over resolved entries
valid_until_epoch:
type:
- integer
- 'null'
config_digest:
type: string
config_format:
type: string
decision_scope:
const: public_evidence_policy
summary:
type: object
properties:
entries:
type: integer
pass:
type: integer
review:
type: integer
block:
type: integer
unknown:
type: integer
exit_code:
type: integer
enum:
- 0
- 1
- 2
description: 1 on any BLOCK; 2 with strict on REVIEW/UNKNOWN; else 0. Mirrored in the x-census-exit-code header
entries:
type: array
items:
$ref: '#/components/schemas/AuditEntry'
text:
type: string
description: 'The CENSUS-AUDIT/1 text block (also returned alone for Accept: text/plain)'
limitations:
type: array
items:
type: string
meter:
type: object
description: mode credits (cost, repeat, remaining) or keyless (configs_today, limit)
audit_run_id:
type:
- string
- 'null'
responses:
RateLimited:
description: Burst, daily, refresh, or per-server cooldown limit reached
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: Missing, invalid, or revoked account API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
BadRequest:
description: Closed input validation failed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
PaymentRequired:
description: Credit wallet is empty (keyed callers). Body carries credits and upgrade.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
ApiKey:
type: apiKey
in: header
name: x-api-key
description: Account API key. Required for current-liveness refresh, evaluation history, and watches.