Skip to content

Instantly share code, notes, and snippets.

@lee-fuhr
Created January 14, 2026 23:42
Show Gist options
  • Select an option

  • Save lee-fuhr/f541b1b4c3dfca7341c25285a25538b8 to your computer and use it in GitHub Desktop.

Select an option

Save lee-fuhr/f541b1b4c3dfca7341c25285a25538b8 to your computer and use it in GitHub Desktop.
Create and format Google Docs directly from Claude Code. 5-minute setup guide.

Claude Code → Google Docs

Create and format Google Docs directly from your terminal.

No more copy-pasting between ChatGPT and Docs. No more manual formatting. Just describe what you want and Claude builds the doc—with proper headings, styles, tables, the works.


Setup (5 minutes)

1. Install Claude Code

npm install -g @anthropic-ai/claude-code

2. Add the Google Docs MCP server

Edit (or create) ~/.claude/settings.json:

{
  "mcpServers": {
    "google-docs": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-server-google-docs"]
    }
  }
}

Already have MCP servers? Just add the "google-docs" block inside your existing "mcpServers" object.

3. Authenticate with Google

claude

First time you touch a Google Doc, Claude opens your browser for OAuth. One-time setup.


What you can do

Talk to Claude naturally:

You say Claude does
"Create a doc called Project Brief with..." Creates doc, adds content, applies formatting
"Read this doc: [URL]" Pulls content for review or editing
"Format this properly with headings" Applies Title, H1, H2 styles
"Add a table with these columns..." Inserts and populates tables
"Bold all the section labels" Batch formatting in seconds

Full capabilities: create, read, edit, format, comment, tables, images, Drive folder management.


Tips for best results

Be specific about formatting:

"Use native Google Docs styles—Title, Heading 1, Heading 2. No blank lines between sections. Sentence case everything."

Reference existing docs: Just paste the URL. Claude extracts the doc ID.

Go big: Claude can format an entire document in one shot. Don't be shy.


Example prompt

Create a Google Doc called "Q1 Planning" with:
- Title: Q1 planning
- Heading 1: Goals (then 3 bullet points)
- Heading 1: Timeline (then a table with Month and Milestone columns)

Use proper Google Docs styles. No manual line breaks.

Questions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment