GraphQL
The GraphQL API is served at /gql and requires authentication: every
request must carry a bearer token. It exposes the published CVE data plus
the CVE lifecycle, case, and user-management operations your role allows. The
published data alone is also available without authentication as plain JSON
under /cves/index.json and
/osv/all.json.
curl -X POST https://cna.erlef.org/gql \
-H "content-type: application/json" \
-H "authorization: Bearer <token>" \
-d '{"query": "{ listPublishedCves { results { cveId title } } }"}'MCP
The Model Context Protocol server at
/mcp exposes the same data and lifecycle operations as tools for AI agents
such as Claude Code. A typical client configuration:
{
"mcpServers": {
"eef-cna": {
"type": "http",
"url": "https://cna.erlef.org/mcp"
}
}
}Authenticating with OAuth 2.1
Both surfaces accept OAuth 2.1 access tokens. Clients register themselves,
either by dynamic client registration (RFC 7591)
or by using the HTTPS URL of a
Client ID Metadata Document (CIMD) as their
client_id, and discover the authorization server through the standard
metadata documents at /.well-known/oauth-authorization-server
and /.well-known/oauth-protected-resource/mcp or
/.well-known/oauth-protected-resource/gql. MCP clients do all of this
automatically starting from the discovery challenge of an unauthenticated
request — point them at the MCP URL, approve the consent screen in your
browser, and you are done.
Each surface is a separate protected resource, with its own scope: mcp for
the MCP endpoint, gql for GraphQL. A token is valid for one surface only.
Request it with that surface's scope, or with the resource parameter set to
the surface URL (RFC 8707). A token for the other surface is rejected with
401. A token without the surface's scope is rejected with
403 insufficient_scope.
Personal API Tokens
For clients without OAuth support, create a personal access token under
API Tokens (login required) and send it as an
Authorization: Bearer header. These tokens act as you on both surfaces
without scope restrictions, so prefer OAuth where possible and give manual
tokens an expiry.
Fair Use
Every registered user gets full API access. This is deliberately permissive: it lets you automate your interactions with the CNA with the tooling of your choice, including submitting vulnerability reports. Please behave yourself — should this openness be abused, we will restrict API access.