Google Docs Integration
Create and edit Google Docs documents
The Google Docs integration provides access to create and edit Google Docs documents through the Integrate MCP server.
Installation
The Google Docs integration is included with the SDK:
import { googleDocsIntegration } from "integrate-sdk/server";Setup
1. Create a Google Docs OAuth App
- Go to Google Cloud Console
- Create a new OAuth application
- Configure your redirect URI
- Note your Client ID and Client Secret
2. Configure the Integration on Your Server
Add the Google Docs integration to your server configuration. The integration automatically reads GOOGLE_DOCS_CLIENT_ID and GOOGLE_DOCS_CLIENT_SECRET from your environment variables:
import { createMCPServer, googleDocsIntegration } from "integrate-sdk/server";
export const { client: serverClient } = createMCPServer({
apiKey: process.env.INTEGRATE_API_KEY,
integrations: [
googleDocsIntegration({
}),
],
});You can override the environment variables by passing explicit values:
googleDocsIntegration({
clientId: process.env.CUSTOM_GOOGLE_DOCS_ID,
clientSecret: process.env.CUSTOM_GOOGLE_DOCS_SECRET,
});3. Client-Side Usage
The default client automatically includes all integrations. You can use it directly:
import { client } from "integrate-sdk";
await client.authorize("google_docs");
const result = await client.google_docs.list({});
console.log(result);If you're using a custom client, add the integration to the integrations array:
import { createMCPClient, googleDocsIntegration } from "integrate-sdk";
const customClient = createMCPClient({
integrations: [googleDocsIntegration()],
});Configuration Options
export interface GDocsIntegrationConfig {
/** Google OAuth client ID (defaults to GOOGLE_DOCS_CLIENT_ID env var) */
clientId?: string;
Tools
google_docs_append_text
Docs append text
export interface GoogleDocsAppendTextParams {
document_id: string;
google_docs_batch_update
Docs batch update
export interface GoogleDocsBatchUpdateParams {
document_id: string;
google_docs_create
Docs create
export interface GoogleDocsCreateParams {
title: string;
google_docs_create_comment
Docs create comment
export interface GoogleDocsCreateCommentParams {
document_id: string;
google_docs_delete
Docs delete
export interface GoogleDocsDeleteParams {
document_id: string;
google_docs_delete_comment
Docs delete comment
export interface GoogleDocsDeleteCommentParams {
document_id: string;
google_docs_get
Docs get
export interface GoogleDocsGetParams {
document_id: string;
google_docs_list
Docs list
export interface GoogleDocsListParams {
page_size?: number;
google_docs_list_comments
Docs list comments
export interface GoogleDocsListCommentsParams {
document_id: string;
google_docs_replace_text
Docs replace text
export interface GoogleDocsReplaceTextParams {
document_id: string;
Notes
- Category: Productivity
- Authentication mode: OAuth