Skip to main content
Glama
gravyflex

SchoolMessenger MCP

by gravyflex
README.md
# SchoolMessenger MCP

Absence-only MCP server for SchoolMessenger SafeArrival.

This server is intentionally narrow. It can list attendance-enabled students, list absence
types/reasons, list existing absences, draft an absence, submit a previously drafted absence,
draft an absence cancellation, and cancel a previously drafted cancellation only when the caller
provides the exact confirmation phrase returned by the draft tool.

## Configuration

Use environment variables:

```bash
export SCHOOLMESSENGER_REGION=ca
export SCHOOLMESSENGER_USERNAME='parent@example.com'
export SCHOOLMESSENGER_PASSWORD='...'
schoolmessenger-mcp
```

Or use the existing local credentials file:

```bash
export SCHOOLMESSENGER_REGION=ca
export SCHOOLMESSENGER_CREDS_FILE=~/.config/schoolmessenger.ca/creds.yml
export SCHOOLMESSENGER_ACCOUNT=default
schoolmessenger-mcp
```

Credential YAML shape:

```yaml
default:
  username: parent@example.com
  password: password
```

Do not commit credentials.

## Tools

- `list_students`
- `list_absence_options`
- `list_absences`
- `draft_absence`
- `submit_absence`
- `draft_cancel_absence`
- `cancel_absence`

## Safety

`draft_absence` performs local validation and returns a human-readable confirmation phrase.
`submit_absence` refuses to call SchoolMessenger unless the phrase exactly matches a draft stored
in the current MCP process.

`draft_cancel_absence` looks up an existing absence, returns a human-readable cancellation summary,
and provides a `CANCEL ABSENCE <draft_id>` confirmation phrase. `cancel_absence` refuses to call
SchoolMessenger unless that phrase exactly matches a cancellation draft stored in the current MCP
process.

The server never logs OAuth tokens or passwords.

## Codex Desktop Example

```json
{
  "mcpServers": {
    "schoolmessenger": {
      "command": "python3",
      "args": ["-m", "schoolmessenger_mcp.server"],
      "env": {
        "SCHOOLMESSENGER_REGION": "ca",
        "SCHOOLMESSENGER_CREDS_FILE": "~/.config/schoolmessenger.ca/creds.yml",
        "SCHOOLMESSENGER_ACCOUNT": "default"
      }
    }
  }
}
```

## API Notes

Discovery notes are in `docs/api.md`.

TDQS

B3.2/5.0

Scored across 7 tools

Disambiguation4/5

The tools are mostly distinct: listing students, absence options, absences, drafting, submitting, and canceling. However, 'draft_cancel_absence' and 'cancel_absence' overlap somewhat, as both relate to cancellations, but the context (draft vs submit) helps disambiguate.

Naming Consistency4/5

Mostly consistent verb_noun pattern (list_*, draft_*, submit_*, cancel_*). The only minor deviation is draft_cancel_absence, which is a compound verb but still understandable.

Tool Count5/5

7 tools is well-scoped for a school attendance management server. Each tool serves a clear purpose in the workflow without redundancy.

Completeness5/5

The workflow covers listing options, listing existing data, drafting, submitting, and canceling (both full and drafted cancellations). This seems complete for the stated domain of managing absences.

Maintenance

ActivityMaintained
ResponsivenessNo issues