Google Cloud Docs MCP Server

Google Cloud Docs MCP Server

Enables AI assistants to search and access Google Cloud Platform documentation in real-time, supporting 20+ GCP services with natural language queries and smart content extraction.

Category
Visit Server

README

Google Cloud Docs MCP Server

License: MIT Node.js Version MCP SDK

An MCP (Model Context Protocol) server that provides AI assistants with access to Google Cloud Platform documentation. This enables Claude and other MCP-compatible assistants to search, fetch, and understand GCP documentation in real-time.

Table of Contents

Features

  • Free-form Search: Search GCP documentation with natural language queries
  • Content Extraction: Extract clean markdown content from documentation pages
  • 80+ Topic Mappings: Pre-configured mappings for common GCP topics
  • Relevance Scoring: Smart ranking of search results by relevance
  • API Reference: Access REST API documentation for GCP services
  • 20+ GCP Products: Support for major Google Cloud services

How It Works

┌─────────────┐     ┌─────────────────┐     ┌──────────────────┐
│   Claude    │────▶│  MCP Server     │────▶│  Google Cloud    │
│  (or other  │     │  (this project) │     │  Documentation   │
│  MCP client)│◀────│                 │◀────│  (cloud.google   │
└─────────────┘     └─────────────────┘     │   .com/docs)     │
                                           └──────────────────┘
  1. Query Processing: When Claude receives a GCP-related question, it calls the MCP server tools
  2. Search Strategy: The server uses a multi-step search approach:
    • Google Search targeting site:cloud.google.com
    • Google Cloud's internal search API (fallback)
    • 80+ pre-configured topic mappings (fallback)
  3. Content Extraction: Uses Cheerio to parse HTML and extract clean markdown
  4. Relevance Scoring: Results are scored and sorted by query relevance
  5. Response: Returns structured JSON with documentation content

Technical Details

  • Protocol: MCP (Model Context Protocol) over stdio transport
  • Content Parsing: HTML to Markdown conversion with Cheerio
  • Search: Combines Google Search scraping with fallback topic mappings
  • Output Format: Structured JSON with markdown content

Prerequisites

  • Node.js >= 18.0.0
  • npm or yarn
  • Claude Desktop, Claude Code, or other MCP-compatible client

Installation

From Source

# Clone the repository
git clone https://github.com/longngo192/gcpdoc-mcp
cd gcpdoc-mcp

# Install dependencies
npm install

# Build the project
npm run build

Quick Start

npm install && npm run build

Configuration

Claude Desktop

Add to your Claude Desktop config file:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "google-cloud-docs": {
      "command": "node",
      "args": [
        "/path/to/google-cloud-docs-mcp/dist/index.js"
      ]
    }
  }
}

Claude Code CLI

# Add the MCP server
claude mcp add google-cloud-docs -- node /path/to/dist/index.js

# Verify installation
claude mcp list

Usage

Once configured, Claude will automatically use the GCP documentation tools when you ask questions about Google Cloud services.

Example Queries

"How do I set up VPC peering between two GCP projects?"
"What are the steps to enable CMEK encryption for Cloud Storage?"
"How to configure Cloud SQL high availability?"
"Show me GKE autoscaling configuration options"
"How to set environment variables in Cloud Run?"

Direct Tool Usage

If using MCP protocol directly:

// Search documentation
{
  "method": "tools/call",
  "params": {
    "name": "search_google_cloud_docs",
    "arguments": {
      "query": "vpc peering between projects"
    }
  }
}

// Fetch specific documentation
{
  "method": "tools/call",
  "params": {
    "name": "fetch_google_cloud_doc",
    "arguments": {
      "path": "vpc/docs/vpc-peering"
    }
  }
}

Available Tools

1. search_google_cloud_docs

Search GCP documentation with free-form queries. Primary tool for GCP questions.

Parameter Type Required Description
query string Yes Natural language search query
product string No Filter by GCP product (e.g., 'compute', 'storage')

Example:

{
  "query": "how to share encrypted bucket cross account",
  "product": "storage"
}

2. fetch_google_cloud_doc

Fetch content from a specific documentation page.

Parameter Type Required Description
path string Yes Documentation path after cloud.google.com/

Example:

{
  "path": "storage/docs/encryption/customer-managed-keys"
}

3. list_google_cloud_products

List all supported GCP products and their documentation paths.

No parameters required.

4. get_api_reference

Get REST API reference for a GCP service.

Parameter Type Required Description
service string Yes Service name (e.g., 'compute', 'storage')
resource string No Specific API resource (e.g., 'instances', 'buckets')

Example:

{
  "service": "compute",
  "resource": "instances"
}

Supported Topics

The server includes 80+ topic mappings for accurate search results:

Category Topics
Storage & Encryption encrypt, bucket, cmek, kms, customer managed, object storage
IAM & Security iam, role, service account, impersonation, workload identity
Networking vpc, peering, shared vpc, firewall, load balancer, dns, nat
Database cloud sql, high availability, mysql, postgres, replica, failover
BigQuery partition, cluster, materialized view, schedule
GKE gke, autoscaling, node pool, horizontal pod autoscaler, helm
Serverless cloud run, environment variable, cloud function, deploy
Container docker, artifact registry, cloud build
Pub/Sub pubsub, topic, subscription
Data Processing dataflow, dataproc, composer, airflow, spark
Monitoring logging, monitoring, metric, alert, dashboard, trace
Infrastructure terraform, deployment manager, gcloud

Supported GCP Products

ID Name Description
compute Compute Engine Virtual machines and infrastructure
storage Cloud Storage Object storage service
bigquery BigQuery Data warehouse and analytics
kubernetes GKE Managed Kubernetes service
functions Cloud Functions Serverless compute platform
run Cloud Run Serverless containers
pubsub Pub/Sub Messaging and event ingestion
sql Cloud SQL Managed relational databases
firestore Firestore NoSQL document database
spanner Cloud Spanner Globally distributed database
ai Vertex AI Machine learning platform
iam IAM Identity and Access Management
vpc VPC Virtual Private Cloud networking
loadbalancing Cloud Load Balancing Global load balancing
logging Cloud Logging Log management and analysis
monitoring Cloud Monitoring Infrastructure monitoring

Project Structure

google-cloud-docs-mcp/
├── src/
│   └── index.ts          # Main MCP server implementation
├── dist/                  # Compiled JavaScript (generated)
├── package.json          # Project configuration
├── tsconfig.json         # TypeScript configuration
├── .gitignore           # Git ignore rules
├── LICENSE              # MIT License
└── README.md            # This file

Development

Running in Development Mode

# With hot reload
npm run dev

# Build and run
npm run build && npm start

Testing the Server

# Test MCP initialization
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | node dist/index.js

# Test tools/list
echo '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | node dist/index.js

Building

npm run build

Contributing

Contributions are welcome! Here's how you can help:

Getting Started

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/yourusername/google-cloud-docs-mcp.git
  3. Create a feature branch: git checkout -b feature/your-feature-name
  4. Make your changes
  5. Run tests and build: npm run build
  6. Commit your changes: git commit -m "Add your feature"
  7. Push to your fork: git push origin feature/your-feature-name
  8. Open a Pull Request

Contribution Ideas

  • Add more topic mappings: Expand the topicMappings object in src/index.ts
  • Support more GCP products: Add entries to GOOGLE_CLOUD_PRODUCTS
  • Improve content extraction: Enhance the Cheerio parsing logic
  • Add caching: Implement response caching to reduce API calls
  • Add tests: Write unit tests for search and content extraction
  • Documentation: Improve README or add usage examples

Code Style

  • Use TypeScript
  • Follow existing code patterns
  • Add comments for complex logic
  • Test your changes before submitting

Reporting Issues

Found a bug or have a suggestion? Please open an issue with:

  • Clear description of the problem
  • Steps to reproduce
  • Expected vs actual behavior
  • Your environment (Node.js version, OS)

Acknowledgments

License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with love for the GCP and AI community

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
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
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
VeyraX MCP

VeyraX MCP

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

Official
Featured
Local
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
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
Qdrant Server

Qdrant Server

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

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured