GAM MCP Server
Administer Google Workspace using the GAM command-line tool.
GAM MCP Server
Google Workspace administration via GAM CLI, ready for Claude Desktop and Model Context Protocol (MCP).
Prerequisites
- GAM: Install and authenticate GAM on your system.
- Run
gam versionto verify installation. - Run
gam oauth createto authenticate with Google Workspace.
- Run
- Node.js: v18 or newer
Installation
# Clone or copy this repo
cd gam-mcp-server
npm install
npm run build
Running the Server
GAM_PATH=/path/to/gam node dist/index.js
- Or use the default
gamin your PATH.
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"gam-workspace": {
"command": "node",
"args": ["/absolute/path/to/gam-mcp-server/dist/index.js"],
"env": {
"GAM_PATH": "/path/to/gam"
}
}
}
}
Available Tools
User Management
gam_list_users: List users (domain, query, maxResults)gam_get_user: Get user details (email)gam_create_user: Create user (email, firstName, lastName, password, orgUnit)gam_update_user: Update user (email, updates)gam_suspend_user/gam_unsuspend_user: (email)gam_move_user_orgunit: (email, orgUnitPath)
Group Management
gam_list_groups: List groups (domain, maxResults)gam_get_group: Get group details (groupEmail)gam_create_group: Create group (groupEmail, groupName, description)gam_add_group_member/gam_remove_group_member: (groupEmail, memberEmail, role)
Organizational Units
gam_list_orgunits: List OUsgam_move_user_orgunit: Move user between OUs
Domain Management
gam_get_domain_info: Get domain info
Example MCP Tool Calls
List users:
{
"method": "tools/call",
"params": {
"name": "gam_list_users",
"arguments": { "maxResults": 10 }
}
}
Get user:
{
"method": "tools/call",
"params": {
"name": "gam_get_user",
"arguments": { "email": "[email protected]" }
}
}
Create group:
{
"method": "tools/call",
"params": {
"name": "gam_create_group",
"arguments": { "groupEmail": "[email protected]", "groupName": "Team" }
}
}
Troubleshooting
- GAM not found: Set
GAM_PATHor addgamto your PATH. - Authentication errors: Run
gam oauth create. - Quota/rate limit: Wait and retry; see Google Admin API quotas.
- Parameter validation: All inputs are validated; see error messages for details.
Security Considerations
- Only whitelisted GAM commands are allowed.
- All parameters are validated and sanitized.
- No arbitrary command execution.
- Logs redact sensitive data.
- Rate limiting and error handling are built-in.
Extending
Add new tools in src/tools/ and export them in src/tools/index.ts.
© 2024 GAM MCP Server Authors
Related Servers
Cloudflare MCP Server
A self-hostable MCP server for deployment on Cloudflare Workers using Durable Objects.
Heroku Platform
Interact with Heroku Platform resources securely using the Heroku CLI. Requires the Heroku CLI and a valid API key.
SynClub MCP Server
Official SynClub server for AI generation, including text-to-speech, voice cloning, video, and image creation.
Skyvia MCP
Skyvia MCP Endpoint is a no-code gateway that makes your business data accessible to AI assistants in real time.
Microsoft MCP
Access Microsoft services like Outlook, Calendar, and OneDrive via the Microsoft Graph API.
Okta MCP Server
Allows AI models to interact with your Okta environment to manage and analyze resources, designed for IAM engineers, security teams, and administrators.
mcp-k8s-go
Golang-based Kubernetes MCP Server. Built to be extensible.
FreshMCP
Provides an MCP interface for FreshMCP operations using Azure Cosmos DB and AI Search.
Remote MCP Server (Authless)
An example of a remote MCP server deployable on Cloudflare Workers without authentication.
Kubernetes
Connect to Kubernetes cluster and manage pods, deployments, services.