mcp-workspace-admin
Provides tools for Google Workspace mailbox and Gmail DKIM-related administration, including creating mailboxes and retrieving DKIM DNS record details and instructions; DKIM activation itself remains a manual step in the Gmail Admin console.
Provides tools for Google Workspace Admin operations through the Google Admin SDK, including adding and verifying domains, creating and listing users, resetting passwords, and handling DKIM record information.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
š mcp-workspace-admin
A Model Context Protocol server for Google Workspace Admin operations. Let AI agents manage domains, mailboxes, and DKIM ā no browser required.
⨠Overview
mcp-workspace-admin exposes Google Workspace Admin operations as MCP tools, making it trivial for AI agents and Claude Code workflows to:
š Add & verify domains ā programmatically add domains to your Workspace and retrieve the DNS verification token
š¤ Manage mailboxes ā create users, list accounts, and reset passwords
š Set up DKIM ā generate keys and inject records into DNS
Originally built for cold email infrastructure automation: buy domains ā add to Workspace ā create sending mailboxes ā configure DNS ā all in a single agent workflow, zero manual steps.
Related MCP server: Gmail & Google Docs MCP Server
š Prerequisites
A Google Workspace account (any tier)
A Google Cloud project with the Admin SDK API enabled
A Service Account with domain-wide delegation configured
Python 3.11+
š Setup
1. Create a Service Account
In Google Cloud Console ā IAM & Admin ā Service Accounts:
Create a new service account (e.g.
workspace-admin-mcp)Click the account ā Keys ā Add Key ā JSON ā download the file
Note the Client ID from the service account details page
2. Grant Domain-Wide Delegation
In Google Workspace Admin ā Security ā API controls ā Domain-wide delegation:
Click Add new
Enter the service account's Client ID
Add these OAuth scopes:
https://www.googleapis.com/auth/admin.directory.domain,
https://www.googleapis.com/auth/admin.directory.user,
https://www.googleapis.com/auth/gmail.settings.sharingClick Authorize
3. Install
git clone https://github.com/keyserfaty/mcp-workspace-admin
cd mcp-workspace-admin
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .4. Configure Environment
export GOOGLE_SERVICE_ACCOUNT_JSON="/path/to/service-account-key.json"
export GOOGLE_WORKSPACE_ADMIN_EMAIL="admin@yourdomain.com"āļø MCP Configuration
Add to your ~/.claude.json (or project .mcp.json):
{
"mcpServers": {
"workspace-admin": {
"type": "stdio",
"command": "/path/to/.venv/bin/python",
"args": ["/path/to/mcp-workspace-admin/server.py"],
"env": {
"GOOGLE_SERVICE_ACCOUNT_JSON": "/path/to/service-account-key.json",
"GOOGLE_WORKSPACE_ADMIN_EMAIL": "admin@yourdomain.com"
}
}
}
}š ļø Tools Reference
Domain Management
Tool | Description | Key Parameters |
| Add a domain to Workspace; returns the DNS verification TXT record |
|
| Check if a domain is verified |
|
| List all domains in the account | ā |
Typical domain onboarding flow:
# 1. Add domain ā get verification token
result = add_domain("example.com")
# ā inject result["txt_record"] into DNS at @ as TXT
# 2. Poll until verified (DNS propagation: ~1ā5 min)
status = get_domain_status("example.com")
# ā status["verified"] == True once propagatedUser / Mailbox Management
Tool | Description | Key Parameters |
| Create a new Workspace mailbox |
|
| List users, optionally filtered by domain |
|
| Reset a user's password |
|
DKIM
Tool | Description | Key Parameters |
| Generate a DKIM signing key |
|
| Retrieve the DKIM TXT record name and Admin console link |
|
| Instructions to activate DKIM signing |
|
ā ļø DKIM limitation ā see below.
ā ļø Known Limitations
DKIM cannot be fully automated via API
Google's public REST APIs do not expose DKIM key generation, retrieval, or activation endpoints. The three DKIM tools return the correct DNS record name and a direct link to the Admin console page instead of performing the action programmatically.
Manual steps required for DKIM:
Google Workspace Admin Console
ā Apps ā Google Workspace ā Gmail ā Authenticate email
ā Select domain ā Generate new record
ā Copy the TXT value ā inject into DNS at google._domainkey.<domain>
ā Wait ~30ā60 min for DNS propagation
ā Click "Start authentication"PRs that automate this via browser automation (e.g. Playwright) are very welcome.
š¤ Example Agent Workflow
This server is designed to power cold email infrastructure automation. A full agent flow:
1. Purchase domain via registrar API (e.g. Porkbun)
2. add_domain("newdomain.com") ā workspace-admin MCP
3. Inject verification TXT into registrar DNS
4. Poll get_domain_status() until verified
5. create_user("hello@newdomain.com", ...) ā workspace-admin MCP
6. create_user("info@newdomain.com", ...) ā workspace-admin MCP
7. Add SPF / DMARC records via registrar API
8. DKIM setup (see limitation above)
9. Connect mailboxes to sending platform for warmupš Project Structure
mcp-workspace-admin/
āāā server.py # MCP server & tool definitions
āāā auth.py # Google service account auth helpers
āāā pyproject.toml # Package metadata & dependencies
āāā README.mdš¤ Contributing
Contributions welcome ā especially:
DKIM automation via Playwright/browser automation fallback
Send-as alias management
Group / mailing list management
Suspend / restore user tools
git checkout -b feature/your-feature
# make changes
git commit -m "feat: describe your change"
git push origin feature/your-feature
# open a PRš License
MIT Ā© Karen Serfaty
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP with 91 agent tools: X, domains, SEO, Maps, Trends, Search, YouTube, TikTok, and more.
Free SPF, DKIM, DMARC, blacklist, MX and bounce checks for any domain, as MCP tools for AI agents.
Your agent needs a mailbox of its own ā to receive, thread, draft and send, with attachments, without borrowing your personal inbox or your company's SMTP. **What you can ask for** ⢠"Create an inbox for this agent and tell me its address." ⢠"Read the new messages in this thread and draft a reply." ⢠"Send this message with the attachment and wait for the response." ⢠"Search this inbox for everything from that domain." ⢠"Show delivery metrics and the events on this inbox." **How to use it** Point any MCP client at https://mcp.aisa.one/mail/mcp and sign in with OAuth ā there is no key to create or paste. 49 tools: create and delete inboxes, list and read messages, raw message bodies, attachments, threads, drafts and draft attachments, send and reply, message search, inbox events, metrics, and list entries ā reads and writes. **Why this rather than the source** A real inbox an agent owns, rather than an SMTP credential it borrows from a human. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Find the contact elsewhere in the catalogue, then write to them from here ā without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/sales/mcp finds the person to write to.
Connect custom domains via AI agents: DNS pre-flight checks, hand-off connect sessions and checks.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to send emails, create drafts in Gmail, and append content to Google Docs via standardized MCP tools.ISC
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to send Gmail emails, create drafts, and append content to Google Docs through MCP tools. Provides secure OAuth-based integration with Google Workspace.ISC
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and LLMs to directly access Google Workspace APIs such as Drive, Docs, Sheets, Gmail, and Calendar by executing gws CLI commands through MCP tools.3 npmGPL 3.0
- FlicenseNot gradedqualityBmaintenanceEnables AI assistants to access and manage Google Workspace services such as Gmail, Drive, Docs, Sheets, Calendar, and Slides through the MCP protocol, with built-in OAuth 2.0 authentication and read/write tool support.-