MCP Headless Gmail Server provides a way to access Gmail functionality without requiring local credential setup or browser access. Built by baryhuang, it enables any client to complete the OAuth flow independently and then pass credentials as context to the server, creating a complete separation between credential storage and implementation. The server supports getting recent emails, sending messages, and handling token refresh operations through a clean API that works in containerized environments. This implementation is particularly valuable for headless or remote applications where traditional Gmail access methods requiring local file access or browser interaction are not feasible.
暂无评论. 成为第一个评论的人!
登录以参与讨论
Refreshes the access token using either the full credentials (access token, refresh token, client ID, client secret) or just the refresh token, client ID, and client secret if the access token has expired.
Retrieves recent emails with the first 1k characters of each email body. Parameters: google_access_token (string), max_results (integer), unread_only (boolean).
Retrieves the full content of an email in chunks for messages larger than 1k characters. Parameters: google_access_token (string), message_id (string), offset (integer).
Sends an email through Gmail. Parameters: google_access_token (string), to (string), subject (string), body (string), html_body (string).