Mirror of https://github.com/modelcontextprotocol/dns — Infrastructure as Code for MCP domains / DNS management
  • TypeScript 92.9%
  • Makefile 7.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Den Delimarsky 46c093cee9
Remove guildbridge CNAME record (#15)
The guildbridge subdomain is managed by a Cloudflare Worker Custom
Domain binding, which creates a read-only DNS record that cannot be
managed via the DNS API. Attempting to create it via Pulumi fails with
Cloudflare error 9059 ("Invalid CNAME target. Only DNS Only zones can
point to partial suffixes"), blocking all deploys since #13.

The record remains live and functional — it's managed by the Worker
binding, not this stack.

🏠 Remote-Dev: homespace
2026-03-25 15:24:07 -07:00
.github/workflows Remove completed one-off CNAME destroy step from deploy workflow 2026-02-19 14:37:59 +00:00
src Remove guildbridge CNAME record (#15) 2026-03-25 15:24:07 -07:00
.gitignore ignore .DS_Store 2026-02-19 17:18:15 +00:00
.pre-commit-config.yaml Initial commit: Cloudflare DNS management with Pulumi 2026-01-06 13:21:49 +00:00
.prettierignore Initial commit: Cloudflare DNS management with Pulumi 2026-01-06 13:21:49 +00:00
.prettierrc Initial commit: Cloudflare DNS management with Pulumi 2026-01-06 13:21:49 +00:00
Makefile Initial commit: Cloudflare DNS management with Pulumi 2026-01-06 13:21:49 +00:00
package-lock.json Initial commit: Cloudflare DNS management with Pulumi 2026-01-06 13:21:49 +00:00
package.json Add one-off pulumi refresh step to fix out-of-sync Cloudflare state 2026-02-17 22:31:00 +00:00
Pulumi.prod.yaml Initial commit: Cloudflare DNS management with Pulumi 2026-01-06 13:21:49 +00:00
Pulumi.yaml Initial commit: Cloudflare DNS management with Pulumi 2026-01-06 13:21:49 +00:00
README.md Initial commit: Cloudflare DNS management with Pulumi 2026-01-06 13:21:49 +00:00
tsconfig.json Initial commit: Cloudflare DNS management with Pulumi 2026-01-06 13:21:49 +00:00

MCP DNS Management

Infrastructure as Code for managing MCP Cloudflare DNS records using Pulumi.

DNS records are defined in src/config/records.ts, keyed by domain name.

Deployment

Production Deployment (Automated)

Note: Production deployment is automatically handled by GitHub Actions. All merges to the main branch trigger an automatic deployment via the configured GitHub Actions workflow.

Manual Deployment

Pre-requisites:

  1. Authenticate with GCP: gcloud auth application-default login
  2. Get the passphrase file passphrase.prod.txt from the maintainers
  3. Preview changes: make preview
  4. Deploy changes: make up

Initial Setup

If setting up this infrastructure for the first time:

1. Create GCS Bucket for Pulumi State

gcloud projects create mcp-dns-prod
gcloud config set project mcp-dns-prod
gcloud services enable storage.googleapis.com

# Create service account for CI/CD
gcloud iam service-accounts create pulumi-svc \
  --display-name="Pulumi Service Account"

gcloud projects add-iam-policy-binding mcp-dns-prod \
  --member="serviceAccount:pulumi-svc@mcp-dns-prod.iam.gserviceaccount.com" \
  --role="roles/storage.admin"

gcloud iam service-accounts keys create sa-key.json \
  --iam-account=pulumi-svc@mcp-dns-prod.iam.gserviceaccount.com

# Create bucket
gsutil mb gs://mcp-dns-prod-pulumi-state

2. Create Cloudflare API Token

  1. Go to Cloudflare API Tokens
  2. Create a token with Zone:DNS:Edit permission for the zones you want to manage
  3. Note the token value

3. Initialize Pulumi Stack

# Login to Pulumi backend
pulumi login gs://mcp-dns-prod-pulumi-state

# Create production stack
export PULUMI_CONFIG_PASSPHRASE_FILE=passphrase.prod.txt
pulumi stack init prod

# Configure application secrets in Pulumi
pulumi config set --secret cloudflare:apiToken "your-api-token"
pulumi config set cloudflare:accountId "your-account-id"

You can find your Cloudflare Account ID in the Cloudflare dashboard URL or in the right sidebar of any zone's overview page.

4. Configure GitHub Actions Secrets

Add the CI/CD secrets to GitHub Actions (repository settings → Secrets and variables → Actions):

  • GCP_PROD_SERVICE_ACCOUNT_KEY: Content of sa-key.json
  • PULUMI_PROD_PASSPHRASE: The passphrase you set above