classroom-mcp
Uses the signed-in Google account to access Google Classroom and Google Docs/Drive-hosted attachments on the user's behalf.
Provides tools to inspect courses, posts, to-do/classwork, grades, and assignment details; read attachments; and prepare/confirm turning in or unsubmitting work through Classroom in the browser.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@classroom-mcp What do I have due this week?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
classroom-mcp
Google Classroom for Claude Code, Codex, Gemini CLI, Cursor and any other MCP client. Ask your AI assistant what's due, what your teachers posted, what an assignment actually asks for, and let it turn in your work after you say yes.
No Google Cloud project, no API keys, no OAuth app. You sign in to Classroom once in a normal browser window, the same way you always do.
Nothing leaves your computer. There is no server, no telemetry and no analytics. The only sites it talks to are Google's own (classroom.google.com, docs/drive.google.com), as you. See PRIVACY.md.
Free and open source (MIT). A personal plug-in, not a service.
Not affiliated with or endorsed by Google. Use it in line with your school's rules. You are responsible for anything you turn in.
What you can ask
"What do I have due this week?" "Anything new in my Data Science class since Monday?" "Summarise the instructions and the attached PDF for the Endterm Project." "What are my grades in Computer Graphics?" "Turn in
~/labs/lab9.zipfor Lab 9." (it shows you a summary first and waits for your yes)
Related MCP server: Classroom MCP
Tools
Tool | What it does |
| Which Google account it's signed in as |
| Your classes: name, section, teacher, |
| To-do across all classes: |
| A class's Stream: announcements (full text and attachments) and new assignment/material notices |
| Everything posted in all your classes in the last N days |
| A class's Classwork page, grouped by topic, with due dates |
| Your status and grade for every item in a class |
| One assignment/material/question: instructions, points, due date, attachments, your submission |
| Read an attached Google Doc/Slides/Sheet, PDF, Word, PowerPoint or code file |
| Raw text of any Classroom page (fallback) |
| Step 1 of turn-in / unsubmit: attaches files as a draft, submits nothing, returns a token |
| Step 2: actually presses Turn in / Unsubmit, only with that token |
Install
You need Python 3.10+, uv, and Google Chrome (Edge, Brave or Chromium also work).
git clone https://github.com/saksham2104/classroom-mcp.git
cd classroom-mcp
uv tool install . # puts the `classroom-mcp` command on your PATH
classroom-mcp login # a browser window opens: sign in, wait for your classes, close the window
classroom-mcp doctor # checks it works and lists your classeslogin opens a separate browser window with its own profile, used only by this tool. Your everyday
Chrome profile is not touched. To update later: git pull && uv tool install --reinstall .
Connect it to your AI tool
The command to run is just classroom-mcp.
Claude Code
claude mcp add --scope user classroom -- classroom-mcpCodex CLI
codex mcp add classroom -- classroom-mcpor add to ~/.codex/config.toml:
[mcp_servers.classroom]
command = "classroom-mcp"Gemini CLI
gemini mcp add classroom classroom-mcpor add to ~/.gemini/settings.json:
{ "mcpServers": { "classroom": { "command": "classroom-mcp" } } }Claude Desktop, Cursor, Windsurf, VS Code and others use the same JSON shape (see examples/).
GUI apps often don't see your shell's PATH, so use the full path from which classroom-mcp
(macOS/Linux) or where classroom-mcp (Windows):
{ "mcpServers": { "classroom": { "command": "/Users/you/.local/bin/classroom-mcp" } } }Without installing (runs straight from the clone):
{ "mcpServers": { "classroom": { "command": "uv", "args": ["run", "--directory", "/path/to/classroom-mcp", "classroom-mcp"] } } }Turning in work
Google's Classroom API doesn't let a student turn in work a teacher created, so classroom-mcp does it the way you would, in the browser, in two steps:
prepare_submissionopens the assignment, checks it can still be turned in, uploads your files through Classroom's own Add or create → File button, and attaches them as a draft. Nothing is submitted. It returns what will happen, a screenshot of Your work, and a token that expires in 15 minutes.confirm_submissionwith that token presses Turn in (or Mark as done when there are no files). The assistant is told to call it only after you've said yes.
Unsubmitting works the same way (action: "unsubmit"). If you don't want any of this, set
CLASSROOM_MCP_READ_ONLY=1 and the two tools disappear.
If you say no after step 1, the uploaded files stay attached as a draft (not turned in). Remove them on the assignment page if you like.
Settings
All optional, set as environment variables (most MCP clients accept an env block in their config).
Variable | Default | |
| off |
|
|
| Which signed-in Google account to use (the |
| off |
|
| auto | Path to a specific Chrome / Edge / Brave executable |
|
| Where the profile and cache live |
|
| Close the background browser after this much idle time |
|
| Largest attachment |
PDF text extraction is optional: uv tool install ".[pdf]". Without it, PDFs are saved locally and
your AI tool opens them with its own file reader.
Troubleshooting
"Not signed in": run
classroom-mcp loginagain. Google sessions expire now and then."Couldn't sign you in: this browser or app may not be secure": install Google Chrome (the fallback Chromium is the usual cause) and run
classroom-mcp loginagain."The profile is open in another window": close the login window, or wait two minutes for the background browser to close itself.
Wrong account or no classes: if you're signed in to several Google accounts in the login window, set
CLASSROOM_MCP_ACCOUNTto the right index.Something comes back empty or garbled: Classroom has no public page API, so this tool reads the page itself, and Google sometimes changes the page.
read_pagestill works. Please open an issue with the tool name and what you expected. Set Classroom's language to English; other languages aren't parsed.
How it works
classroom-mcp login starts your own Chrome with a private profile folder
(~/.config/classroom-mcp/chrome-profile) and lets you sign in normally. The MCP server later opens
that same profile headless with Playwright, reads the Classroom
pages it needs, and closes the browser after two idle minutes. Attachments are fetched with the same
session and cached in ~/.config/classroom-mcp/cache/. classroom-mcp logout deletes both.
The scraping leans on the most stable parts of Classroom's pages (link shapes, data-stream-item-*
attributes, ARIA roles), not generated CSS class names. Parsers live in
src/classroom_mcp/scrape.py and are tested in
tests/test_parse.py.
Development
uv venv && uv pip install -e ".[pdf]" pytest
.venv/bin/pytest
CLASSROOM_MCP_SHOW_BROWSER=1 .venv/bin/classroom-mcp doctorContributions welcome, especially parser fixes when Classroom changes. Never commit anything from your profile or cache folders, and use made-up names in test fixtures.
License
Available Tools
12 toolsconfirm_submissionADestructive
Step 2 of 2: actually press Turn in (or Unsubmit). Only call this after the user has explicitly agreed to the summary from prepare_submission, using its token. Tokens expire after 15 minutes.
Inputs: token (required).
get_assignmentARead-only
Full details of one assignment, question or material: instructions, points, due date, the teacher's attachments, and your own work (state, attached files, what you can do next). link: the item's https://classroom.google.com/... link from another tool.
Inputs: link (required).
list_classworkBRead-only
Everything on a class's Classwork page (assignments, questions, materials) grouped by topic, with due dates and links.
Inputs: course_id (required).
list_coursesBRead-only
List your Google Classroom classes (name, section, teacher, course_id, link).
Inputs: include_archived.
list_postsARead-only
Latest posts on a class's Stream: announcements (full text and attachments) and notices of new assignments and materials, newest first. course_id comes from list_courses (a class link works too).
Inputs: course_id (required), limit.
list_todoARead-only
Your Classroom to-do list across all classes.
status: "assigned" (not turned in yet), "missing" (past due, not turned in) or "done". Each item has its course, due/posted date and a link for get_assignment.
Inputs: status.
my_gradesARead-only
Your status and grade for every item in one class (Classroom's 'View your work' page).
Inputs: course_id (required).
prepare_submissionADestructive
Step 1 of 2 for turning in or unsubmitting work. Submits nothing.
action: "turn_in" or "unsubmit". assignment_link: the assignment's classroom.google.com link. file_paths: for turn_in, absolute paths of local files to attach (optional; with none it is "Mark as done"). They are uploaded and attached as a draft. Returns a summary, a screenshot path and a token. Show the summary to the user and ask them to confirm before calling confirm_submission.
Inputs: action (required), assignment_link (required), file_paths.
read_attachmentARead-only
Read a file attached in Classroom: pass its Google Drive / Docs / Slides / Sheets link (or file id). Docs and Slides come back as text, Sheets as CSV. Uploaded files (PDF, Word, PowerPoint, code, zip, ...) are saved under classroom-mcp's private cache folder and their local path is returned; .docx, .pptx and text files also come back as text (PDFs too if pypdf is installed).
Inputs: link (required).
read_pageARead-only
Raw text and links of any classroom.google.com page. A fallback for anything the other tools miss.
Inputs: link (required).
recent_activityARead-only
What was posted in all your classes in the last days days (announcements, new assignments,
new materials), grouped by class. Slower: it opens each class's Stream.
Inputs: days, per_class.
statusARead-only
Check that classroom-mcp is signed in, and which Google account and browser it uses.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools target a clearly distinct resource (courses, todo, classwork, grades, attachments, assignment details, auth status), and the two-step prepare_submission/confirm_submission is explicitly delineated. The main overlap is list_posts vs recent_activity (per-class stream vs cross-class recent stream) and to some degree list_todo vs my_grades, though the descriptions clarify these.
Nearly all names follow a snake_case verb_noun pattern (list_courses, list_todo, read_attachment, get_assignment, prepare_submission). A few break the pattern with noun-only names (my_grades, status, recent_activity), but conventions remain consistent and readable.
Twelve tools is well within the sweet spot and each tool maps to a distinct user-facing task in a student's Classroom workflow. Nothing feels redundant or padded.
The surface covers discovery (courses, posts, classwork, todo, activity), inspection (assignment details, attachments, grades), and submission with a confirm step, plus a read_page fallback for dead ends. Minor gaps remain around write actions like commenting/posting or answering questions, but core lifecycles are covered.
Maintenance
Related MCP Connectors
Manage your GatheredMind classes and assignments from your own AI assistant.
Let AI assistants record meetings and work with notes, transcripts, contacts, and Drive.
Connect AI assistants to Edusign attendance, courses, learners, documents, and API docs via OAuth.
Web search, data extraction and controlled browser automation for AI assistants via OAuth.
Related MCP Servers
- FlicenseAqualityCmaintenanceEnables Claude to read and write Google Classroom data, including courses, coursework, materials, announcements, rosters, submissions, and Drive attachment contents.15-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Google Classroom to check submission statuses, list students and assignments, and create coursework, announcements, and topics through natural language.-
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to operate Google Classroom, letting users list courses and students, check assignment submissions, and create coursework and announcements through natural language.-
- AlicenseAqualityBmaintenanceLets AI apps read a student's Google Classroom data, including active classes, to-do and missing assignments, upcoming due dates, grades on returned work, and announcements. It is read-only, so it can never turn in, edit, or delete anything.14103 npmMIT