ManageBac MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ManageBac MCP Server
A read-only MCP server, written in Python with FastMCP, that lets an AI assistant query school data from the ManageBac API v2.
The problem
Teachers and administrators at a school that uses ManageBac often want to ask an AI assistant questions about their classes, grades, attendance and students. ManageBac exposes this data through a paginated REST API, which an AI agent can't use directly: it needs well-described tools, results trimmed to what matters, and every page of a long list collected for it. This server sits between the two. It exposes ManageBac as read-only MCP tools, protects access with a bearer token, and returns compact, predictable results with short error messages.
Related MCP server: Synapse MCP
How it works
FastMCP server (
managebac_server.py) with 48 read-only tools (every tool makesGETrequests only), for exampleget_classes,get_class_roster,get_term_grades,get_class_term_attendance,search_students,get_daily_excusals,get_program_performance_reportandget_student_trend.Bearer-token authentication. Every MCP request must send
Authorization: Bearer <MCP_AUTH_TOKEN>. The token is checked withhmac.compare_digest(constant-time comparison), and the server refuses to start ifMCP_AUTH_TOKENis not set (fail closed). Only/healthis unauthenticated, and it returns{"status": "ok"}and no school data.Async HTTP client. A single shared
httpx.AsyncClientwith a 20 second timeout.Pagination.
_get_all_pagesfollows ManageBac'smeta.total_pages, up to a hard cap of 20 pages, and reportstruncatedif the cap is hit.get_classesandsearch_studentscollect every page unless you passpageexplicitly.Concurrency limit. Reports that combine several classes (
get_program_performance_report,get_student_trend) run their upstream calls concurrently, with at most 5 in flight (_gather_limited).Safe errors. Upstream error bodies are logged on the server only. The model gets a short message such as
ManageBac API returned HTTP 500..Trimmed results. Tools return only the fields an assistant needs, in a consistent
{"ok": true, "summary": ..., ...}/{"ok": false, "error": ...}shape.Optional MCP Apps spike (
mcp_apps.py). SettingENABLE_MCP_APPS=1registers one extra tool,grade_distribution_app, which renders a grade histogram in hosts that support MCP Apps. Its payload contains aggregate counts and statistics only, with no student names or IDs. Off by default.
Project context
This repository is a standalone sample extracted from a larger private project (a school data assistant / chatbot that consumes this MCP server). It was published separately as a clean code sample, so it has a short commit history.
Setup
Tested on Python 3.13.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # then fill in real values; never commit .envEnvironment variables
Variable | Required | Purpose |
| yes | Bearer token clients must send. The server will not start without it. Use 32+ random characters. |
| yes, for real data | ManageBac API token. Create it read-only with minimal scopes. |
| no |
|
| no | Default |
Run
fastmcp run managebac_server.py --transport sse --host 0.0.0.0 --port 8000The SSE endpoint is /sse and the health check is /health. Clients must send
Authorization: Bearer $MCP_AUTH_TOKEN.
Deploy (Render)
Create a Render web service from this repository and set:
Build command:
pip install -r requirements.txtStart command:
fastmcp run managebac_server.py --transport sse --host 0.0.0.0 --port $PORTEnvironment:
MCP_AUTH_TOKENandMANAGEBAC_API_TOKEN(and optionallyLOG_LEVEL)Health check path:
/health
Verify a deployment (replace <your-deployment-host>):
curl -s -o /dev/null -w "%{http_code}\n" https://<your-deployment-host>/sse # 401 without a token
curl -s -o /dev/null -w "%{http_code}\n" -H "Authorization: Bearer $MCP_AUTH_TOKEN" -m 3 https://<your-deployment-host>/sse # 200 (stream opens; -m 3 stops it)
curl -s https://<your-deployment-host>/health # {"status":"ok"}Testing
The tests use mocked HTTP (httpx.MockTransport), so they need no network and no real
ManageBac account.
pip install -r requirements-dev.txt
pytestWhat is covered:
tests/test_auth.py: the verifier accepts only the exact token, the server refuses to start withoutMCP_AUTH_TOKEN,/healthis open, and the MCP endpoint returns 401 for a missing or wrong token.tests/test_pagination.py: pages are followed and collected, the 20-page cap reportstruncated, an error on a later page is surfaced,get_classesauto-paginates, and the concurrency limit holds.tests/test_upstream_errors.py: upstream error bodies are logged but not returned, connection failures and non-JSON responses give short messages, the ManageBac token is sent upstream, and the server contains no write (POST/PUT/PATCH/DELETE) calls.
Security notes
The server is read-only: it only issues
GETrequests to ManageBac.Use a read-only ManageBac API token with the minimum scopes you need.
Never commit
.env; it is listed in.gitignore. Use.env.examplefor placeholders.The tools return real student data, so deploy behind HTTPS and keep
MCP_AUTH_TOKENsecret.Dependencies are pinned. fastmcp 4.x / mcp 2.x change APIs, so upgrade deliberately.
Project layout
managebac_server.py FastMCP server: auth, HTTP client, pagination, tools
mcp_apps.py optional aggregate-only grade-distribution MCP App
tests/ pytest suite (mocked HTTP)
.env.example placeholder configurationLicense
MIT. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to Edusign attendance, courses, learners, documents, and API docs via OAuth.
Query your team's drift, vulnerability, and upgrade data from any AI assistant. OAuth 2.1, 51 tools.
Verified, pay-per-use API tools for AI agents through one authenticated connection.
Read-only access to Epivo's live course catalogue for AI agents.
Related MCP Servers
- FlicenseBqualityDmaintenanceProvides read-only access to Canvas LMS data including courses, assignments, grades, and deadlines through 23 structured tools.23-
- AlicenseNot gradedqualityCmaintenanceEnables AI tools to access and reason over structured school-management data such as attendance, grades, and occurrences, helping pedagogical coordinators investigate causes and choose timely support actions.MIT
- AlicenseAqualityCmaintenanceEnables AI coding assistants to authenticate with a token, view class schedules and assignments, read course materials, and submit files or links to the academic portal.9MIT
- AlicenseNot gradedqualityBmaintenanceConnects a student's own Moodle account to Claude Code, Codex, ChatGPT and other AI clients, exposing courses, deadlines, assignments, quizzes, grades, attendance, materials, forums and groups through 55 tools. Supports reading materials and submitting assignments, with per-user tokens and write actions kept as separate, confirmable tools.7MIT