gw-server
Provides tools for interacting with Gmail, including searching, reading, sending, replying, managing drafts, modifying labels, listing labels, and retrieving attachments.
Provides tools for interacting with Google Workspace services through Google APIs, covering Gmail, Drive, Calendar, Docs, Sheets, Slides, Chat, Tasks, and Contacts, plus a generic gapi tool for any Google REST endpoint.
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.
$ curl -s https://your-domain/mcp \
-H "Authorization: Bearer $GW_TOKEN" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq '.result.tools | length'
45Forty-five tools. Gmail, Drive, Calendar, Docs, Sheets, Slides, Chat, Tasks and Contacts — discovered and called directly by your AI client. No SDK, no googleapis, no browser on the server.
What is this
gw-server turns Google Workspace into MCP
tools. It holds the OAuth tokens server-side, refreshes them automatically,
and speaks Streamable HTTP — so any MCP client wires up with one URL and one
bearer token, and immediately gets 45 named tools plus a generic escape hatch
for any Google REST endpoint.
Related MCP server: Google Workspace MCP Server
Why gw-server
Headless OAuth. Start a login from the server, open the link on your phone, consent — tokens land on the server. The host never needs a browser.
Everything is a tool. 45 named tools across nine Google services, plus
gapi, a generic escape hatch for any Google REST endpoint.One secret for clients. Clients store a URL and a bearer token — Google credentials never leave the server.
Boring to run. Pure Python (FastAPI + the official MCP SDK), one
uvproject, one systemd unit, Caddy for TLS.
The tools
Group | Tools |
core (3) |
|
gmail (10) |
|
drive (10) |
|
calendar (6) |
|
docs (3) |
|
sheets (4) |
|
slides (1) |
|
chat (3) |
|
tasks (4) |
|
people (1) |
|
Multi-account built in: pass email to pick an account, omit it when only one
is signed in.
Quick start
git clone https://github.com/trtyr/gw-server && cd gw-server
uv sync
export GW_TOKEN=$(openssl rand -hex 32) # client bearer, required
uv run gw-server # listens on 127.0.0.1:8787Wire up any MCP client:
{
"mcpServers": {
"gw": {
"url": "http://127.0.0.1:8787/mcp",
"auth": "bearer",
"bearerToken": "<GW_TOKEN>"
}
}
}Login, from anywhere
curl -H "Authorization: Bearer $GW_TOKEN" \
"http://127.0.0.1:8787/oauth/login?email=you@gmail.com"The response contains a Google consent URL. Open it on any device, approve, and the token lands on the server via the OAuth callback — no browser needed on the host, tokens never pass through your client. Refreshes are automatic.
Production
A hardened deployment is ~30 minutes: Caddy in front for TLS, the server as a
systemd unit behind it, GW_PUBLIC_URL set to your domain, and your MCP
client pointed at https://<your-domain>/mcp.
The full walkthrough — systemd unit, Caddyfile, firewall rules, a 中文版 — is in docs/deployment.zh.md.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Gmail, Outlook, Drive, OneDrive and calendars for AI agents. Many accounts, one endpoint, audit log.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Permissioned access to Gmail, Drive and Calendar via the user's own Google account
Hosted MCP for Google Workspace, Atlassian and Notion: one OAuth, per-user accounts, write access.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with Google Workspace services (Gmail, Drive, Docs, Tasks, Calendar) through OAuth 2.0 authentication, providing 25+ operations for business automation and productivity.1-
- 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.-
- AlicenseBqualityBmaintenanceProvides MCP access to 55 tools across Calendar, Gmail, Drive, Docs, Sheets, Slides, Tasks, Forms, and Keep, using service-account authentication with domain-wide delegation for headless agents and automation.561MIT
- AlicenseNot gradedqualityCmaintenanceExposes 170 tools spanning Drive, Docs, Sheets, Calendar, Gmail, Slides, People, and Chat so AI assistants can read, create, edit, and organize Google Workspace content, including multi-account profiles and capability controls like read-only or safe-write modes. Setup runs through an interactive OAuth wizard that keeps refresh tokens local and generates ready-to-paste client configuration.47 npm2AGPL 3.0