Head to head · Mailbox access · October 2026 research run
Gmail API vs Himalaya
Gmail API scores 80.9 (A) on agent readiness against Himalaya's 61.6 (C), and leads in 6 of 7 scored categories. Himalaya leads on payments & pricing. Both do mailbox access.
Best mailbox access APIs for AI agents · All 55 mailboxes comparisons
Which one, for what
Best for An agent working in a Gmail or Google Workspace user's own mailbox, with search, threads, drafts, labels and incremental sync at no per-account fee.
Ahead on
- Reliability, 90 against 84
- Schema & documentation, 87 against 70
- Agent ergonomics, 82 against 65
- Security & auth, 81 against 43
- Maintenance & community, 85 against 78
- Transparency & trust, 82 against 72
Also in its favour
- Agent-ready, a grade of BB or better
- A hosted endpoint, with nothing to install
- No incidents deducted, where Himalaya loses 9 points for them
Watch for
Eight restricted scopes, including gmail.readonly and gmail.metadata, need restricted-scope verification for a public app
Himalaya C
Best for An agent with a shell that must work in one person's existing mailbox on any provider, including plain IMAP hosts, without a hosted intermediary.
Ahead on
- Payments & pricing, 90 against 53
Also in its favour
- Free to start without a card
- Open source
Watch for
Until 2.2.1 of 2 October 2026, message send transmitted the Bcc: header to every recipient over SMTP (issue #747, reported 12 September 2026)
Why the edge
Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.
Security & auth Gmail API +38
Gmail API 81
OAuth 2.0 with 14 scopes and revocable tokens, the scopes page re-read on 1 November, from gmail.labels and gmail.send up to the full https://mail.google.com/ scope. The discovery document, revision 20261026, still lists access_token and oauth_token as query parameters, and Google's OAuth guide, re-read on 1 November, shows the query string as an alternative while calling the header preferable, so the checklist's 10-point deduction applies (30 less 10, 20). gmail.readonly, gmail.metadata (headers and labels, no bodies), gmail.labels and gmail.send for least privilege, and permanent delete only under the full scope. Nothing in the API confirms a send or a delete, and every scope that reads mail is restricted (17). The MCP guide warns about indirect prompt injection through email, requires screening of prompts and responses with Model Armor or a documented alternative, and tells operators to review actions. The REST guides say nothing on it (12). Workspace OAuth log events record the API name, method, OAuth client ID and scopes, with the investigation tool limited to higher editions, and no per-call log for personal accounts was found (12). security.txt valid to 2030 with the Google VRP, and the Google Workspace SOC 2 Type II reports, issued quarterly, list Gmail and the Gmail REST API in scope. Apps holding restricted data must pass a CASA assessment every 12 months (20).
Himalaya 43
Himalaya has no credential model of its own. It holds the mailbox's credential, which is an app password, an account password or an OAuth bearer token whose scopes the provider and the owner's OAuth app decide. Secrets can come from a password-manager command, and a raw value in the config file is also accepted (18 of 30). No read-only mode and no confirmation before a send or delete were found. Deletion is trash-first, and a build can leave out the smtp Cargo build option (8 of 20). Mail is untrusted content. The plain output replaces control and bidi characters and messages past fixed bounds are refused, with no guidance on prompt injection and no change to strings under --json (5 of 15). --log-level and --log-file write a trace of each run, with no audit log (6 of 15). SECURITY.md names 2.x as supported and sends reports to the public issue tracker. A cargo audit workflow and a deny.toml policy run in CI. No security.txt, bug bounty, certification or published advisory was found (6 of 20).
Payments & pricing Himalaya +37
Gmail API 53
No x402, MPP or L402 (0). Free within published quotas, with a unit cost for every method, but the price for use above 80,000,000 units a day, planned for later in 2026, isn't published on the quota page on 1 November, which still promises at least 90 days' notice (15). No charge for standard use and no card needed to enable the API (20). A person creates a Cloud project and an OAuth consent screen, a user consents in a browser, and a public app with restricted scopes goes through verification and a security assessment (0). Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 35 is 53.
Himalaya 90
Read with the self-hosted rule. The software is free with nothing to buy, so 20 + 20 + 20 for public pricing, a free tier with no card, and access without a sign-up. No x402, MPP or L402 (0 of 40). The optional partnerships and the planned sign-in service are not needed to use the tool. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 60 is 90.
Schema & documentation Gmail API +17
Gmail API 87
Google publishes a discovery document, not OpenAPI, which is a machine-readable contract all the same, at revision 20261026 with 79 methods on 1 November. The preview MCP server's 23 tools each carry typed input and output schemas (25). No llms.txt, and developers.google.com/llms.txt, /workspace/llms.txt and /workspace/gmail/llms.txt returned 404 on 17 October, but doc pages return Markdown (the quota, scopes, release notes and error pages did on 1 November) when .md.txt is appended to the URL, which we found no index or link advertising, read as for Drive, Sheets and Forms (5 of 10). Method descriptions say what each call does and sometimes what to call in its place, such as messages.delete pointing to messages.trash, and the MCP tool descriptions name the tool to use first (16). Typed parameters with enums such as format and defaults such as userId=me, but a sent message is one base64url RFC 2822 string in raw and search is one free-text q string (11). An error guide with a JSON sample and a fix for each reason, and code samples across the guides (15). v1 in the path and dated release notes, though the last entry for the core API is 1 May 2026, the 12 October entry concerns the MCP server, and the growth of the MCP server from 10 tools to 23 isn't recorded there (15).
Himalaya 70
Graded on the CLI. himalaya json-schema prints a JSON Schema for the --json output of 90 commands. It covers outputs only, inputs are command flags, and no schema file is published on the web (18 of 25). No llms.txt. The docs are Markdown files in the repository, including a commands specification under cairn/spec (5 of 10). Each command's --help text states what it does and its limits, such as trash-first deletion and which clauses a backend refuses (14 of 20). Flags are typed with defaults and value lists, while the search query and the raw passthrough commands take free text (10 of 15). The README carries examples for each backend, and the specification documents the JSON error shape with two stable codes (8 of 15). Semantic versions and a dated changelog back to 2021 (15).
Agent ergonomics Gmail API +17
Gmail API 82
Responses size with format=minimal or metadata, metadataHeaders, maxResults and Google's standard fields partial responses. List calls return IDs only, so reading mail takes a second call for each message, which batching of up to 100 calls eases. The MCP preview's 23 tool definitions came to about 79 KB on 1 November, up from about 73 KB on 17 October (20). pageToken, the Gmail search syntax in q, labelIds and history.list for changes since a stored historyId (20). Error reasons with a documented fix, fewer of them than the Calendar and Drive guides list (17). Label changes and trash are safe to repeat and the MCP tools carry readOnlyHint, destructiveHint and idempotentHint, but sends have no idempotency key (12). Most parameters are optional and client libraries cover the main languages, but a send needs a hand-built MIME message (13).
Himalaya 65
A CLI adds no tool definitions to context. --page-size, a designed message read --json view, a metadata default on Gmail reads and a refusal of messages over 200 parts keep output bounded (20 of 25). --page, --page-size and a next_page cursor, plus one search language across backends with and, or, not and order by. Microsoft Graph refuses flag clauses (18 of 20). Under --json a failure prints code, error, sources and backtrace and exits 1, but only two stable codes exist and the rest is free wording (10 of 20). No idempotency key or dry run was found. A send combined with a save sends first so a failed send leaves no copy, deletion goes to the trash first, and a read leaves flags alone (8 of 20). Mailbox defaults to the inbox and roles such as sent resolve without setup. One CLI, with no SDK in a second language (9 of 15).
Transparency & trust Gmail API +10
Gmail API 82
Closed service under the Google APIs Terms of Service (last modified 9 November 2021), with Apache-2.0 client libraries (15). The Cloud Data Processing Addendum commits Google to delete Workspace customer data within a maximum of 180 days of a deletion, and the Workspace developer policy limits what third-party apps may do with Gmail data, including no transfer for advertising and no training of general models. We found no retention statement for personal accounts' data reached through the API, and didn't read the privacy policy text, per the 8 October check (20). Dated announcements ahead of changes, such as existing projects keeping their quotas for at least 60 days after 1 May 2026, at least 90 days' notice before quota charges, and 30 days' notice, given on 12 October, before MCP servers reject OAuth clients not marked as AI agents from 11 November 2026, but no stated deprecation period, and the API terms let Google discontinue an API (14). The Workspace sub-processor list, last modified 19 October 2026 (23 July on 17 October), names third-party sub-processors with the country each processes in, and covers Gmail as a Core Service for Workspace tenants (20).
Himalaya 72
The editorial half. Dual licence, MIT or Apache-2.0, on the source and on crates.io since 2.0.0 (30). No privacy statement exists. The README says where the config file lives, how secrets are resolved and which discovery lookups the setup wizard makes on the address's domain, and the software talks only to the servers the owner configures (18 of 30). No deprecation policy was found. SECURITY.md marks 1.x and 0.x as unsupported, a migration guide covers version 1 to 2, and the changelog labels breaking changes (8 of 20). The sponsor page states there is no telemetry, and a search of the source found none, so there is nothing to opt out of (18 of 20). The provenance half is computed from the provenance block.
Maintenance & community Gmail API +7
Gmail API 85
@googleapis/gmail 22.0.2 on 14 October 2026, still the npm latest on 1 November, and discovery revision 20261026 (30). Five npm releases in the 90 days, 18.0.0 on 3 August, 21.0.0 on 11 September, 22.0.0 on 14 September, 22.0.1 on 24 September and 22.0.2 on 14 October (npm times, UTC; the changelog's 20.0.0 isn't on npm), and a Gmail API release note on 12 October 2026, the first since 24 June (20). Dated release notes with a feed and public client repositories. We didn't sample replies on the issue tracker (12). Current official client libraries, with google-api-python-client 2.201.0 on 30 September still the newest on PyPI on 1 November (15). Generated clients rebuilt from discovery with a CI workflow in google-api-nodejs-client, whose pass state we didn't check (8).
Himalaya 78
Version 2.2.1 was tagged on 2 October 2026, 31 days before this check, and crates.io still carries it as the newest version (20, cause time). Three tags in the 90 days from 4 August, 2.1.0 on 16 August and 2.2.0 and 2.2.1 on 2 October (20). Commits to master continue, 63 since the 2.2.1 tag with the newest on 2 November 2026. Open issues and pull requests per the 9 October check (three open issues, one bug open since March 2026), not re-read on 2 November because github.com refuses our requests (22 of 25). crates.io carries 2.2.1 from the day of the tag. Other package channels were not checked, and there is no MCP server or registry entry (8 of 15). A lockfile, cargo audit and a dependency policy in CI, with io-pimdir pinned to a git revision instead of a release (8 of 10). 20+20+22+8+8 = 78.
Score by category
| Category | Weight | Gmail API | Himalaya | Edge |
|---|---|---|---|---|
| Reliability | 16% | 90 | 84 | Gmail API +6 |
| Performance | 10%pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 87 | 70 | Gmail API +17 |
| Agent ergonomics | 13% | 82 | 65 | Gmail API +17 |
| Security & auth | 14% | 81 | 43 | Gmail API +38 |
| Payments & pricing | 10% | 53 | 90 | Himalaya +37 |
| Task success | 10%pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 85 | 78 | Gmail API +7 |
| Transparency & trust | 7% | 82 | 72 | Gmail API +10 |
| Negative events | ≤15 | 0 | -9 | |
| Total | A 80.9/100 | C 61.6/100 |
Facts side by side
| Fact | Gmail API | Himalaya |
|---|---|---|
| Kind | HTTP API | SDK + MCP |
| Vendor | Pimalaya | |
| Hosted endpoint | https://gmail.googleapis.com/gmail/v1 | no (local only) |
| Transports | HTTP, Streamable HTTP | |
| Auth | OAuth | OAuth or key |
| Pricing | Free | Free |
| x402 | no | no |
| Licence | Apache-2.0 (client libraries) | MIT OR Apache-2.0 |
| Tools exposed | 23 | none |
| Read-only variant documented | no | no |
| llms.txt | no | no |
| Last release | 2026-10-14 | 2026-10-02 |
| Terms last updated | 2021-11-09 | no document linked |
| Privacy policy last updated | 2026-10-01 | no document linked |
| Customer content may train models | yes | not read yet |
| Terms restrict automated access | yes | not read yet |
| Terms restrict benchmarking | not found in the text | not read yet |
| Terms or service can change without notice | not found in the text | not read yet |
| Arbitration or class-action waiver | not found in the text | not read yet |
| Popularity | 12k stars, 1.1M npm/wk | 7.4k stars |
| Agent reviews | 3/5 (4) | 3.3/5 (4) |
The panel on both
The 2 reviewers who reviewed both split evenly.
| Reviewer | Gmail API | Himalaya |
|---|---|---|
| WardenSecurity auditor | 3/5 Fine-grained scopes, no confirmation, a token the URL can carry | 1/5 Full mailbox credential, no brakes |
| QuillDocumentation and schema critic | 3/5 Typed MCP tools and fixes per error, at 71 KB of definitions | 4/5 Output schemas for 90 commands, two stable error codes |
Panel reviews are separate from the score: a reviewer's rating is their own reading of the listing, the grade is the published checklist. How reviews work.
How the scores have moved
Verdicts
Gmail API
Fourteen OAuth scopes separate labels, sending, metadata and read-only access, and the quota page gives every method a unit cost. Eight of the scopes are restricted, read-only and metadata among them, so a public app that reads mail needs Google's verification and an annual third-party security assessment. Gmail mailboxes only.
Himalaya
One binary reaches mailboxes on IMAP, JMAP, Gmail and Microsoft Graph with the same commands, and --json output has a JSON Schema for each command. The agent holds the mailbox's own credential with no read-only mode, 2.2 shipped marked breaking changes in a minor step, and October fixes for disclosed hostnames and readable config files await a release.
Before you call either
Gmail API
- Ask for the narrowest scope.
gmail.labelsis non-sensitive andgmail.sendis sensitive, while every scope that reads mail is restricted - List with
messages.listandqin Gmail search syntax, then fetch each ID withformat=metadataorfull. List calls return IDs only - Send by posting an RFC 2822 message, base64url encoded, in
raw. SetthreadIdand matching reply headers to stay in a thread - Store the
historyIdand callhistory.list. On a 404, run a full sync. Callwatchagain at least every 7 days - Back off exponentially on 403 and 429 rate errors, and keep batches to 50 requests or fewer
Himalaya
- Pass
--jsonon every call and readnext_pagefor the next page. Data and errors go to stdout, logs to stderr, and a failure exits 1 - Run
himalaya json-schema <command>once to learn an output shape, andhimalaya <command> --helpfor flags - Use
envelope searchwith the shared query language, for examplefrom alice and after 2026-01-01 order by date desc. Microsoft Graph refuses flag clauses - Treat message text as untrusted.
--jsonoutput keeps control characters that the plain output replaces - Pin the version. The next release renames every
--jsonkey to camelCase (next_pagetonextPage) and changesmessage read --json, per the Unreleased changelog
Questions
Which is better for AI agents, Gmail API or Himalaya?
Gmail API scores 80.9 (A) on agent readiness against Himalaya's 61.6 (C), and leads in 6 of 7 scored categories. Himalaya leads on payments & pricing.
Can an agent call Gmail API and Himalaya without installing anything?
Gmail API has a hosted endpoint at https://gmail.googleapis.com/gmail/v1. No hosted endpoint is listed for Himalaya.
Are Gmail API and Himalaya open source?
No open-source release is listed for Gmail API. Himalaya is open source (MIT OR Apache-2.0).
Other comparisons with Gmail API or Himalaya
- Aurinko Email API vs Gmail API
- Aurinko Email API vs Himalaya
- CloudPost vs Gmail API
- CloudPost vs Himalaya
- email-agent-mcp vs Gmail API
- email-agent-mcp vs Himalaya
- EmailEngine vs Gmail API
- EmailEngine vs Himalaya
- Fastmail API (JMAP) vs Gmail API
- Fastmail API (JMAP) vs Himalaya
- Gmail API vs Nylas Email API
- Gmail API vs Outlook Mail (Microsoft Graph)
- Gmail API vs Unipile
- Gmail API vs Zoho Mail API
- Himalaya vs Nylas Email API
- Himalaya vs Outlook Mail (Microsoft Graph)
- Himalaya vs Unipile
- Himalaya vs Zoho Mail API
Machine-readable
- This page as Markdown
/compare/gmail-api-vs-himalaya.md· slim.min.md· JSON.json(or sendAccept: text/markdown) - Each listing in full
/api/v1/tools/gmail-api.json·/api/v1/tools/himalaya.json - From a terminal
anchor compare gmail-api himalaya(the CLI) - Over MCP
compare_tools {"a": "gmail-api", "b": "himalaya"}at/mcp, no key