gws-mcp
Allows use of Google Workspace's Gmail remote MCP server through the bridge, forwarding Gmail approval prompts to an approver hook, the host UI, or the agent.
Bridges MCP clients to Google Workspace's remote MCP servers, handling Google's stateless MCP protocol and form-elicitation approval flow for services such as Calendar, Gmail, Drive, Docs, and Sheets.
Allows use of Google Workspace's Docs remote MCP server through the bridge, with approval handling for consequential actions.
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.
gws-mcp
A stdio MCP server that lets any MCP client use Google Workspace's remote MCP servers (Calendar, Gmail, Drive, Docs, Sheets, …), including the approval prompts most clients can't handle yet.
One file, zero runtime dependencies. Node 18+.
Why
Google requires AI agents to reach Workspace through its own MCP servers
(https://<service>mcp.googleapis.com/mcp/v1) rather than the REST APIs.
Technical enforcement begins February 1, 2027. Those servers:
speak the stateless MCP protocol
2026-07-28: there is no session and no server-to-client stream, and every request carries its own capabilities;gate consequential actions behind form elicitation. Deleting an event, inviting an outside guest, sending mail, or even reading items owned by someone outside your account returns an approval form instead of a result.
Clients built on older MCP versions (including the official Python SDK as of 1.26)
get This action requires user confirmation, which this client does not support and stop there. gws-mcp speaks the new flow and hands each approval
to whoever should answer it.
Related MCP server: google-workspace-mcp
Who answers an approval
In order:
Your approver hook (
GWS_APPROVER), if set. It's your program and your policy (see below).The host's own approval UI, if your MCP client declared elicitation support. Google's form is forwarded as a standard
elicitation/create.The agent, otherwise. The tool result shows Google's prompt and choices, and the call is parked:
Google requires confirmation before `delete_event` runs. Nothing has happened yet. Deleting this event. **Dentist · Thu, Dec 3, 9:00-9:10 AM EST** Allow my-agent to use delete_event? ALLOW_ONCE: Allow once DENY_ONCE: Don't allow request_id: a8578ad5 Answer with `google_confirm`. ...The agent answers with
google_confirm {request_id, approval}. It can decide itself, or ask its user first and pass the answer on (a chained approval). Lasting grants (ALLOW_TOOL_ALWAYS,ALLOW_OWNER_ALWAYS, …) needgranted_by, the person who approved, because Google keeps them on the account.
Setup
In your Google Cloud project, enable the per-product MCP API (e.g. Calendar MCP API,
calendarmcp.googleapis.com) and the product API.On your OAuth 2.0 client, tick Use this client for an AI-powered agent (Google Auth Platform → Clients). Without it, Google rejects the token.
Get a user access token with the scopes that server needs (Calendar:
calendar.events, plus a read scope) and keep it fresh in a file.Register the bridge with your MCP client:
{ "mcpServers": { "google-calendar": { "command": "npx", "args": ["-y", "@bxxd/gws-mcp"], "env": { "GWS_MCP_URL": "https://calendarmcp.googleapis.com/mcp/v1", "GWS_TOKEN_FILE": "/path/to/access-token", "GWS_CLIENT_NAME": "my-agent" } } } }Run one instance per Google service.
Variable | Default | |
| Calendar MCP | Upstream server. |
| required | Access token. The file is re-read on every call. |
|
| Shown in Google's prompts ("Allow my-agent to …"). Google keys saved "always" grants to it, so keep it stable. |
| unset | Approval hook (below). |
| event's | Used when localizing Calendar times. |
|
| Override if Google moves on. |
Approver hooks
GWS_APPROVER is a command. For each approval it receives JSON on stdin:
{"tool": "delete_event",
"arguments": {"eventId": "…"},
"field": "approval_choice",
"message": "Deleting this event.\n\n**Dentist · Thu, Dec 3, 9:00-9:10 AM EST**",
"title": "Allow my-agent to use delete_event?",
"choices": [{"value": "ALLOW_ONCE", "label": "Allow once"},
{"value": "DENY_ONCE", "label": "Don't allow"}]}It prints one of the offered choice values, or ask (or nothing) to fall
through to the host or the agent. Use a hook to send the prompt to a phone or
an inbox, apply a standing policy, or log approvals. Google expects
consequential actions to be confirmed by a person; what your hook does is your
responsibility.
Rough edges it smooths over
Headers and
_meta:MCP-Protocol-Version,Mcp-Method,Mcp-Name, and theio.modelcontextprotocol/*capability declaration on every request. If any are missing, Google answers with a bare400.Calendar times: Google wants local wall-clock
startTime/endTimewith no offset and noZ(2026-12-03T09:00:00). Times sent with an offset orZare converted for you.Stale approvals: if an approval is no longer accepted, Google asks again. You get the fresh prompt instead of an error.
Multi-round approvals: answers are accumulated across rounds.
Choices are never hardcoded: whatever Google offers is shown. Google says the list will change.
Terse errors get a hint: API not enabled, client not flagged as an AI agent, missing capability, insufficient scope.
Wire format (what Google actually expects)
Every request is a POST to /mcp/v1 with:
Authorization: Bearer <user access token>
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: delete_event{"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {"name": "delete_event", "arguments": {"eventId": "…"},
"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientInfo": {"name": "my-agent", "version": "1"},
"io.modelcontextprotocol/clientCapabilities": {"elicitation": {"form": {}}}}}}When approval is needed, the result is:
{"resultType": "input_required",
"inputRequests": {"approval_choice": {"method": "elicitation/create",
"params": {"mode": "form", "message": "Deleting this event. …",
"requestedSchema": {"type": "object", "required": ["approval_choice"],
"properties": {"approval_choice": {"type": "string",
"title": "Allow my-agent to use delete_event?",
"enum": ["ALLOW_ONCE", "DENY_ONCE"],
"enumNames": ["Allow once", "Don't allow"]}}}}}},
"requestState": "{\"elicitationId\":\"…\",\"requestBinding\":\"…\"}"}To answer, re-send the identical name and arguments plus the answer.
requestState and inputResponses go at the top level of params, not inside
_meta:
"params": {"name": "delete_event", "arguments": {"eventId": "…"}, "_meta": {…},
"requestState": "<unchanged>",
"inputResponses": {"approval_choice": {"action": "accept",
"content": {"approval_choice": "ALLOW_ONCE"}}}}DENY_ONCE, decline and cancel all end the call with "Action canceled.
The user declined the confirmation request.". Choices seen so far:
ALLOW_ONCE, DENY_ONCE, ALLOW_TOOL_ALWAYS, ALLOW_OWNER_ALWAYS,
ALLOW_AUDIENCE_ALWAYS, ALLOW_RESOURCE_ALWAYS.
The Google docs that cover this are form elicitation and configuring the MCP servers.
Licence
MIT
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 server with managed OAuth for 15+ toolkits: Google Workspace, Fitbit, Oura, Kalshi, etc.
Drive Google Antigravity from the Gemini app: remote MCP with OAuth 2.1 + PKCE.
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Related MCP Servers
- AlicenseAqualityAmaintenanceGives MCP clients access to Google Workspace (Gmail, Drive, Calendar, Sheets, Docs, etc.) across multiple Google accounts simultaneously.193,206 npm22MIT
- FlicenseNot gradedqualityDmaintenanceEnables multi-user access to Google Workspace services (Gmail, Calendar, Docs, Sheets, Slides, Drive) via remote MCP with OAuth 2.1 authentication.-
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to authenticate with Google OAuth and securely access Google Calendar's official MCP server without exposing the Google client secret.MIT
- AlicenseNot gradedqualityCmaintenanceEnables remote MCP connections with Google OAuth authentication, allowing secure access to MCP tools and resources.1MIT