Google Classroom offers a remote Model Context Protocol (MCP) server that allows AI agents to securely interact with Google Classroom data. By configuring the Google Classroom MCP server, you enable AI applications like Google Antigravity and Claude to perform actions in Google Classroom.
The Google Classroom MCP server provides a standardized way for AI agents to:
- Read data: List courses, retrieve course content and metadata, and view submissions and grades.
- Take action: Create and update coursework and announcements.
- Respect security: Inherit the same permissions and data governance controls as the user.
To learn about the key concepts and benefits of Google remote MCP servers, see Google Cloud MCP servers overview.
Tool reference
The following tools are available for the Google Classroom MCP server:
list_courseslist_course_work_submissionsget_course_workcreate_course_workupdate_course_worklist_course_work_submissionslist_topicscreate_topiclist_announcement_summariesget_announcementscreate_announcementget_course_work_rubriccreate_course_work_rubricget_course_rosterget_guardian_infosearch_course_standards
Prerequisites
Membership in the Google Workspace Developer Preview Program.
A Google Cloud project. To create a project, see Create a project.
An MCP host, like Google Antigravity.
A test Google Classroom class with at least one test student account. If you don't have a Google Classroom class that you can use for testing, create one in the UI and add a test student.
Configure the Google Classroom MCP server
To use the Google Classroom MCP server, you must enable both the API and MCP services in your Google Cloud project, then configure your MCP client connection.
Enable the Google Classroom MCP and API services
Enable the Google Classroom API in your Google Cloud project:
Enable the Google Classroom MCP service in your Google Cloud project:
Set up the OAuth consent screen
The Google Classroom MCP server uses OAuth 2.0 for authentication and authorization. You must configure the OAuth consent screen before you can create an OAuth client ID.
In the Google Cloud console, go to Google Auth Platform > Branding.
If you have already configured the Google Auth Platform, you can configure the following OAuth Consent Screen settings in Branding, Audience, and Data Access. If you see a message that says Google Auth Platform not configured yet, click Get Started:
- Under App Information, in App name, type
Classroom MCP Server. - In User support email, select your email address or an appropriate Google group.
- Click Next.
- Under Audience, select Internal. If you can't select Internal, select External.
- Click Next.
- Under Contact Information, enter an Email address where you can be notified about any changes to your project.
- Click Next.
- Under Finish, review the Google API Services User Data Policy and if you agree, select I agree to the Google API Services: User Data Policy.
- Click Continue.
- Click Create.
- If you selected External for user type, add test users:
- Click Audience.
- Under Test users, click Add users.
- Enter your email address and any other authorized test users, then click Save.
- Under App Information, in App name, type
Click Data Access > Add or Remove Scopes. A panel appears with a list of scopes for each API that you've enabled in your Google Cloud project.
Under Manually add scopes, paste the scopes for the Google Classroom MCP server. The scopes needed for the sample prompts are:
https://www.googleapis.com/auth/classroom.announcementshttps://www.googleapis.com/auth/classroom.courses.readonly
Click Add to Table.
Click Update.
After selecting the scopes required by your app, on the Data Access page, click Save.
Configure your MCP client
To add the Google Classroom remote MCP server to your MCP client, follow the instructions for your client. Instructions for two common clients are provided here. See Configure MCP in an AI application for details on connecting different types of clients.
Antigravity
To add the Google Classroom remote MCP server to Antigravity,
add the server configuration to your mcp_config.json file. These
instructions support Antigravity 2.0, Antigravity IDE, and Antigravity CLI.
Create an OAuth 2.0 client ID and secret:
In the Google Cloud console, go to Google Auth Platform > Clients > Create Client
Select Web application as the application type.
Enter a Name.
In the Authorized redirect URIs section, click + Add URI, and then add
https://antigravity.google/oauth-callbackin the URIs field.Select Use this client for an AI-powered agent.
Click Create and copy your Client ID and Client Secret.
Open or create the configuration file
~/.gemini/config/mcp_config.json.Add the
mcpServersconfiguration tomcp_config.json:{ "mcpServers": { "classroom": { "serverUrl": "https://classroommcp.googleapis.com/mcp/v1", "oauth": { "clientId": "OAUTH_CLIENT_ID", "clientSecret": "OAUTH_CLIENT_SECRET" } } } }Replace the following:
OAUTH_CLIENT_ID: The client ID you created.OAUTH_CLIENT_SECRET: The client secret you created.
Save
mcp_config.json.Authenticate the MCP server. You can authenticate using either the GUI settings or the CLI:
For Antigravity IDE or GUI (Antigravity 2.0):
- Open your settings screen (e.g., click Settings at the bottom-left or open Antigravity User Settings).
- Navigate to Customizations.
- Under Installed MCP Servers, click Refresh.
- Find
classroomin the list, click Authenticate, sign in to your Google Account, copy the authorization code, paste it into the input dialog, and click Submit.
For Antigravity CLI:
Start Antigravity CLI:
agyOpen the interactive MCP management panel by running:
/mcpUse the arrow keys to select
classroom, move to the Authenticate action, and press Enter. Complete the sign-in flow in your browser, copy the authorization code, paste it into the terminal prompt, and press Enter.
Verify that the server is correctly configured and running:
- For Antigravity IDE or GUI: A Sign out button is displayed next to the server under Customizations > Installed MCP Servers.
- For Antigravity CLI: Open the
/mcppanel to view your configured MCP servers. Verified and authenticated servers display Authed next to their names inside the interactive TUI panel. You can select the server under the dashboard view to inspect its status and list all of its available tools.
The remote MCP server is ready to use in Antigravity.
Claude
To use the Google Classroom remote MCP server with Claude.ai or Claude Desktop, you must have the Claude Enterprise, Pro, Max, or Team plan.
To add the Google Classroom remote MCP server to Claude, configure a custom connector with an OAuth client ID and secret.
Create an OAuth 2.0 client ID and secret:
In the Google Cloud console, go to Google Auth Platform > Clients > Create Client
Select Web application as the application type.
Enter a Name.
In the Authorized redirect URIs section, click + Add URI, and then add
https://claude.ai/api/mcp/auth_callbackin the URIs field.Select Use this client for an AI-powered agent.
Click Create and copy your Client ID and Client Secret.
Configure the MCP server in Claude:
- In Claude.ai or Claude Desktop, go to Settings (or Admin settings) > Connectors.
- Click Add custom connector.
- Enter the connection details for the Google Classroom product:
- Server name:
Google Classroom. - Remote MCP server URL:
https://classroommcp.googleapis.com/mcp/v1
- Server name:
- In Authentication, select Sign in now. In OAuth client, select Use your own OAuth client and enter your OAuth client ID and OAuth client secret.
- Click Add and then Connect.
Others
Many AI applications have ways to connect to a remote MCP server. You typically need to enter details about the server, like its name, endpoints, transport protocol, and authentication method. For the Google Classroom remote MCP server, enter the following:
Server name:
classroomServer URL:
https://classroommcp.googleapis.com/mcp/v1Transport: Streamable HTTP
Authentication: The Google Classroom remote MCP server uses OAuth 2.0. When creating your OAuth 2.0 client, select Use this client for an AI-powered agent. For details, see Learn about authentication and authorization.
Test the Google Classroom MCP server
After you configure the MCP client, you can verify the connection by running some test prompts.
Try asking your MCP client the following questions:
"What classes am I currently teaching?"
The client checks your schedule using
classroom.list_coursesand summarizes you the active courses where you have the teacher role."For my geology class, draft an announcement about the upcoming field trip."
The client uses
classroom.create_announcementto draft the announcement, which you can review and post in the Google Classroom app.
If the tools execute successfully and you receive relevant responses, your Google Classroom MCP server is correctly configured.
Extend functionality with additional servers
Other Google Workspace services offer remote MCP servers. To extend the capabilities of your MCP client, consider enabling and configuring additional remote MCP servers.
For Google Classroom in particular, configuring the Google Drive MCP server can be particularly useful for working with attachments.
Troubleshooting
If you encounter issues connecting to the MCP server, you can check for errors in the OAuth logs. Ask your administrator to check the OAuth log events in the security investigation tool.
If your requests to the MCP server are rejected, verify that your OAuth 2.0 client has Use this client for an AI-powered agent selected in Google Auth Platform > Clients. If you can't change this setting on an existing OAuth client, create a new OAuth client with Use this client for an AI-powered agent selected and update your app to use it. If an existing OAuth client is used for both AI agent and non-agent features, create a separate OAuth client for the AI agent and keep the existing client for your non-agent features. For instructions, see Configure your MCP client and Manage OAuth Clients.
If you're prompted to sign in again about every hour, your MCP client isn't
receiving a refresh token. Google's authorization server issues refresh tokens
only when the authorization request includes access_type=offline; requesting
the OIDC offline_access scope alone isn't sufficient. If your MCP client
supports custom authorization parameters, add access_type=offline to the
authorization request. To get a new refresh token for a user who already granted
access, also add prompt=consent.
Important security consideration: Indirect prompt injection
When you expose a language model to untrusted data, there is a risk of an indirect prompt injection attack. Because MCP hosts like Google Antigravity have access to powerful tools and APIs through the Google Classroom MCP server, they can read, modify, and delete data in your Google Account.
To mitigate these risks, you must screen prompts and responses for malicious content or prompt injection attacks. You can use the Google-provided Model Armor or you can use your own solution if you document it in order for users to accept that risk. For more information, see Configure security for Google Workspace MCP servers.
Follow these best practices:
- Only use trusted tools. Never connect Google Classroom MCP server to untrusted or unverified applications.
- Be cautious with untrusted inputs. Avoid asking your MCP client to process events or other resources from unverified sources. These inputs may contain hidden instructions that can hijack your session, allowing an attacker to modify, steal, or delete your data.
- Review all actions. Always carefully review the actions taken by your AI client on your behalf to ensure they are correct and align with your intentions.
- Use Model Armor. Enable Model Armor to protect against prompt injection attacks.
Feedback
Share feedback on the Google Classroom MCP server in our public issue tracker.