Project not found.
Data Flow: gdocs-daily-mcp-remote
Data Flow: gdocs-daily-mcp-remote
Diagram
Flow 1: First-Time OAuth Authorization
Flow 2: Daily Note Retrieval (Happy Path)
Flow 3: Note Not Found
Components
| Component | Purpose | Connection |
|---|---|---|
| Claude.ai iOS | User interface — sends MCP tool calls | HTTPS to MCP remote via Tailscale funnel |
| gdocs-daily-mcp-remote | MCP server — translates tool calls to Google API requests | Starlette/Uvicorn on port 8000 in k8s |
| mcp-remote-auth | OAuth proxy — manages 3-party token dance | Library imported by the server (not a separate service) |
| Google Drive API | File search — finds documents by title | HTTPS to googleapis.com, authenticated via OAuth access_token |
| Google Docs API | Document retrieval — fetches document content | HTTPS to googleapis.com, authenticated via OAuth access_token |
| TokenStore (PVC) | Encrypted token persistence | Local file on PersistentVolumeClaim at /app/data |
Key Decisions
- Two Google APIs, not one. Google Drive API for search (files.list can filter by name and mimeType), Google Docs API for content retrieval (documents.get returns the structured body). Drive is the index, Docs is the content store.
- mcp-remote-auth is a library, not a sidecar. It's pip-installed and runs in-process. No inter-service communication for auth — it's all in the same pod.
- Token refresh is transparent. The
setup_client_for_requestcallback refreshes the Google access_token using the stored refresh_token before every tool call. Claude never sees token expiry. - MCP access_token is long-lived (1 year). The token Claude.ai stores doesn't expire frequently — it's our own token, not Google's. Google's refresh_token is managed server-side.
Related
arch-domain-gdocs-daily-mcp-remote— entity modelarch-deployment-gdocs-daily-mcp-remote— infrastructure topologystory-gdocs-daily-mobile-daily-review— user story