Skip to content

Commit 5cdf77b

Browse files
committed
gcp prompt
1 parent bd41be2 commit 5cdf77b

File tree

3 files changed

+39
-4
lines changed

3 files changed

+39
-4
lines changed

docs/tutorials/deploy-to-gcp.mdx

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,23 @@ This tutorial will show you how to deploy your services to your own GCP project
1515
* [gcloud CLI](https://cloud.google.com/sdk/docs/install)
1616
* [GCP Account Credentials](https://cloud.google.com/docs/authentication/set-up-adc-local-dev-environment)
1717

18-
## Step 1 - Navigate to your project directory
18+
:::warning["MCP Pre-requisite"]
19+
If you would like to deploy using [MCP](https://modelcontextprotocol.io/), you like need to setup the [Defang MCP Server](../concepts/mcp.md) with the IDE of your choice.
20+
:::
21+
22+
## CLI
23+
24+
### Step 1 - Navigate to your project directory
1925
Head to the folder where your project is located.
2026
```bash
2127
$ cd path/to/your/project
2228
```
2329

24-
## Step 2 - Authenticate Defang to use your GCP Account
30+
### Step 2 - Authenticate Defang to use your GCP Account
2531

2632
After signing in to your GCP account, select an existing project or [create a new project](https://developers.google.com/workspace/guides/create-project). Make sure [billing is enabled](https://cloud.google.com/billing/docs/how-to/modify-project). Then, note down the project ID and set it as environment variable `GCP_PROJECT_ID`.
2733

28-
## Step 3 - Deploy
34+
### Step 3 - Deploy
2935

3036
Invoke the `defang compose up` CLI command with the `--provider=gcp` flag or set the `DEFANG_PROVIDER=gcp` environment variable.
3137

@@ -35,10 +41,39 @@ For example:
3541
$ defang compose up --provider=gcp
3642
```
3743

38-
## Step 4 - Inspect your deployment
44+
### Step 4 - Inspect your deployment
3945

4046
Defang will provision resources in your GCP account and deploy your services. You can inspect the resources created in your [GCP Dashboard](https://console.cloud.google.com/).
4147

48+
---
49+
50+
## MCP
51+
52+
### Step 1 - Navigate to your project directory with your IDE
53+
Navigate to your project directory and open it in an IDE that has the [Defang MCP Server](../concepts/mcp.md) installed.
54+
55+
:::tip
56+
If the Defang MCP server doesn’t start automatically, try starting or restarting it from your IDE settings.
57+
![VS Code](/img/prompts/start-server.png)
58+
:::
59+
60+
### Step 2 - Authenticate Defang to use your GCP Account
61+
62+
After signing in to your GCP account, select an existing project or [create a new project](https://developers.google.com/workspace/guides/create-project). Make sure [billing is enabled](https://cloud.google.com/billing/docs/how-to/modify-project). Then, note down the project ID for the next step.
63+
64+
### Step 2 - Setting your provider
65+
In your chat window, type `/mcp.defang.GCP_Setup` or select the corresponding prompt from your IDE’s options.
66+
67+
![Trigger Prompt](/img/prompts/gcp-prompt.png)
68+
69+
The [MCP prompt](https://modelcontextprotocol.io/specification/2025-06-18/server/prompts) will require your GCP project ID you created in [Step 2](#step-2---authenticate-defang-to-use-your-gcp-account-1).
70+
71+
### Step 3 - Deploy
72+
Once the prompt completes without errors, your chat input will be automatically populated with the deployment command for the LLM to execute.
73+
74+
### Step 4 - Inspect your deployment
75+
You can check the status of your depolyment by using the [Defang Services tool](../concepts/mcp#services) or you can inspect the resources created in your GCP Dashboard.
76+
4277
***
4378

4479
For a deeper discussion of the Defang GCP Architecture, see our [GCP docs](/docs/providers/gcp).

static/img/prompts/gcp-prompt.png

37.1 KB
Loading
37.1 KB
Loading

0 commit comments

Comments
 (0)