You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
19
25
Head to the folder where your project is located.
20
26
```bash
21
27
$ cd path/to/your/project
22
28
```
23
29
24
-
## Step 2 - Authenticate Defang to use your GCP Account
30
+
###Step 2 - Authenticate Defang to use your GCP Account
25
31
26
32
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`.
27
33
28
-
## Step 3 - Deploy
34
+
###Step 3 - Deploy
29
35
30
36
Invoke the `defang compose up` CLI command with the `--provider=gcp` flag or set the `DEFANG_PROVIDER=gcp` environment variable.
31
37
@@ -35,10 +41,39 @@ For example:
35
41
$ defang compose up --provider=gcp
36
42
```
37
43
38
-
## Step 4 - Inspect your deployment
44
+
###Step 4 - Inspect your deployment
39
45
40
46
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/).
41
47
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
+

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
+

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
+
42
77
***
43
78
44
79
For a deeper discussion of the Defang GCP Architecture, see our [GCP docs](/docs/providers/gcp).
0 commit comments