Google Docs & Gmail MCP Server
Allows creating email drafts in Gmail.
Allows appending content to Google Docs.
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 & Gmail MCP ServerAppend 'Task completed' to my weekly report doc"
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 & Gmail MCP Server
A FastAPI-based MCP-style server that provides tools to append content to Google Docs and create email drafts in Gmail.
Project Structure
server.py: FastAPI application with endpoints.auth.py: Handles Google OAuth 2.0 flow.docs_tool.py: Contains the logic to append text to Google Docs.gmail_tool.py: Contains the logic to create Gmail drafts.requirements.txt: Python dependencies.
Related MCP server: Google-MCP-Server
Setup Instructions
1. Google Cloud Console Setup
Before running the application, you need to configure an OAuth client in the Google Cloud Console.
Go to the Google Cloud Console.
Create a new project or select an existing one.
Navigate to APIs & Services > Library and enable the following APIs:
Google Docs API
Gmail API
Navigate to APIs & Services > OAuth consent screen:
Choose External (or Internal if you have a Google Workspace).
Fill in the required fields (App name, User support email, Developer contact information).
Under Test users, click ADD USERS and enter the email address you will use to test the application.
Navigate to APIs & Services > Credentials:
Click CREATE CREDENTIALS > OAuth client ID.
Select Desktop app as the Application type.
Name it (e.g., "MCP Server Local") and click Create.
Download the JSON file, rename it to
credentials.json, and place it in thegoogle-mcp-serverdirectory.
2. Install Dependencies
Ensure you have Python 3.7+ installed. Run the following command in the google-mcp-server directory:
pip install -r requirements.txt3. Initial Authentication
To generate the token.json file, run the auth.py script directly:
python auth.pyThis will open a browser window for you to log in with your Google account (ensure you use the email added as a Test User in the consent screen). After granting permission, a token.json file will be created in your directory. You can close the browser window once authenticated.
4. Running the Server
Start the FastAPI server using uvicorn:
uvicorn server:app --reloadAlternatively, run python server.py.
The server will be running at http://127.0.0.1:8000. You can view the API documentation at http://127.0.0.1:8000/docs.
Usage
When you make a request to the server, it will intercept the action and prompt you in the terminal for approval:
--- ACTION REQUIRED ---
Action: Append to Google Doc
Payload: {'doc_id': '...', 'content': '...'}
Approve? (y/n):You must type y in the terminal where the server is running to proceed.
Example Request: Append to Doc
curl -X 'POST' \
'http://127.0.0.1:8000/append_to_doc' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"doc_id": "YOUR_DOCUMENT_ID",
"content": "\nThis is a new appended line!"
}'Example Request: Create Email Draft
curl -X 'POST' \
'http://127.0.0.1:8000/create_email_draft' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"to": "example@example.com",
"subject": "Test Draft",
"body": "Hello, this is a draft from MCP Server!"
}'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.
Latest Blog Posts
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/Flukeshotz/MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server