This MCP server creates a powerful bridge between Claude and your Google Docs & Drive, allowing you to read, edit, format documents, and manage your Drive files through natural language commands.
Before starting, ensure you have:
Create a project and enable APIs:
Configure OAuth consent screen:
https://www.googleapis.com/auth/documents
https://www.googleapis.com/auth/drive.file
Create credentials:
credentials.json
Clone the repository:
git clone https://github.com/a-bonus/google-docs-mcp.git mcp-googledocs-server
cd mcp-googledocs-server
Place credentials:
credentials.json
file into the mcp-googledocs-server
folderInstall dependencies:
npm install
Build the server:
npm run build
First run and authorization:
node ./dist/server.js
token.json
file appears in your server directoryFind your absolute path:
pwd
(macOS/Linux) or cd
(Windows) to get your server's full pathLocate or create Claude's configuration file:
~/Library/Application Support/Claude/mcp_config.json
%APPDATA%\Claude\mcp_config.json
~/.config/Claude/mcp_config.json
Edit configuration file:
{
"mcpServers": {
"google-docs-mcp": {
"command": "node",
"args": [
"/PATH/TO/YOUR/CLONED/REPO/mcp-googledocs-server/dist/server.js"
],
"env": {}
}
}
}
(Replace /PATH/TO/YOUR/CLONED/REPO
with your actual absolute path)
Restart Claude Desktop
With Claude Desktop, you can use natural language to instruct the AI to perform various Google Docs and Drive operations.
Use the google-docs-mcp server to read document 1a2b3c4d5e6f7g8h9i
Please append "Meeting notes from today:" to document 1a2b3c4d5e6f7g8h9i
Insert "This is a new paragraph." at position 250 in document 1a2b3c4d5e6f7g8h9i
Apply bold and red (#FF0000) formatting to the text "Important Deadline" in document 1a2b3c4d5e6f7g8h9i
Center-align the paragraph containing "Project Overview" in document 1a2b3c4d5e6f7g8h9i
Insert a 3x4 table at index 500 in document 1a2b3c4d5e6f7g8h9i
Add a page break after the section titled "First Quarter Results" in document 1a2b3c4d5e6f7g8h9i
List my recent Google Docs
Search for documents containing "quarterly report"
Create a new folder called "Project Alpha" in my Drive
Move file 1a2b3c4d5e6f7g8h9i to folder 9i8h7g6f5e4d3c2b1a
If Claude shows "Failed" or "Could not attach":
mcp_config.json
is correctdist
folder exists (run npm run build
)If you encounter Google authorization errors:
credentials.json
is in the correct locationThere are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.