google-mcp

google-mcp

Enables interaction with Google Docs, Sheets, and Drive through natural language, supporting file management, document editing, and spreadsheet operations via OAuth authentication.

Category
Visit Server

README

google-mcp — Google Docs, Sheets & Drive MCP Server

A production-ready MCP server for Google Docs, Google Sheets, and Google Drive with OAuth token authentication. Deploy to Railway or run locally with Claude Desktop.

Features

  • Google Drive: List, search, create, move, copy, delete files and folders; manage sharing permissions
  • Google Docs: Read, create, append, find-and-replace, and insert text into documents
  • Google Sheets: Create spreadsheets, read/write ranges, append rows, manage sheets
  • OAuth Authentication: Uses access tokens with automatic refresh on expiration
  • Dual Transport: HTTP/SSE for claude.ai and Claude Desktop via stdio

Setup

1. Create a Google Cloud Project

  1. Go to Google Cloud Console
  2. Create a new project
  3. Enable these APIs:
    • Google Drive API
    • Google Docs API
    • Google Sheets API

2. Create OAuth 2.0 Credentials

  1. Go to Credentials in the Google Cloud Console
  2. Click Create CredentialsOAuth 2.0 Client ID
  3. Application type: Web application
  4. Authorized redirect URIs:
    • https://your-api.up.railway.app/api/oauth/google/callback (if using bridge-ai-ops for OAuth)
    • Or any OAuth callback URL you're using
  5. Copy the Client ID and Client Secret

3. Get Google Tokens

Use the bridge-ai-ops-api OAuth flow to get OAuth tokens:

  1. POST /api/oauth/start with appId for Google (set up in bridge-ai-ops app_catalog)
  2. Get redirected to Google login
  3. Authorize access to Docs, Sheets, Drive
  4. Tokens are stored and can be exported via the platform

Or manually exchange an auth code:

curl -X POST https://oauth2.googleapis.com/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "code=AUTH_CODE&client_id=CLIENT_ID&client_secret=CLIENT_SECRET&redirect_uri=REDIRECT_URI&grant_type=authorization_code"

Environment Variables

Variable Required Description
GOOGLE_CLIENT_ID Yes OAuth Client ID from Google Cloud Console
GOOGLE_CLIENT_SECRET Yes OAuth Client Secret from Google Cloud Console
GOOGLE_ACCESS_TOKEN Yes Short-lived OAuth access token
GOOGLE_REFRESH_TOKEN Yes Long-lived OAuth refresh token (for auto-refresh)
TRANSPORT No http (default) or stdio
PORT No Server port (default: 8080)

Tools

Google Drive (9 tools)

Tool Description
drive_list_files List files and folders (optionally filter by parent or query)
drive_search_files Full-text search across Drive
drive_get_file Get file metadata and details
drive_create_folder Create a new folder
drive_move_file Move file to a different folder
drive_copy_file Copy a file
drive_delete_file Move file to trash
drive_get_permissions Get sharing permissions for a file
drive_share_file Share a file with an email address (viewer/commenter/editor)

Google Docs (6 tools)

Tool Description
docs_get_document Get full document content (JSON format)
docs_get_text Extract plain text from a document
docs_create_document Create a new blank document
docs_append_text Append text to the end of a document
docs_replace_text Find and replace text in a document
docs_insert_text Insert text at a specific character position

Google Sheets (8 tools)

Tool Description
sheets_get_spreadsheet Get spreadsheet metadata and sheet names
sheets_read_range Read values from a cell range (e.g., Sheet1!A1:D10)
sheets_write_range Write values to a cell range
sheets_create_spreadsheet Create a new spreadsheet
sheets_append_rows Append rows of data to a sheet
sheets_clear_range Clear all values in a cell range
sheets_add_sheet Add a new sheet/tab
sheets_delete_sheet Delete a sheet/tab by name

Local Development

npm install
npm run build

# Test locally
GOOGLE_ACCESS_TOKEN="..." GOOGLE_REFRESH_TOKEN="..." GOOGLE_CLIENT_ID="..." GOOGLE_CLIENT_SECRET="..." npm start

Server will run on http://localhost:8080

  • Health check: curl http://localhost:8080/health
  • Claude Desktop connection: stdio with TRANSPORT=stdio

Claude Desktop Configuration

Remote (Railway HTTP)

{
  "mcpServers": {
    "google": {
      "url": "https://your-app.up.railway.app/sse"
    }
  }
}

Local (stdio)

{
  "mcpServers": {
    "google": {
      "command": "node",
      "args": ["/path/to/dist/index.js"],
      "env": {
        "TRANSPORT": "stdio",
        "GOOGLE_CLIENT_ID": "your_client_id",
        "GOOGLE_CLIENT_SECRET": "your_client_secret",
        "GOOGLE_ACCESS_TOKEN": "your_access_token",
        "GOOGLE_REFRESH_TOKEN": "your_refresh_token"
      }
    }
  }
}

Railway Deployment

  1. Create a GitHub repository and push this code
  2. In Railway, create a new service → Deploy from GitHub
  3. Select this repository
  4. Set environment variables in Railway dashboard:
    • GOOGLE_CLIENT_ID
    • GOOGLE_CLIENT_SECRET
    • GOOGLE_ACCESS_TOKEN
    • GOOGLE_REFRESH_TOKEN
  5. Generate a domain: Settings → Networking → Generate Domain
  6. Use https://your-domain.up.railway.app/mcp for claude.ai
  7. Use https://your-domain.up.railway.app/sse for Claude Desktop

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured