Obtain an OAuth 2.0 access token with the scope https://www.googleapis.com/auth/classroom.rosters
List existing students with GET https://classroom.googleapis.com/v1/courses/<courseId>/students, paginating with nextPageToken
Add a student by sending POST https://classroom.googleapis.com/v1/courses/<courseId>/students with a JSON body containing userId (the student's Google account email or numeric ID)
Add a teacher with POST https://classroom.googleapis.com/v1/courses/<courseId>/teachers using the same body structure
Remove a member with DELETE https://classroom.googleapis.com/v1/courses/<courseId>/students/<userId>
Known gotchas
Students being added must be in the same Google Workspace domain as the course, or the domain must explicitly allow cross-domain enrollment; otherwise the API returns FAILED_PRECONDITION
The invitationCode flow is separate from direct enrollment; calling POST /students directly skips the invitation and immediately enrolls the user, which may bypass institution workflow policies
There is no bulk-add endpoint; enrolling hundreds of students requires one API call per student, making rate limit handling essential
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp