Google Cloud DNS MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "GOOGLE_CLOUD_PROJECT_ID=${GOOGLE_CLOUD_PROJECT_ID}" -e "GOOGLE_CLOUD_CREDENTIALS=${GOOGLE_CLOUD_CREDENTIALS}" gcloud-dns -- npx @artik0din/mcp-gcloud-dns
Required:GOOGLE_CLOUD_PROJECT_IDGOOGLE_CLOUD_CREDENTIALS
README.md

Manage Google Cloud DNS managed zones and records via the Google Cloud DNS API

Google Cloud DNS MCP Server

A comprehensive Model Context Protocol (MCP) server for managing Google Cloud DNS managed zones and records via the Google Cloud DNS API. This server enables AI assistants like Claude to manage DNS infrastructure directly through Google Cloud's robust DNS service.

Features

🌐 Managed Zone Operations

  • List Zones: View all DNS managed zones in your project
  • Zone Details: Get comprehensive zone information including name servers and DNSSEC status
  • Zone Visibility: Support for both public and private zones

📝 DNS Record Management

  • Full CRUD: Complete create, read, update, delete operations for DNS records
  • Record Types: Support for A, AAAA, CNAME, MX, NS, SOA, PTR, SRV, TXT, CAA
  • Smart Filtering: Filter records by type or name
  • TTL Management: Full control over time-to-live settings
  • Batch Changes: Atomic operations with change tracking

🛡️ Enterprise Security

  • Service Account Auth: Secure service account-based authentication
  • IAM Integration: Leverages Google Cloud IAM for fine-grained permissions
  • Audit Trail: All changes tracked through Google Cloud's audit logging
  • DNSSEC Support: Full support for DNSSEC-enabled zones

⚡ Performance & Reliability

  • Global Infrastructure: Built on Google Cloud's global DNS network
  • Change Tracking: Monitor and wait for DNS propagation
  • Error Handling: Comprehensive error handling with clear messages
  • Type Safety: Full TypeScript support

Quick Start

Run the server directly with npx (requires Node.js 18+):

npx @artik0din/mcp-gcloud-dns

Or install locally:

npm install -g @artik0din/mcp-gcloud-dns
mcp-gcloud-dns

Environment Variables

Create a .env file in your working directory:

Variable Required Description
GOOGLE_CLOUD_PROJECT_ID Your Google Cloud project ID
GOOGLE_CLOUD_CREDENTIALS Service account JSON credentials as a string

Setting Up Google Cloud Credentials

1. Create a Service Account
  1. Go to Google Cloud Console > IAM & Admin > Service Accounts
  2. Click "Create Service Account"
  3. Enter a name (e.g., dns-mcp-server)
  4. Click "Create and Continue"
2. Grant DNS Permissions

Grant one of these roles to your service account:

  • DNS Administrator (full access) - roles/dns.admin
  • Custom Role with these permissions:
    • dns.managedZones.list
    • dns.managedZones.get
    • dns.resourceRecordSets.list
    • dns.changes.create
    • dns.changes.get
3. Create and Download Key
  1. Click on your service account
  2. Go to "Keys" tab
  3. Click "Add Key" > "Create new key"
  4. Choose JSON format
  5. Download the key file
4. Set Environment Variables
# Your project ID
export GOOGLE_CLOUD_PROJECT_ID="your-project-id"

# Service account JSON as a string (escape quotes)
export GOOGLE_CLOUD_CREDENTIALS='{"type":"service_account","project_id":"your-project",...}'

MCP Client Configuration

Claude Desktop

Add this to your Claude Desktop configuration:

{
  "mcpServers": {
    "google-cloud-dns": {
      "command": "npx",
      "args": ["@artik0din/mcp-gcloud-dns"],
      "env": {
        "GOOGLE_CLOUD_PROJECT_ID": "your-project-id",
        "GOOGLE_CLOUD_CREDENTIALS": "{\"type\":\"service_account\",\"project_id\":\"your-project\",...}"
      }
    }
  }
}

Other MCP Clients

Use the command npx @artik0din/mcp-gcloud-dns with the appropriate environment variables set.

Available Tools

gcloud_dns_list_zones

List all DNS managed zones in your Google Cloud project.

Parameters: None

Example:

List all my Google Cloud DNS zones
Show all managed zones in the project

gcloud_dns_get_zone

Get detailed information about a specific managed zone.

Parameters:

  • zoneName (string, required): Managed zone name (not the DNS name)

Example:

Get details for zone my-example-zone
Show information about production-dns-zone

gcloud_dns_list_records

List DNS records in a managed zone with optional filtering.

Parameters:

  • zoneName (string, required): Managed zone name
  • type (string, optional): Filter by record type (A, AAAA, CNAME, MX, TXT, etc.)
  • name (string, optional): Filter by record name (must include trailing dot)

Example:

List all records in zone my-example-zone
Show A records in zone production-dns
Get records for www.example.com. in zone my-zone

gclo

Tools (3)

gcloud_dns_list_zonesList all DNS managed zones in your Google Cloud project.
gcloud_dns_get_zoneGet detailed information about a specific managed zone.
gcloud_dns_list_recordsList DNS records in a managed zone with optional filtering.

Environment Variables

GOOGLE_CLOUD_PROJECT_IDrequiredYour Google Cloud project ID
GOOGLE_CLOUD_CREDENTIALSrequiredService account JSON credentials as a string

Configuration

claude_desktop_config.json
{"mcpServers": {"google-cloud-dns": {"command": "npx", "args": ["@artik0din/mcp-gcloud-dns"], "env": {"GOOGLE_CLOUD_PROJECT_ID": "your-project-id", "GOOGLE_CLOUD_CREDENTIALS": "{\"type\":\"service_account\",\"project_id\":\"your-project\",...}"}}}}

Try it

List all the DNS managed zones currently in my Google Cloud project.
Get the details and name servers for the zone named 'production-dns-zone'.
Show me all A records currently configured in the 'my-example-zone' managed zone.
Find the DNS records for 'www.example.com.' within the 'my-zone' managed zone.

Frequently Asked Questions

What are the key features of Google Cloud DNS?

Full CRUD operations for DNS records including A, AAAA, CNAME, MX, NS, SOA, PTR, SRV, TXT, and CAA types. Support for listing and retrieving detailed information about public and private managed zones. Secure service account-based authentication integrated with Google Cloud IAM. Full support for DNSSEC-enabled zones and atomic batch changes. Built-in change tracking and monitoring for DNS propagation.

What can I use Google Cloud DNS for?

Automating DNS record updates during CI/CD deployment pipelines. Auditing and verifying DNS configurations across multiple managed zones. Quickly querying DNS record status for troubleshooting connectivity issues. Managing DNS infrastructure programmatically without manual console interaction.

How do I install Google Cloud DNS?

Install Google Cloud DNS by running: npx @artik0din/mcp-gcloud-dns

What MCP clients work with Google Cloud DNS?

Google Cloud DNS works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Google Cloud DNS docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare