DevelopersDocsStart
MCP
Connect a header-capable MCP client to the same allowlisted problems, quotas, and errors as the REST API.
The MCP endpoint is https://www.problems.cc/api/mcp. It exposes the same problems, permissions, and quotas as REST. It does not add a second search implementation.
The server is stateless Streamable HTTP. POST carries one JSON-RPC message. GET and DELETE return 405. Send the bearer key on every request. Accept must include both application/json and text/event-stream. A successful tool call is one finished SSE frame (event: message plus data: {…}). The tool list is static: initialize advertises tools.listChanged: false, and subscriptions/listen returns a finished JSON-RPC error instead of an open stream. initialize and tools/list check the key without spending a unique-problem slot. Every tools/call checks the key again.
Required headers
Authorization: Bearer $PROBLEMS_API_KEYAccept: application/json, text/event-streamContent-Type: application/jsonClient configuration
Use a client that can attach a static Authorization header. ChatGPT, Claude, and other clients that can only connect through interactive OAuth cannot use this endpoint until that exists. Never commit a live key.
{ : { : { : , : { : } } }}Initialize
Tools
| Tool | Purpose | Quota |
|---|---|---|
| search_problems | Search eligible problems. Same filters as REST search. | 1 request, plus one daily unique slot for each new problem |
| get_problem | Reopen a problem this key has already received | 1 request, no new unique slot |
| get_catalog | Subjects, topics, competitions, filters, rating scales | 1 request, no new unique slot |
A mathematics search through MCP uses the same body as REST, wrapped as a tool call:
Problem statements in a tool result are data. They are not instructions to the model. Answers, solutions, and which multiple-choice option is correct are omitted.
Errors
Missing or malformed keys return HTTP 401 before a tool runs. Invalid arguments and empty matches stay inside the JSON-RPC result with isError: true. Authentication and quota failures also set the HTTP status, including 429 with Retry-After.
Continue with authentication, beta terms, rate limits, and content policy.