Google Docs MCP Server
Provides read-only access to Google Docs content, including retrieving full document text and listing accessible documents.
Enables listing and searching accessible Google Drive files (documents and spreadsheets) by query.
Provides read-only access to Google Sheets data, including spreadsheet metadata, sheet lists, and specific cell range data.
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., "@Google Docs MCP Serverlist my recent Google Docs"
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.
Google Docs MCP Server
An MCP (Model Context Protocol) server that provides read-only access to Google Docs and Google Sheets.
Features
Read Google Docs content
Read Google Sheets data
List accessible documents and spreadsheets
Search documents by query
Related MCP server: Google Drive MCP Server
Available Tools
Tool | Description |
| Get full content of a Google Doc by ID or URL |
| List accessible Google Docs with optional search |
| Get spreadsheet metadata and sheet list |
| Read data from a specific range |
| List accessible Sheets with optional search |
Setup
1. Create Google Cloud Credentials
Go to Google Cloud Console
Create a new project (or select an existing one)
Enable the following APIs:
Google Docs API
Google Sheets API
Google Drive API
Go to APIs & Services → OAuth consent screen
Select "External" user type
Fill in the required fields (app name, support email)
Add scopes:
docs.readonly,spreadsheets.readonly,drive.readonlyAdd your email as a test user
Go to APIs & Services → Credentials
Click Create Credentials → OAuth client ID
Select Desktop application
Download the JSON file
2. Install the Server
# Clone or navigate to the project
cd google-docs-mcp
# Place your downloaded credentials file in the project root
mv ~/Downloads/client_secret_*.json ./client_secret.json
# Install dependencies
bun install3. Authenticate
bun run authThis will:
Open your browser for Google login
Ask you to grant read-only access to Docs, Sheets, and Drive
Save the refresh token to
.credentials/tokens.json
4. Run the Server
The server supports two transport modes:
HTTP Mode (Default)
# Start with HTTP transport (default, port 12333)
bun run start
# Or explicitly
bun run start --http
# Custom port via environment variable
MCP_PORT=8080 bun run startStdio Mode
# Start with stdio transport (for MCP clients that use stdio)
bun run start --stdio5. Configure Your MCP Client
Claude Desktop (stdio mode)
Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"google-docs": {
"command": "bun",
"args": ["run", "/path/to/google-docs-mcp/src/index.ts", "--stdio"]
}
}
}Claude Code (stdio mode)
Add to your Claude Code MCP settings:
{
"mcpServers": {
"google-docs": {
"command": "bun",
"args": ["run", "/path/to/google-docs-mcp/src/index.ts", "--stdio"]
}
}
}HTTP Mode
For clients that support HTTP transport, connect to:
RPC endpoint:
POST http://localhost:12333/rpcHealth check:
GET http://localhost:12333/health
Environment Variables
Variable | Description | Default |
| Port for HTTP server | 12333 |
| Alternative port variable | 12333 |
Usage Examples
Once configured, you can ask your MCP client to:
"List my recent Google Docs"
"Read the document at https://docs.google.com/document/d/ABC123/edit"
"Show me the data in Sheet1 of my budget spreadsheet"
"Search for documents containing 'project proposal'"
File Structure
google-docs-mcp/
├── client_secret.json # Your Google OAuth credentials (git-ignored)
├── .credentials/ # Stored tokens (git-ignored)
│ └── tokens.json
├── src/
│ ├── index.ts # MCP server entry point
│ ├── auth/
│ │ └── oauth.ts # OAuth2 client management
│ ├── tools/
│ │ ├── docs.ts # Google Docs tools
│ │ └── sheets.ts # Google Sheets tools
│ └── types/
│ └── index.ts # TypeScript types
└── bin/
└── auth.ts # CLI authentication scriptRe-authenticating
If you need to re-authenticate (e.g., token expired or want to use a different account):
rm -rf .credentials
bun run authTroubleshooting
"Google credentials not found"
Make sure client_secret.json is in the project root directory.
"Not authenticated"
Run bun run auth to complete the OAuth flow.
"Access denied" errors
Ensure you've enabled the required APIs in Google Cloud Console and added your email as a test user in the OAuth consent screen.
Token expired
For apps in "Testing" status, refresh tokens may expire after 7 days. Re-run bun run auth to get a new token, or publish your app in Google Cloud Console for longer-lived tokens.
License
MIT
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 Servers
- FlicenseBqualityDmaintenanceEnables read-only access to multiple Google Drive accounts simultaneously through secure service account authentication. Supports listing, searching, and extracting content from Google Workspace documents, spreadsheets, and text files.6
- Alicense-qualityDmaintenanceEnables interaction with Google Drive files and Google Sheets through search, read, and write operations. Supports automatic conversion of Google Workspace files to readable formats and direct spreadsheet cell updates.9,262MIT
- Alicense-qualityDmaintenanceProvides read-only access to Google Sheets data through OAuth 2.0 authentication, enabling users to retrieve spreadsheet metadata, list tabs, and read cell data using natural language queries.1MIT
- Alicense-qualityDmaintenanceEnables interaction with Google Sheets, Docs, and Drive to manage spreadsheets, documents, and files. It supports operations like reading and updating cell data, extracting text from documents, and searching or sharing files within Google Drive.MIT
Related MCP Connectors
Search, browse, and read your Dropbox files. Find documents by name or content, list folders, and…
Query your Google Sheets as structured JSON: list sheets and tabs, read schemas, filter rows.
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
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/ravindra-gs/google-docs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server