No-Code

Connect to enterprise-grade MCP servers instantly!Klavis MCP Servers - No Code CreationGet Started →

For Developer

Follow the instructions below to integrate Google Docs MCP server to your AI application using our API or SDK.

Prerequisites

1. Create a Google Docs MCP Server

Use the following endpoint to create a new remote Google Docs MCP server instance:

Request

from klavis import Klavis
from klavis.types import McpServerName

klavis_client = Klavis(api_key="<YOUR_API_KEY>")

# Create a Google Docs MCP server instance
google_docs_server = klavis_client.mcp_server.create_server_instance(
    server_name=McpServerName.GOOGLE_DOCS,
    user_id="<YOUR_USER_ID>",
    platform_name="<YOUR_PLATFORM_NAME>",
)

Response

{
  "serverUrl": "https://gdocs-mcp-server.klavis.ai/mcp/?instance_id=<instance-id>",
  "instanceId": "<instance-id>",
  "oauthUrl": "https://api.klavis.ai/oauth/gdocs/authorize?instance_id=<instance-id>"
}
serverUrl specifies the endpoint of the Google Docs MCP server, which you can connect with the MCP client of your application.
instanceId is used for authentication and identification of your server instance. After you complete the next steps, this token allows the MCP server to access user’s private Google Docs information.

2. Implement OAuth Authorization

Google Picker APIKlavis use Google Picker API to allow the user to create Drive files (including Docs) , and select and modify any file from their Drive that they want to share with your application , including files not created with the application. This gives users more control and confidence that your application’s access to their files is limited and secure.
Or if you want to set up your own branding - White Labeling After you have set up the white labeling for Google Docs, you can then do the following:
import webbrowser

webbrowser.open(google_docs_server.oauth_url)
You can also specify scope and redirect_url in the authUrl, and we also support white-label. Check the API reference for more details.

Watch the Example

Explore MCP Server Tools

For more details about tool input schema, use the list_tool API.