# Planner API

Planner (Severn Planner) has two ways for apps and AI agents to work with it:

- **Public REST API** at `https://www.severnplanner.com/api/v1`: public information only, with no account or API key. It has the changelog of Planner updates and the final grade calculator's math.
- **MCP server** at `https://mcp.severnplanner.com/mcp`: a student's own AI assistant can read that student's Streak & Stats, read-only, after the student turns it on and signs in. See [Planner MCP server](https://www.severnplanner.com/mcp-server).

Neither one can read or change a student's assignments, notes, files or plan, and neither one can change anything in a school system.

## OpenAPI spec

The whole API surface, including the MCP server's OAuth and MCP endpoints, is described in one OpenAPI 3.1 document:

- [https://www.severnplanner.com/openapi.json](https://www.severnplanner.com/openapi.json)
- The same document at `https://www.severnplanner.com/api/openapi.json`
- Listed in the API catalog (RFC 9727) at [https://www.severnplanner.com/.well-known/api-catalog](https://www.severnplanner.com/.well-known/api-catalog)

## Public REST API

- **Base URL:** `https://www.severnplanner.com/api/v1`
- **Authentication:** none. There are no API keys.
- **Methods:** `GET` and `HEAD`. The API is read-only. Every response allows cross-origin requests (`Access-Control-Allow-Origin: *`).
- **Format:** JSON (`application/json`). Successful responses can be cached for 5 minutes.

### GET /api/v1

The API's index: its endpoints, this page, the OpenAPI spec and the MCP server URL.

```
curl https://www.severnplanner.com/api/v1
```

### GET /api/v1/changelog

Every update to Planner, newest first, as on the [changelog](https://www.severnplanner.com/changelog) and in the app's What's New list.

| Parameter | Required | What it is |
| --- | --- | --- |
| `limit` | no | How many updates to return, 1 to 200. Default 20. |
| `since` | no | Only updates on or after this date, as YYYY-MM-DD. |

```
curl "https://www.severnplanner.com/api/v1/changelog?limit=5"
```

Each entry has an `id` (like `2026-11-12a`), a `date`, a `url` on the changelog page, and `items`, each with a `title` and a `body`. The response also has `count` (entries returned) and `total` (entries that match before `limit`).

### GET /api/v1/final-grade

The math of the [final grade calculator](https://www.severnplanner.com/tools/final-grade-calculator): what a student needs on a final exam to reach a grade, and the grade a final score would give. Nothing is stored.

| Parameter | Required | What it is |
| --- | --- | --- |
| `current` | yes | The class grade now, in percent (0 to 150). |
| `final_weight` | yes | How much of the class grade the final is worth, in percent (more than 0, at most 100). |
| `goal` | no | The class grade wanted, in percent. Adds `goal` to the response. |
| `final_score` | no | A score on the final to try, in percent. Adds `final_score` to the response. |

```
curl "https://www.severnplanner.com/api/v1/final-grade?current=86&final_weight=25&goal=88"
```

With an 86% in the class, a final worth 25% and an 88% goal, `goal.needed_on_final` is `94`: (88 - 86 x 0.75) / 0.25 = 94. `goal.status` is `needed`, `locked_in` (reached even with 0% on the final) or `out_of_reach` (not reached even with 100%). The response also has the grade now and with 100% and 0% on the final, and `letters`: for each letter from A to C-, the lowest percent that counts as it and what the final needs for it.

Letters use the General 4.0 scale most US high schools use (A is 93 and up, A- is 90 and up, B+ is 87 and up, and so on, rounded to the nearest whole number). A student's school may use a different scale.

## Errors

Every error from `/api` is JSON, never an HTML page. It uses RFC 9457 problem details, with the content type `application/problem+json`:

```
{
  "type": "https://www.severnplanner.com/developers#errors",
  "title": "Invalid parameter",
  "status": 400,
  "detail": "final_weight must be more than 0 and at most 100.",
  "instance": "/api/v1/final-grade",
  "code": "invalid_parameter",
  "hint": "Give final_weight as a plain number, like 25.",
  "parameter": "final_weight",
  "documentation": "https://www.severnplanner.com/developers#errors"
}
```

| Status | `code` | When |
| --- | --- | --- |
| 400 | `missing_parameter` | A required parameter is missing. `parameter` names it. |
| 400 | `invalid_parameter` | A parameter is not a valid value. `parameter` names it. |
| 404 | `not_found` | There is no endpoint at that path. |
| 405 | `method_not_allowed` | Anything other than GET, HEAD or OPTIONS. The `Allow` header lists the methods. |

Branch on `code`, and show `hint` to fix the request. The MCP server's errors are JSON too, in the OAuth 2.0 style (`error` and `error_description`), and `/mcp` without a token answers `401` with a `WWW-Authenticate` header.

## MCP server

The read-only MCP server lets a student's own AI assistant, such as Claude or ChatGPT, read that student's study time, streak, grade trends, test prep, plan follow-through and goals. It uses OAuth 2.1 with PKCE and dynamic client registration (scopes `stats` and `offline_access`), and the student turns it on in Planner's settings first.

- **Server URL:** `https://mcp.severnplanner.com/mcp` (Streamable HTTP)
- **Docs:** [Planner MCP server](https://www.severnplanner.com/mcp-server): how to connect, scopes, the seven tools and limits
- **Server Card:** [https://mcp.severnplanner.com/mcp/server-card](https://mcp.severnplanner.com/mcp/server-card)
- **AI Catalog:** [https://www.severnplanner.com/.well-known/ai-catalog.json](https://www.severnplanner.com/.well-known/ai-catalog.json)

## Not available

- There is no API that reads or changes a student's assignments, notes, files or plan. Each account is private, and once a student sets a passphrase, their planner data is encrypted on their device.
- There are no API keys, webhooks, sandbox or test accounts.
- There is no official SDK or command-line tool on npm, PyPI or Homebrew. Use any HTTP client for the REST API, and any MCP client for the MCP server.

## Machine-readable files

- [OpenAPI spec](https://www.severnplanner.com/openapi.json)
- [API catalog (RFC 9727)](https://www.severnplanner.com/.well-known/api-catalog)
- [AI Catalog](https://www.severnplanner.com/.well-known/ai-catalog.json)
- [llms.txt](https://www.severnplanner.com/llms.txt), a guide to this site for AI agents
- Every page on this site as Markdown: request it with `Accept: text/markdown`, or add `.md` (this page is [developers.md](https://www.severnplanner.com/developers.md))

Questions or ideas for the API: [jeremy@severnplanner.com](mailto:jeremy@severnplanner.com). Planner is an independent student project, not affiliated with Severn School.
