`wrangler deploy` usage in git-mcp codebase.

Ramu NarasingaRamu Narasinga
2 min read

In this article, we will review wrangler deploy usage in git-mcp codebase. We will look at:

  1. Deploy script in git-mcp package.json

  2. What is Wrangler?

  3. wrangler.jsonc in git-mcp

Deploy script in git-mcp package.json

In git-mcp/package.json, at line 9, you will find the following script:

"scripts": {
    "build": "react-router build",
    "deploy": "npm run build && wrangler deploy",

This deploy script is used to prepare a build and this runs the wrangler deploy command.

What is Wrangler?

Wrangler, the Cloudflare Developer Platform command-line interface (CLI), allows you to manage Worker projects.

  • API : A set of programmatic APIs that can be integrated with local Cloudflare Workers-related workflows.

  • Bundling : Review Wrangler’s default bundling.

  • Commands : Create, develop, and deploy your Cloudflare Workers with Wrangler commands.

  • Configuration : Use a configuration file to customize the development and deployment setup for your Worker project and other Developer Platform products.

  • Custom builds : Customize how your code is compiled, before being processed by Wrangler.

  • Deprecations : The differences between Wrangler versions, specifically deprecations and breaking changes.

  • Environments : Use environments to create different configurations for the same Worker application.

  • Install/Update Wrangler : Get started by installing Wrangler, and update to newer versions by following this guide.

  • Migrations : Review migration guides for specific versions of Wrangler.

  • System environment variables : Local environment variables that can change Wrangler’s behavior.

wrangler.jsonc in git-mcp

In git-mcp/wrangler.jsonc, you will find the following code:

/**
 * For more details on how to configure Wrangler, refer to:
 * https://developers.cloudflare.com/workers/wrangler/configuration/
 */
{
  "$schema": "node_modules/wrangler/config-schema.json",
  "name": "git-mcp",
  "main": "src/index.ts",
  "compatibility_flags": ["nodejs_compat"],
  "compatibility_date": "2025-04-26",
  "routes": [
    {
      "pattern": "gitmcp.io",
      "custom_domain": true,
    },
  ],
  "analytics_engine_datasets": [
    {
      "binding": "MY_METRICS",
      "dataset": "my_metrics_dataset",
    },
  ],
  "migrations": [
    {
      "new_sqlite_classes": ["MyMCP"],
      "tag": "v1",
    },
    {
      "new_classes": ["ViewCounterDO"],
      "tag": "v2",
    },
  ],
  "durable_objects": {
    "bindings": [
      {
        "class_name": "MyMCP",
        "name": "MCP_OBJECT",
      },
      {
        "class_name": "ViewCounterDO",
        "name": "VIEW_COUNTER",
      },
    ],
  },
  "vectorize": [
    {
      "binding": "VECTORIZE",
      "index_name": "gitmcp-github-docs-idx",
    },
  ],
  "kv_namespaces": [
    {
      "binding": "CACHE_KV",
      "id": "c5dd8e05242a471b9d7bf12f0ddcee3a",
      "preview_id": "bfc078682a3a4e33a8b6dfcca09af94f",
    },
  ],
  "ai": {
    "binding": "AI",
  },
  "r2_buckets": [
    {
      "binding": "DOCS_BUCKET",
      "bucket_name": "docs-storage",
      "preview_bucket_name": "llms-store-preview",
    },
  ],
  "queues": {
    "producers": [
      {
        "binding": "MY_QUEUE",
        "queue": "my-queue",
      },
    ],
  },
  "observability": {
    "enabled": true,
  },
  "assets": { "directory": "./static/", "binding": "ASSETS" },
}

You can learn more about these options in wrangler configuration.

About me:

Hey, my name is Ramu Narasinga. I study codebase architecture in large open-source projects.

Email: ramu.narasinga@gmail.com

Want to learn from open-source? Solve challenges inspired by open-source projects.

References:

  1. https://github.com/idosal/git-mcp/blob/main/package.json#L9

  2. https://developers.cloudflare.com/workers/wrangler/commands/#deploy

  3. https://www.cloudflare.com/lp/pg-all-plans-dns/#plans

  4. https://medium.com/@ramunarasinga/what-is-wrangler-jsonc-file-in-0-email-codebase-769e5c347b94

  5. https://github.com/idosal/git-mcp/blob/main/wrangler.jsonc

  6. https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects

0
Subscribe to my newsletter

Read articles from Ramu Narasinga directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ramu Narasinga
Ramu Narasinga

I study large open-source projects and create content about their codebase architecture and best practices, sharing it through articles, videos.