google-classroom
MCP server from faizan45640/google-classroom-mcp-server
claude mcp add --transport stdio faizan45640-google-classroom-mcp-server node PATH_TO_YOUR_DIRECTORY/index.js \ --env TOKENS_JSON_PATH="Path to save tokens.json (defaults to project root if not specified)." \ --env GOOGLE_APPLICATION_CREDENTIALS="Path to credentials.json or credentials source for Google OAuth client (optional if handled by index.js)."
How to use
This MCP server exposes Google Classroom data to Claude and other MCP-compatible AI assistants. It authenticates with your Google account and provides tools to list courses, fetch detailed course information, and retrieve assignments for each course. The server uses OAuth credentials to access the Google Classroom API and returns structured data that AI assistants can query via the MCP protocol. Available tools include: courses (list all your Google Classroom courses), course-details (retrieve details and announcements for a specific course by courseId), and assignments (get assignments and submissions for a specific course by courseId). You can configure Claude to point to this MCP server by updating the client configuration to reference the local Node.js entry point, enabling you to prompt Claude with natural language queries like “Show me all my Google Classroom courses.”
How to install
Prerequisites:
- Node.js 16 or higher
- A Google Cloud Platform project with the Google Classroom API enabled
- OAuth 2.0 client credentials for the Google Classroom API
Installation steps:
- Install dependencies locally:
npm install
- Place your Google OAuth credentials in a file named credentials.json at the project root. Example structure:
{
"web": {
"client_id": "YOUR_CLIENT_ID",
"project_id": "YOUR_PROJECT_ID",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_secret": "YOUR_CLIENT_SECRET",
"redirect_uris": ["http://localhost:3000/auth/google/callback"]
}
}
- Authenticate with Google to obtain tokens:
node index.js auth
This will launch a browser to complete the OAuth flow and save credentials to tokens.json. 4) Configure your MCP client (e.g., Claude) to use this server by pointing to the entry script:
"mcpServers": {
"google-classroom": {
"command": "node",
"args": ["PATH_TO_YOUR_DIRECTORY/index.js"]
}
}
- Start using the server by running the entry point (if needed manually):
node index.js
Note: If you’re using Smithery for automatic installation, you can install directly via:
npx -y @smithery/cli install @faizan45640/google-classroom-mcp-server --client claude
Additional notes
Tips and troubleshooting:
- Ensure your Google Cloud project has the Google Classroom API enabled and OAuth consent screen configured with test users if your app is not public.
- If you encounter permission errors, re-run the authentication flow with node index.js auth to refresh tokens.
- The server stores tokens locally (tokens.json); keep this file secure as it contains access tokens for your Google account.
- Update claude_desktop_config.json to point to the correct path of index.js in your environment.
- If you modify credentials.json, re-run node index.js auth to refresh tokens.
- The server uses scopes including classroom.courses.readonly, classroom.announcements.readonly, classroom.coursework.me.readonly, and classroom.rosters.readonly; ensure these are granted in the OAuth consent screen.
Related MCP Servers
any-chat-completions
MCP Server for using any LLM as a Tool
bitbucket
Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs
time
⏰ Time MCP Server: Giving LLMs Time Awareness Capabilities
unity-editor
An MCP server and client for LLMs to interact with Unity Projects
website-publisher
AI Website builder and publisher MCP. Quickly publish and deploy your AI generated code as real website URL. Support html, css, js, python etc.
xgmem
Global Memory MCP server, that manage all projects data.