SAS MCP
# SAS MCP — unofficial, local and read-only
A community MCP server that helps a parent find educational materials already
available to their own authorized SAS account. It runs locally over stdio and
exposes seven bounded tools. It does not submit answers, start exercises, change
progress, decrypt books or impersonate another account.
**Unofficial:** this project is not affiliated with, endorsed by or supported by
SAS Educação or Arco Educação. Names identify the compatible service; no provider
logos, textbooks or proprietary application code are distributed. Observed
endpoints can change without notice. This is an experimental integration, not a
supported official API or a guarantee of availability.
**Source distribution:** [davidmosiah/sas-mcp](https://github.com/davidmosiah/sas-mcp).
This experimental project is distributed as source. The package retains
`private: true` to prevent accidental npm publication; this project has not
published an npm package. Run from a reviewed source checkout, and do not run an
unverified registry package with a similar name.
## Start with synthetic data
Requires Node.js 24+ and POSIX file permissions. This candidate is validated on
macOS. Linux runtime and test harness are not validated; Windows is unsupported.
The server has no HTTP listener or telemetry.
```sh
npm ci --ignore-scripts
npm run build
SAS_MODE=offline node dist/index.js
```
The last command waits for an MCP client's JSON-RPC messages. It is not an
interactive chat. Offline is the default and returns clearly synthetic examples;
it proves protocol wiring, not provider connectivity.
Use an absolute path to Node and to `dist/index.js` in your MCP client, replacing
all placeholders in [examples/offline.json](examples/offline.json). Live setup
requires additional explicit steps in [the setup guide](docs/SETUP.md). Never put
a token in client configuration, command arguments, chat, issues or source files.
## Tools
| Tool | Result and limits |
| --- | --- |
| `sas_status` | Configuration and mode; makes no provider request |
| `sas_search_materials` | Published own-account catalog; year, query and bounded pages |
| `sas_get_material` | Metadata for a material discovered during this process |
| `sas_list_sections` | Accessible hierarchy with book/chapter provenance |
| `sas_list_resources` | Visible resource metadata and official reader links |
| `sas_download_resource` | An accessible original unencrypted PDF, saved privately with SHA-256 |
| `sas_get_personalized_availability` | Selected-origin availability summaries; does not open a solver |
Use IDs returned by earlier tools, never URLs. Downloads create new random files;
read-only describes remote intent, not the local filesystem write. Protected
books stay in the official reader. The client receives selected results and local
paths. A cloud-based MCP client may send school content to its model provider:
local execution does **not** mean all returned data stays on the computer.
Availability distinguishes empty, blocked and errors. `available` means a returned
card is unlocked; it may already be finished. `pendingUnlockedCount` counts only
unlocked not-started/ongoing records and does not prove solver access. Only one
returned origin is queried; an empty result says nothing about other origins or
future assignments. At most 50 cards are returned per call, from at most 500
assigned records and 100 origins.
## A careful study workflow
1. Read the school's study guide and identify year, grade, subject, collection,
chapter and pages. Mark missing information as unknown.
2. Search SAS and compare catalog metadata and section provenance to that guide.
3. Download only a resource explicitly marked downloadable. Use official links
for protected books. Keep originals private and respect usage permissions.
4. Review generated explanations with a responsible adult. Generated answers are
not official answer keys and must not be presented as future assessment content.
The [guide for parents in Portuguese](docs/GUIA-PAIS.pt-BR.md) includes examples,
privacy choices and common problems.
## Safety and compatibility
Credential files and downloads must be outside every Git checkout, owned by the
current OS user and protected by private directories (0700); credentials use 0600.
Tokens are sent only to fixed reviewed SAS/Arco API hosts to authenticate reads.
CDN downloads omit account headers. Endpoints, headers and arbitrary request
objects cannot be selected by tool callers. HTTPS, public IPv4 pinning, no
redirects, deadlines and size bounds restrict outbound requests.
These controls do not guarantee zero risk, safe PDFs, absence of backend view
records, or continued compatibility. The observed API contract dates from October
2026 and is not a provider commitment. Expired credentials require manual renewal
in the official portal. Unknown visibility/schema variants fail closed.
Read [SECURITY.md](SECURITY.md), [the threat model](docs/THREAT-MODEL.md), and
[the observed API contract](docs/API-CONTRACT.md). Verify the current account's
terms and school rules before live use. The MIT license covers this project's
code, **not** SAS content, account rights, trademarks or permission to share a
child's information with an AI service.
## Development and release checks
```sh
npm run verify
npm pack --dry-run --ignore-scripts
```
`verify` builds, runs synthetic tests and plants both sets of deliberately wrong
variants in disposable directories. No test calls a live provider or loads real
credentials. npm packaging uses an explicit allowlist: runtime JavaScript,
public documentation and generic client examples only. Browser session-export
recipes, tests, source inspection tools and private evidence are excluded from
the package. Publishing is a separate manual decision after candidate review.
Read [the release checklist](docs/RELEASING.md) and
[responsible use](docs/RESPONSIBLE-USE.md) before distributing a candidate.
See [CONTRIBUTING.md](CONTRIBUTING.md), [CHANGELOG.md](CHANGELOG.md), and
[LICENSE](LICENSE). Bug reports must use synthetic reproductions only.
TDQS
Scored across 7 tools
Each tool targets a distinct action or resource: service status, personalized availability, material search, material metadata, section listing, resource listing, and resource download. The hierarchical discovery tools are clearly separated by their inputs and scope, so an agent can select among them without overlap.
All tools use the same sas_ prefix and snake_case convention, which is predictable and readable. Most names follow a verb_noun pattern, with sas_status as a minor exception because it is noun-like rather than action-oriented.
Seven tools are well-scoped for a read-only material discovery and access server. Each tool has a clear role in the workflow, and there are no redundant or filler tools.
The surface covers the core read-only lifecycle: status, search, material metadata, section/resource discovery, download, and personalized availability. Minor gaps remain around directly reading non-PDF resource content or explicitly enumerating accounts/years, but the main workflows are covered.