Claude Code as a back-office: wiring Drive, Gmail and Trello to actually run your company

Claude Code as a back-office: wiring Drive, Gmail and Trello to actually run your company

·9 min read·Updated on June 11, 2026

Three tools, three versions of the truth

In a small company, reality is split across three places. Drive holds the documents — what you produced. Gmail holds the commitments — what you said, promised, sent, received. Trello holds the intentions — what you think you're working on. And those three versions always diverge.

Google Drive: rclone rather than MCP

First instinct: look for an MCP server for Drive. Wrong instinct. For bulk document management (moving, renaming, syncing hundreds of files), a conversational protocol is the worst possible tool. rclone has done this for ten years, server-side, with transfers that never touch your machine.

rclone config   # remote "company" of type drive, OAuth in the browser

The empty My Drive trap

After authentication:

rclone lsd company:
# ... nothing.

Enough to conclude the account has access to nothing. Big mistake: the documents live elsewhere, in two spaces rclone doesn't show by default.

# Folders shared with the account
rclone lsd company: --drive-shared-with-me

# Shared Drives (formerly "Team Drives")
rclone backend drives company:
# → [{"id": "0AxXXXXXXXXXXXX", "name": "DOCUMENTS"}]

# And to work inside them, the connection-string syntax:
rclone tree "company,team_drive=0AxXXXXXXXXXXXX:" --level 2

In a company using Shared Drives (and every company should), everyone's My Drive is a desert. Concluding "the Drive is inaccessible" at this point means missing everything.

Reorganising 107 files without downloading a single one

The inventory wasn't pretty: 60% of files piled into a "to sort" folder, duplicates, four versions of the same strategic document, and names containing line breaks inside the filename (thanks, Google Docs exports).

The reorganisation was pure server-side: a script mapping each file to a clean kebab-case tree, using rclone moveto. 107 moves, zero bytes downloaded. And since the Drive tree now mirrors the local git repo exactly, syncing is one line:

rclone copy "company,team_drive=0AxXXXXXXXXXXXX:" ./repo-docs/ -u

The -u (update) isn't decorative: it never overwrites a newer local file. When someone is editing a document in Word, they win, not the Drive.

Handy, rclone link returns a share URL. Except that URL works because the command just created an "anyone with the link" permission on the file. A silent public share on an internal document. Spotted an hour later thanks to the "External" badge in the Drive interface.

The fix: delete the permission via the API, then a full permission audit across the Drive's 209 items (the API starts returning 403 rate-limiting after ~100 calls, plan a backoff). Verdict: one other publicly exposed file, a forgotten legacy share. Revoked too.

Rule since burned into Claude's memory: never rclone link, never an anyone permission. To reference a file, build the URL from its ID — it only works for Drive members.

Gmail: Google's official MCP… and its trap

Google shipped its official Gmail MCP server (https://gmailmcp.googleapis.com/mcp/v1). On paper it's the royal road: clean OAuth, search and draft tools, no third-party code with full mailbox access.

GCP-side configuration: enable gmail.googleapis.com and gmailmcp.googleapis.com, create a "Web application" OAuth client with a fixed-port redirect URI (Claude Code uses a random port by default, Google demands an exact match):

claude mcp add --transport http \
  --client-id YOUR_CLIENT_ID --client-secret \
  --callback-port 8765 \
  gmail https://gmailmcp.googleapis.com/mcp/v1

Authenticate via /mcp, the browser opens, all good. And then:

The caller does not have permission

On every tool. Even list_labels.

The scope that poisons everything

Google's MCP server declares five scopes, including gmail.metadata. And the Gmail API has a non-negotiable rule: as soon as a token carries that scope, the q search parameter and the FULL format are refused. Even if the token also carries gmail.readonly, which allows them. The most restrictive scope wins, and the token is poisoned at the root.

Scope pinning in the Claude Code config (oauth.scopes, available since v2.1.64) doesn't save you: the running session ignores it and re-requests all five scopes.

The fix that works: bypass the MCP and run your own OAuth flow with minimal scopes. Forty lines of Python — a local HTTP listener on the callback port, the authorisation URL with scope=gmail.readonly and nothing else, access_type=offline to get a refresh token, code exchange, save.

url = "https://accounts.google.com/o/oauth2/v2/auth?" + urlencode({
    "client_id": CLIENT_ID,
    "redirect_uri": "http://localhost:8765/callback",
    "response_type": "code",
    "scope": "https://www.googleapis.com/auth/gmail.readonly",
    "access_type": "offline",
    "prompt": "consent",
})

The resulting token does exactly what you ask: search, full read, attachments, over direct REST calls. A second token adding gmail.compose unlocks draft creation, and the refresh token makes it permanent.

What Gmail reveals when you actually dig

Attachments. A has:attachment filename:pdf OR filename:docx query inventoried 46 messages containing documents, 38 of them files absent from the Drive: consultancy studies, template applications from funders, signed agreements. All sleeping inside threads.

Ghost drafts. While checking a grant application's progress, a troubling detail on the "Complete application submitted" email: labelIds: ['DRAFT']. No recipient, no attachments. The application everyone believed submitted had never left.

Bounces. The query worth its weight in gold:

from:(mailer-daemon OR postmaster) OR subject:("Delivery Status Notification")

21 results. Twenty-one emails that never arrived, with nobody having processed the failure notifications. Among them: an honour-loan application (wrong address), a first contact with a hospital reference centre (domain migrated), a grant request (dead generic mailbox). Actions counted as done that had never existed for the recipient.

A sent email isn't a delivered email. That check is now systematic in every audit.

Trello: the simplest of the three

No official MCP (Atlassian never shipped one for Trello), but delorenj's community server is solid:

claude mcp add trello -s user \
  -e TRELLO_API_KEY=xxx -e TRELLO_TOKEN=xxx \
  -e TRELLO_BOARD_ID=xxxxxxxx \
  -- npx -y @delorenj/mcp-server-trello

The API key is generated at trello.com/power-ups/admin (create a Power-Up, generate the token by hand). No OAuth: the token grants access to every board on the account.

The coherence audit: where the three sources meet

The board showed 9 "in progress" cards and 15 "waiting". The mailbox told a different story. The verification logic, card by card:

The outcome:

  • 4 "in progress" cards whose action had been finished for weeks
  • 3 "waiting" cards actually unblocked: the awaited certificate had arrived, the contact had replied
  • 1 card moved to "done"… wrongly, since the email had bounced. Corrected the other way once bounce checking entered the loop
  • 4 missing cards for genuinely real events: a contract signed via Docusign, a meeting to prepare, the famous never-sent draft

Every card move comes with a sourced comment ("email sent on X to Y, reply received on Z") and every card Claude creates carries a [CLAUDE] prefix. You always know who wrote what.

The rules that make the system liveable

Wiring an AI into a company's mailbox and documents doesn't happen without guardrails:

  1. No automatic sending. Claude writes drafts, full stop. Emails wait for a human to read them and press the button.
  2. No public documents. No rclone link, no anyone permission, permission audit on every pass.
  3. Traceability everywhere. [CLAUDE] prefix on cards, sourced comments, automatic creation date noted.
  4. Minimal scopes. gmail.readonly to read, gmail.compose for drafts. No gmail.send. What a token doesn't allow can't go wrong, even on a hallucination.
  5. Memory compounds. Every solved trap (the poisoned scope, the empty My Drive, the dead addresses) is recorded in Claude Code's persistent memory.

The last point is the most underrated. The difference between a gadget and a management tool is that by the third audit, Claude knows which addresses bounce, the sync procedure, the naming conventions and the house rules. It doesn't rediscover, it verifies.

What it changes

One morning of setup, two thirds of it debugging OAuth. And since then: "sync the Drive", "any undelivered emails?", "is the board's progress consistent?", "pre-draft the follow-ups". Sentences that produce verifiable work in minutes.

The most valuable part isn't the time saved on filing, it's what cross-referencing surfaces: the gaps between what you believe and what is. The draft application, the 21 bounces, the lying cards — none of those problems was visible from inside a single tool. You had to sit in the middle.

ShareLinkedInXBluesky

Related articles