Skip to main content
Glama

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.zip for Lab 9." (it shows you a summary first and waits for your yes)

Related MCP server: Classroom MCP

Tools

Tool

What it does

status

Which Google account it's signed in as

list_courses

Your classes: name, section, teacher, course_id

list_todo

To-do across all classes: assigned, missing or done

list_posts

A class's Stream: announcements (full text and attachments) and new assignment/material notices

recent_activity

Everything posted in all your classes in the last N days

list_classwork

A class's Classwork page, grouped by topic, with due dates

my_grades

Your status and grade for every item in a class

get_assignment

One assignment/material/question: instructions, points, due date, attachments, your submission

read_attachment

Read an attached Google Doc/Slides/Sheet, PDF, Word, PowerPoint or code file

read_page

Raw text of any Classroom page (fallback)

prepare_submission

Step 1 of turn-in / unsubmit: attaches files as a draft, submits nothing, returns a token

confirm_submission

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 classes

login 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-mcp

Codex CLI

codex mcp add classroom -- classroom-mcp

or add to ~/.codex/config.toml:

[mcp_servers.classroom]
command = "classroom-mcp"

Gemini CLI

gemini mcp add classroom classroom-mcp

or 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:

  1. prepare_submission opens 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.

  2. confirm_submission with 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

CLASSROOM_MCP_READ_ONLY

off

1 removes the turn-in / unsubmit tools

CLASSROOM_MCP_ACCOUNT

0

Which signed-in Google account to use (the N in classroom.google.com/u/N/)

CLASSROOM_MCP_SHOW_BROWSER

off

1 shows the browser window while it works (handy for debugging)

CLASSROOM_MCP_BROWSER

auto

Path to a specific Chrome / Edge / Brave executable

CLASSROOM_MCP_HOME

~/.config/classroom-mcp (%LOCALAPPDATA%\classroom-mcp on Windows)

Where the profile and cache live

CLASSROOM_MCP_IDLE_SECONDS

120

Close the background browser after this much idle time

CLASSROOM_MCP_MAX_DOWNLOAD_MB

100

Largest attachment read_attachment will download

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 login again. 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 login again.

  • "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_ACCOUNT to 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_page still 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 doctor

Contributions 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

MIT

Available Tools

12 tools
confirm_submissionA
Destructive

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_assignmentA
Read-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_classworkB
Read-only

Everything on a class's Classwork page (assignments, questions, materials) grouped by topic, with due dates and links.

Inputs: course_id (required).

list_coursesB
Read-only

List your Google Classroom classes (name, section, teacher, course_id, link).

Inputs: include_archived.

list_postsA
Read-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_todoA
Read-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_gradesA
Read-only

Your status and grade for every item in one class (Classroom's 'View your work' page).

Inputs: course_id (required).

prepare_submissionA
Destructive

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_attachmentA
Read-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_pageA
Read-only

Raw text and links of any classroom.google.com page. A fallback for anything the other tools miss.

Inputs: link (required).

recent_activityA
Read-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.

statusA
Read-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

    A3.8/5.0

    Scored across 12 tools

    Disambiguation4/5

    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.

    Naming Consistency4/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers