The Postman agent supports three email backends. You can use one or more:
| Backend | Email Provider | Access Level | Calendar |
|---|---|---|---|
GWS CLI (gws) |
Gmail / Google Workspace | Full read/write | Yes (Google Calendar) |
Hey CLI (hey) |
Hey.com | Full read/write | No (Hey has its own productivity tools, not Google Calendar) |
| MCP connectors | Gmail | Read-only + drafts | Read-only (Google Calendar) |
If you have both Gmail and Hey.com, you can use gws and hey simultaneously. Set your preferred primary backend in Meta/user-profile.md with email_backend: hey or email_backend: gws (default: gws).
# See https://github.com/basecamp/hey-cli for the latest instructions
gem install hey-clihey auth loginhey auth status --json
hey box imbox --json --limit 1If both return JSON, you're good. The Postman will auto-detect hey on PATH.
hey: command not found: ensure the gem bin directory is on your PATH. Check withgem environmentand add<gem_dir>/binto PATH.- Auth expired: run
hey auth refreshorhey auth login. - General issues: run
hey doctorfor diagnostics.
The Postman agent uses the Google Workspace CLI (gws) to interact with Gmail and Google Calendar. This gives the agent full read/write access — searching, reading, archiving, deleting, labelling emails, and creating/modifying calendar events.
The Anthropic-hosted MCP servers for Gmail and Calendar are read-only (plus draft creation). They cannot archive, delete, label, or send emails. The Google Workspace CLI wraps the full Google API surface, giving the Postman agent the ability to actually manage your inbox — not just read it.
- Node.js (v18+) and npm
- Optional: Google Cloud SDK (
gcloud) — only needed if you prefer CLI-based project setup instead of the Cloud Console UI - A Google account (personal Gmail works fine)
npm install -g @googleworkspace/cliVerify:
gws --versioncurl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-darwin-arm.tar.gz
tar -xf google-cloud-cli-darwin-arm.tar.gz
./google-cloud-sdk/install.shcurl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-darwin-x86_64.tar.gz
tar -xf google-cloud-cli-darwin-x86_64.tar.gz
./google-cloud-sdk/install.shSee https://cloud.google.com/sdk/docs/install
After installation, restart your terminal so the new PATH takes effect. If you don't want to restart, you can source your profile manually:
source ~/.zshrc # or ~/.bashrcVerify:
gcloud --version- Go to https://console.cloud.google.com/
- Create a new project (e.g.,
my-vault) - Note the project ID — you'll need it below
- Go to APIs & Services > OAuth consent screen in your project:
https://console.cloud.google.com/apis/credentials/consent?project=YOUR_PROJECT_ID - Choose External as User Type (the only option for personal Gmail accounts)
- Fill in the required fields:
- App name: anything (e.g., "Vault CLI")
- User support email: your email
- Developer contact: your email
- Click through the remaining screens (scopes, test users) and save
Important — Add yourself as a test user:
- Back on the OAuth consent screen, find the Audience section
- Under Test users, click Add users
- Enter your Gmail address and save
This step is easy to miss and you will get an "Access blocked" error without it. Unverified apps can only be used by explicitly listed test users.
- Go to APIs & Services > Credentials:
https://console.cloud.google.com/apis/credentials?project=YOUR_PROJECT_ID - Click Create Credentials > OAuth client ID
- Application type: Desktop app
- Name: anything (e.g., "gws-cli")
- Click Create
- Copy the Client ID and Client Secret
gws auth setupWhen prompted, paste your Client ID and Client Secret.
gws auth loginThis opens an interactive scope selector. Deselect everything and only keep:
https://www.googleapis.com/auth/gmail.modify— read/write/archive/delete emailshttps://www.googleapis.com/auth/gmail.send— send emails and draftshttps://www.googleapis.com/auth/calendar.events— create/update/delete calendar eventshttps://www.googleapis.com/auth/calendar.calendarlist.readonly— list available calendars
Optionally also keep:
https://www.googleapis.com/auth/drive— if you want Drive accesshttps://www.googleapis.com/auth/tasks— if you want Tasks accessopenid,userinfo.email,userinfo.profile— for profile info
Do not select all 85+ scopes. Google will reject the auth request for unverified apps with too many scopes, especially admin/workspace scopes that aren't available to personal accounts.
After selecting scopes, a browser window opens. Sign in with your Google account. You may see a "This app isn't verified" warning — click Continue (this is expected for personal-use OAuth apps).
On success you'll see:
Authentication successful. Encrypted credentials saved.
Test Gmail access:
gws gmail users messages list --params '{"userId": "me", "maxResults": 3}'Test Calendar access:
gws calendar events list --params '{"calendarId": "primary", "timeMin": "2026-03-01T00:00:00Z", "maxResults": 3}'Both should return JSON results.
If your .mcp.json still has the Anthropic-hosted Gmail/Calendar servers, you can remove them. Remove only the gmail and google-calendar entries from your .mcp.json, leaving any other MCP servers intact.
If .mcp.json contained only those two servers, you can delete the file entirely.
You haven't added yourself as a test user. Go back to Step 4, point 5-7.
You selected too many scopes, including ones not available to personal Gmail accounts (e.g., admin, classroom, chat). Re-run gws auth login and select only the scopes listed in Step 7.
The Google Cloud SDK isn't on your PATH. Restart your terminal. If you don't want to restart, run:
source ~/google-cloud-sdk/path.zsh.inc # adjust path if installed elsewhereRestart your terminal first — this resolves most cases. If it still fails, the npm global bin directory may not be on your PATH. Check with:
npm config get prefixAnd ensure <prefix>/bin is in your PATH.
This is normal — gws stores encrypted credentials in your OS keyring. Not an error.
The Postman agent calls gws commands via the Bash tool. Key operations:
| Operation | Command |
|---|---|
| Search inbox | gws gmail users messages list --params '{"userId": "me", "q": "..."}' |
| Read email | gws gmail users messages get --params '{"userId": "me", "id": "ID", "format": "full"}' |
| Read thread | gws gmail users threads get --params '{"userId": "me", "id": "ID"}' |
| Mark as read | gws gmail users messages modify --params '{"userId": "me", "id": "ID"}' --json '{"removeLabelIds": ["UNREAD"]}' |
| Archive | gws gmail users messages modify --params '{"userId": "me", "id": "ID"}' --json '{"removeLabelIds": ["INBOX"]}' |
| Trash | gws gmail users messages trash --params '{"userId": "me", "id": "ID"}' |
| List events | gws calendar events list --params '{"calendarId": "primary", "timeMin": "...", "timeMax": "..."}' |
| Create event | gws calendar events insert --params '{"calendarId": "primary"}' --json '{"summary": "...", ...}' |
| Create draft | gws gmail users drafts create --params '{"userId": "me"}' --json '{"message": {"raw": "BASE64"}}' |
All commands return JSON. The --params flag is for URL/query parameters; --json is for the request body.