---
name: iblai-connect-google-classroom
description: "Read and write Google Classroom data through the Google Classroom API and expose it to an ibl.ai agent as an MCP tool. Use when the user asks an agent to work with Google Classroom data, or to set up a Google Classroom MCP connection on ibl.ai."
metadata:
  kind: guide
---

# Google Classroom connector for AI agents

> A starting point maintained on ibl.ai at https://ibl.ai/developer/connectors/google-classroom — not part of the iblai/vibe repository. Checked against Google's documentation on October 20, 2026; test it against your own Google Classroom setup before you rely on it.

Google Classroom is Google Workspace for Education's class tool. It holds courses, teacher and student rosters, guardians, coursework, student submissions and grades, announcements and topics.

## Auth & conventions

- **API:** Google Classroom API (REST). Create, read and modify courses, rosters (students, teachers, invitations, guardians), coursework, course materials, topics, announcements and student submissions, including grading and returning work. Push notifications are available.
- **Base URL:** https://classroom.googleapis.com/v1/
- **Access:** Public, self-serve. Any developer can call the API from a Google Cloud project with OAuth credentials. Rubrics, grading periods and add-on attachments need users with certain Google Workspace for Education licenses.
- **Auth:** OAuth 2.0 authorization code. OAuth 2.0 with Classroom scopes such as classroom.courses, classroom.rosters.readonly, classroom.coursework.students and classroom.student-submissions.students.readonly (prefix https://www.googleapis.com/auth/).
- **Limits:** Per 60-second moving average: 4,000,000 queries/day per client, 3,000/minute per client and 1,200/minute per user. Over quota returns RESOURCE_EXHAUSTED; request increases in the Google Cloud console.
- Keep Google Classroom credentials in environment variables or the ibl.ai credential store. Never print a token in chat and never commit one to a file.
- Destructive or outward-facing calls are marked **Confirm with the user first** — do.

## Reads

- **Courses** — courses.list and courses.get return courses the user can access.
- **Rosters** — courses.students.list and courses.teachers.list return a course's students and teachers.
- **Coursework** — courses.courseWork.list/get return assignments and questions.
- **Student submissions** — courses.courseWork.studentSubmissions.list/get return submission state and grades.
- **Announcements and topics** — Course announcements and topics, under the announcements and topics scopes.
- **Guardians** — Guardian links for students, under the guardianlinks scopes.

## Writes

- **Courses and coursework** — courses.create/patch and courses.courseWork.create/patch create or edit courses and assignments.
- **Grades and returned work** — studentSubmissions.patch sets grades; studentSubmissions.return returns work to the student. **Confirm with the user first.**
- **Roster changes** — courses.students.create/delete and courses.teachers.create/delete add or remove people. **Confirm with the user first.**
- **Deletions** — courses.delete and courses.courseWork.delete remove a course or assignment. **Confirm with the user first.**
- **Announcements** — Post announcements to a course stream (classroom.announcements scope). **Confirm with the user first.**

## Expose it to an ibl.ai agent (MCP)

Google publishes an official MCP server, Google Classroom MCP server (classroommcp.googleapis.com) (https://developers.google.com/workspace/classroom/reference/mcp). Register it below as-is, or host your own server that wraps the calls in this skill.

First install the ibl.ai platform skills and connect your organization (writes `IBLAI_ORG`, `IBLAI_USERNAME` and `IBLAI_API_KEY` to `.env`):

```bash
npx skills add iblai/vibe --all
# then, in your coding agent:
/iblai-api-login
```

Every call below sends `Authorization: Api-Token $IBLAI_API_KEY`.

1. **Register the server** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-servers/` with `name`, `url`, `transport` (`sse` | `websocket` | `streamable_http`) and `auth_type` (`none` | `token` | `oauth2`). Capture the returned `id`.
   - Google Classroom supports per-user OAuth: `auth_type=oauth2` with `auth_scope=user` and a linked `oauth_service` makes each person connect their own account in the chat. It needs an `auth_{provider}` credential in the organization's credential store first.
2. **Create the connection** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-server-connections/` with `server`, `scope` (`platform` | `mentor` | `user`), `auth_type`, and either `credentials` + `authorization_scheme` or a `connected_service` id for OAuth. Credentials are masked on read; never send a masked value back.
3. **Enable it on the agent** — `GET https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mentors/{agent_id}/settings/`, add `mcp-tool` to `tool_slugs` and the server id to `mcp_servers`, then `PATCH` the full lists back. They are replaced, not merged.

Full reference: https://ibl.ai/developer/platform/mcp/mcp-connections and the `/iblai-api-agent-mcp` skill.

## Example prompts

- "List my Google Classroom courses and how many students are in each"
- "Show which students haven't turned in the Week 6 essay in Period 4 English"
- "Create a short-answer assignment due Friday in all my 8th-grade science classes"
- "Grade and return the submissions for the lab report using these scores"

## Guardrails

- Student education records protected by FERPA: rosters, guardian contacts, submitted work and grades. Accounts are usually district-managed Google Workspace for Education users.
- Request the narrowest Google Classroom scopes or role the task needs, and prefer a read-only credential for agents that only answer questions.
- Return the fields the user asked for, not whole records; do not paste personal data into chat that the user did not request.
- Before any write, show the user exactly what will change and wait for a yes.
- Respect the documented limits above: page through results and back off on rate-limit responses instead of retrying in a loop.

## References

- Google Classroom API: get started: https://developers.google.com/workspace/classroom/guides/get-started
- Classroom API REST reference: https://developers.google.com/workspace/classroom/reference/rest
- Classroom MCP reference: https://developers.google.com/workspace/classroom/reference/mcp
- Google Classroom MCP server (classroommcp.googleapis.com): https://developers.google.com/workspace/classroom/reference/mcp
- This connector on ibl.ai: https://ibl.ai/developer/connectors/google-classroom
- ibl.ai MCP server connections: https://ibl.ai/developer/platform/mcp/mcp-connections
