DEV Community

Daksh Gargas
Daksh Gargas

Posted on

Google Docs + AI Coding Assistants: A Frustrating Gap (and How it has been fixed)

Managers love Google Docs.

Devs love Markdown.

And AI agents? They love MCP.

So what happens when your manager drops a Google Doc link in Slack and says "here's the spec, build it"? You paste it into Claude Code and... nothing useful happens.

The cycle

The Problem

Google's built-in MCP integrations for Drive are, to put it politely, not great. Here's what typically happens:

  1. You paste a Google Docs URL into your AI assistant
  2. It tries the Google Drive MCP and gets back raw text with \n\n everywhere — no headings, no formatting, no structure
  3. Or it fails entirely with permission errors, scope issues, or auth that expired 20 minutes ago
  4. You give up and manually copy-paste the doc content

This is 2026. We have AI assistants that can architect entire systems, but they can't read a Google Doc properly.

The core issue: LLMs understand markdown. Headings give them document structure. Bold text signals emphasis. Tables stay readable. Lists stay organized. But Google Drive's API returns either raw JSON or flat plaintext — neither is what an LLM actually wants.

The Solution

gdocs-to-md-mcp — a local MCP server that fetches Google Docs and converts them to clean markdown. Headings, bold, italic, tables, lists, links — all preserved.

One command to set up:

npx gdocs-to-md-mcp setup
Enter fullscreen mode Exit fullscreen mode

The interactive wizard walks you through everything — GCP project, OAuth credentials, API enablement, Google sign-in — with clickable links that take you to the exact right page. No hunting through Cloud Console. It even auto-configures Claude Code when it's done.

How It Looks

Once set up, just paste a Google Docs URL:

"Read this doc and summarize the key decisions: https://docs.google.com/document/d/1abc.../edit"

Claude calls read_google_doc, gets clean structured markdown, and actually understands the document — sections, emphasis, tables, all of it. Compare that to the raw \n\n-delimited text blob from the default Google Drive integration. Night and day.

Three tools, nothing more:

  • read_google_doc — URL or doc ID in, markdown out
  • search_google_docs — find docs by keyword
  • list_recent_docs — see what's been updated recently

No 80-tool mega-server. No Gmail. No Calendar. Just Google Docs to markdown, done right.

Try It

npx gdocs-to-md-mcp setup
Enter fullscreen mode Exit fullscreen mode

Works with Claude Code, Cursor, Windsurf, or any MCP client.

Install globally with npm install -g gdocs-to-md-mcp or just run it directly with npx — your call.

But doesn't Google have a Workspace CLI?"

Yes — Google recently released an official Workspace CLI that covers Drive, Docs, Sheets, and more. But two things set gdocs-to-md-mcp apart:

  1. Markdown, not JSON. Their CLI returns raw API JSON — a 500-line nested tree of StructuralElement objects. gdocs-to-md-mcp converts that into clean markdown with headings, tables, lists, and formatting preserved. LLMs can actually read it.

  2. Setup wizard. One command (npx gdocs-to-md-mcp setup) walks you through OAuth credentials, API enablement, and MCP client configuration with clickable links. No Cloud Console scavenger hunts.

GitHub: github.com/D4G4/gdocs-to-md-mcp
npm: npmjs.com/package/gdocs-to-md-mcp

Top comments (0)