Skolemelding MCP
# Skolemelding MCP
English · [Norsk](README.no.md)
Read Skoleplattform Oslo messages and attachments through a local MCP server. Its three tools list messages, read a message, and download an attachment. They do not send replies or mark messages as read.
This is a simple local version that runs on your own computer. `list_messages` shows at most 100 messages; there is no keyword or date-range search yet. If you know a message ID, `get_message` can also find older messages by scanning up to 1,500 inbox entries. There is no fixed date cutoff in this code, but how far back it can reach depends on the Skolemelding service and how many newer messages you have.
At some Oslo schools, email notifications no longer include message contents or attachments. This MCP makes it easier to retrieve them from Skolemelding and use them in an agent workflow. You are responsible for deciding whether to share school information with ChatGPT or other cloud-based or commercial AI services.
**Tested only on macOS with Google Chrome. Other platforms and browsers have not been tested.**
## Install
Install Node.js 20 or later and Google Chrome. In Terminal, open this project folder and run:
```sh
npm install
npm run login
```
Complete the ID-porten sign-in in Chrome. Run `npm test` to check the server without using your account.
## Add to the ChatGPT desktop app (example)
Open **Settings → MCP servers → Add server** and choose **STDIO**. Enter:
| Field | Value |
| --- | --- |
| Command to launch | Absolute path to Node.js; find it with `command -v node` |
| Arguments | One argument: absolute path to this project's `src/server.js` |
| Working directory | Absolute path to this project folder |
| Environment variables | Leave empty |
Save, restart ChatGPT, then type `/mcp` in a chat to check the connection. Replace the example paths in the screenshot with your own. The pictured `~/code` is only a placeholder for the working directory.

This screenshot shows just one setup example. The server can also work with [Claude Desktop](https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop), [Grok Build](https://docs.x.ai/build/features/mcp-servers), or a client using a local AI model if that client supports local stdio MCP servers. Follow each client's setup instructions; a model alone cannot connect to MCP. ChatGPT in a web browser does not use this local setup.
## Security and privacy
This MCP runs locally and does not open a network port. An AI client you connect can still retrieve school messages and attachments from your account. Content used with a cloud AI service may be sent to that service. Messages may also contain text intended to influence the agent. Use clients you trust, review tool calls, and never share the sign-in files in `.data/`.
The integration uses undocumented Skolemelding endpoints that may change. If your session expires, run `npm run login` again.
## License
The code and documentation use the [0BSD license](LICENSE): free for anyone to use, change, and share for any purpose, including commercial use, without attribution. The license does not cover the Skolemelding service or its data.
To publish, use Git and check `git status --short` before committing. `.gitignore` excludes local sign-ins, research files, installed packages, and ZIP archives. Do not upload the whole folder manually.
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: list_messages returns previews, get_message returns full text and attachment metadata, and get_attachment returns raw bytes. The boundaries between reading a message and fetching its attachment are clear and unlikely to be confused.
All three tools follow a consistent verb_noun snake_case pattern: list_messages, get_message, get_attachment. The naming is predictable and easy to parse.
Three tools is a reasonable minimum for a read-only message client, and each earns its place. However, it is on the low end, and a slightly larger surface for common read workflows could be expected.
The surface covers listing, reading, and downloading attachments, but it lacks any operation to mark messages as read, send/reply, or delete. For a messaging domain, these are notable missing operations that create dead ends for common workflows.