exfu-multiaccount
OfficialProvides tools for searching and reading Gmail messages, managing drafts, and handling attachments, without sending messages.
Provides tools for listing, creating, updating, and deleting calendar events while suppressing attendee emails.
Provides tools for appending and replacing text in Google Docs documents.
Provides tools for searching and reading files in Google Drive, exporting Docs, Sheets, and Slides to text, and moving files to trash.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@exfu-multiaccountsearch all my accounts for unread emails about invoices from last week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
exfu-multiaccount
exfu-multiaccount is a local MCP server that gives an AI assistant explicit,
account-routed access to Gmail, Google Drive, and Google Calendar across more
than one Google account. Each account has a human alias; credentials remain in
a separate local token file and are never returned by a tool.
Install and build
Requirements: Node.js and npm.
npm install
npm run build
npm run bundlenpm run bundle refreshes the self-contained files shipped with the plugin.
Related MCP server: Gmail & Calendar Multi-Account MCP Server
Create a Google OAuth client
Open the Google Cloud Console and select or create a project.
Enable the Gmail, Google Drive, Google Docs, and Google Calendar APIs.
Configure the OAuth consent screen for your use.
Create an OAuth client ID with application type Desktop app.
Download the client-secret JSON file to a private local location.
The server requests exactly these Google OAuth scopes:
https://www.googleapis.com/auth/gmail.readonlyhttps://www.googleapis.com/auth/gmail.composehttps://www.googleapis.com/auth/drivehttps://www.googleapis.com/auth/calendar.events
Gmail writes only create or delete drafts; the server has no email-send or message-delete tool. Calendar writes suppress attendee emails. Drive deletion moves files to the recoverable trash rather than permanently deleting them.
Configure
By default, local state is stored in ~/.exfu-multiaccount. Set
EXFU_MULTIACCOUNT_HOME to use another directory. Create config.json in that
directory:
{
"googleClientSecretPath": "/absolute/path/to/google-oauth-client.json"
}Account metadata is stored in accounts.json.
Token security
On macOS, each account's credentials are encrypted at
tokens/<alias>.json.enc with file mode 0600. The AES-256-GCM encryption key
is stored in macOS Keychain under service exfu-multiaccount and account
token-key; the key is never written to disk. Existing plaintext token files
are encrypted and removed when first read.
On non-macOS platforms, credentials use tokens/<alias>.json with mode 0600.
Set EXFU_MULTIACCOUNT_PLAIN_TOKENS=1 to use that plaintext store on macOS as
an explicit compatibility escape hatch.
Add and manage accounts
Add each Gmail account under a lowercase kebab-case alias. A browser opens for
Google authorization and redirects to an ephemeral loopback listener on
127.0.0.1.
node dist/cli.js add-account personal --info "Personal mail and household receipts"
node dist/cli.js add-account work --info "Employer account"
node dist/cli.js list-accounts
node dist/cli.js remove-account workRemoving an account deletes its registry entry and local token file. It does not revoke the OAuth grant at Google.
Every existing account must re-consent before the write tools can use the new
scope set. Rebuild, then re-authorize all accounts with
node scripts/reauth.mjs, or re-authorize one alias at a time:
npm run build
node scripts/reauth.mjs
node scripts/reauth.mjs personalClaude Code MCP configuration
After building, add this server to your Claude Code MCP configuration:
{
"mcpServers": {
"exfu-multiaccount": {
"command": "node",
"args": [
"<path-to-checkout>/dist/index.js"
]
}
}
}Install as a plugin
Install the beta plugin from the ExFu marketplace:
/plugin install exfu-multiaccount@exfu-marketplaceSee the plugin README for requirements, setup, the complete tool list, and beta status.
Restart Claude Code, then use these tools:
accounts_listandaccounts_addmanage account metadata and authorization.gmail_searchandgmail_get_messagesearch and read Gmail.drive_searchsearches Drive using Google Drive query syntax.drive_read_filereads text files and exports Docs, Sheets, and Slides to text formats; binary files are not downloaded.calendar_eventslists events from the account's primary calendar.
Read tools accept an account alias or "all" to fan out across configured
accounts. Results and per-account errors are tagged with the source alias.
Attachments
gmail_search_attachments finds attachments in one or all accounts and
returns one row per attachment. It supports case-insensitive filename globs,
MIME-type filters, optional inline attachments, and bounded text previews for
PDF, DOCX, and text attachments. gmail_search can also include attachment
metadata with includeAttachments; inline parts require includeInline.
gmail_get_attachment retrieves one attachment in text, save, or base64
mode. Text mode extracts PDF, DOCX, and text content and supports a character
limit. Save mode writes bytes to a caller-chosen local directory on the machine
running the server and refuses to overwrite by default. Base64 mode is capped
at 1 MiB. gmail_get_message can include inline parts with includeInline and
surface Google Drive file links with includeDriveLinks; Drive content is not
fetched. These features use the existing Gmail read scope, so no re-consent is
needed.
Write tools
drive_create_filecreates a Drive file and can convert uploaded text into a Google Doc.drive_update_filereplaces the content of a Google Doc or text file; Sheets, Slides, and binary files are rejected.docs_append_textappends text to the end of a Google Doc.docs_replace_textreplaces matching text in a Google Doc, with case-sensitive matching by default.calendar_create_eventcreates an event without emailing attendees.calendar_update_eventupdates an event without emailing attendees.gmail_create_draftsaves a new or threaded-reply draft and never sends it. Its optionalattachmentsarray accepts local file objects withpath, plus optionalfilenameandmimeTypeoverrides. Paths are resolved on the machine running the server; each draft supports at most 20 files and 20 MiB total attachment bytes.drive_trash_filemoves a file to Drive trash, where it remains recoverable.calendar_delete_eventdeletes an event without emailing attendees.gmail_delete_draftdeletes only a Gmail draft, never a message.
Every write tool requires one explicit account alias. "all" is rejected,
and each successful result includes the acting alias and account email.
The Docs edit tools act only on Google Docs and require no additional consent
beyond the scope set used by the other write tools.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA locally-hosted MCP server that integrates Gmail, Google Calendar, and Google Drive to provide AI-powered management of emails, events, and files. It enables tool-based interactions like sending emails, creating calendar events, and searching Drive files through clients like Cursor and Claude Desktop.-
- FlicenseNot gradedqualityBmaintenanceA local MCP server that connects multiple Google accounts to Claude Desktop, enabling unified email search and send, calendar events, and full CRUD on Google Docs, Sheets, and Forms.-
- AlicenseNot gradedqualityCmaintenanceA personal MCP server giving AI assistants natural-language control over Gmail, Drive, Calendar, Docs, and Sheets.MIT
- AlicenseBqualityAmaintenanceMCP server that gives AI agents direct access to Google services including Gmail, Calendar, Drive, and more, with multi-account OAuth support. Enables reading and sending email, managing calendar events, and interacting with Google files through natural language.603651MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ExFu/multiaccount'
If you have feedback or need assistance with the MCP directory API, please join our Discord server