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
Copy file name to clipboardExpand all lines: docs/concepts/mcp.md
+69-10Lines changed: 69 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,15 +20,15 @@ This page is a guide to the Defang MCP Server detailing its installation, tools,
20
20
21
21
## Installation
22
22
23
-
Ensure that you have the [npm package manager](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) installed, as `npx` commands are required for setup.
24
-
25
-
:::warning
26
-
At this time, the Defang MCP Server can only be installed using `npx`. Other methods are not yet supported.
23
+
Ensure that you have the [Defang CLI](/docs/getting-started.mdx#install-the-defang-cli) installed.
24
+
:::tip[Recommended Installtion]
25
+
Install the Defang CLI using [Curl](https://curl.se/) or [Homebrew](https://brew.sh/)
27
26
:::
27
+
28
28
Run the setup command in your terminal for your IDE of choice from the [Supported IDEs](#supported-ides) section. This will connect the Defang MCP Server to your IDE. The general format of the command is as follows:
Once the command completes, you may need to restart your IDE for the changes to take effect.
@@ -37,14 +37,23 @@ Once the MCP Server is running, you can access the Defang MCP tools directly thr
37
37
38
38
That's it! Feel free to explore our [Example Prompts](#example-prompts) to get ideas on how to interact with the AI agent and make the most of the Defang MCP Server.
Once setup is complete, you can interact with the AI coding agent using Defang-related actions like `check defang services` or [other prompts](#example-prompts). Here's an example of what it could look like:
@@ -56,7 +65,7 @@ Once setup is complete, you can interact with the AI coding agent using Defang-r
56
65
Setup command:
57
66
58
67
```bash
59
-
npx -y defang@latest mcp setup --client=windsurf
68
+
defang mcp setup --client=windsurf
60
69
```
61
70
62
71
Once setup is complete, you can interact with the AI coding agent using Defang-related actions like `check defang services` or [other prompts](#example-prompts). Here's an example of what it could look like:
@@ -68,7 +77,7 @@ Once setup is complete, you can interact with the AI coding agent using Defang-r
68
77
Setup command:
69
78
70
79
```bash
71
-
npx -y defang@latest mcp setup --client=vscode
80
+
defang mcp setup --client=vscode
72
81
```
73
82
74
83
Once setup is complete, you can interact with the AI coding agent using Defang-related actions like `check defang services` or [other prompts](#example-prompts). Here's an example of what it could look like:
@@ -80,21 +89,31 @@ Once setup is complete, you can interact with the AI coding agent using Defang-r
Once setup is complete, you can interact with the AI coding agent using Defang-related actions like `check defang services` or [other prompts](#example-prompts). Here's an example of what it could look like:
87
96
88
97

89
98
99
+
### Kiro
100
+
101
+
Setup command:
102
+
103
+
```bash
104
+
defang mcp setup --client=kiro
105
+
```
106
+
107
+
Once setup is complete, you can interact with the AI coding agent using Defang-related actions like `check defang services` or [other prompts](#example-prompts). Here's an example of what it could look like:
108
+
90
109
### Claude Desktop
91
110
92
111
While this is not an IDE in the traditional sense, it can support MCP servers. For a smoother experience, consider specifying a project name or directory when making chat prompts to this platform.
93
112
94
113
Setup command:
95
114
96
115
```bash
97
-
npx -y defang@latest mcp setup --client=claude
116
+
defang mcp setup --client=claude
98
117
```
99
118
100
119
Once setup is complete, you can interact with the AI coding agent using Defang-related actions like `check defang services` or [other prompts](#example-prompts). Here's an example of what it could look like:
@@ -121,6 +140,22 @@ The `services` tool displays the details of all your services that are currently
121
140
122
141
Given a project name or directory, the `destroy` tool identifies any services deployed with Defang and terminates them. If no services are found, it will display an appropriate message.
123
142
143
+
### `estimate`
144
+
145
+
The `estimate` tool scan your project directory and considers your [deployment mode](/docs/concepts/deployment-modes.md) (which defaults to `AFFORDABLE`) to provide a [cost estimation](/docs/concepts/estimation.md) for [cost estimation](/docs/concepts/estimation.md). Currently, the tool supports two providers: `AWS` or `GCP`.
146
+
147
+
### `list_configs`
148
+
149
+
The `list_configs` tool will [list](/docs/cli/defang_config) all the Defang configs set for your project.
150
+
151
+
### `set_config`
152
+
153
+
The `set_config` tool will [set](/docs/tutorials/configure-environment-variables#step-2---set-the-actual-value-in-the-defang-cli) a specific Defang config for your project.
154
+
155
+
### `remove_config`
156
+
157
+
The `remove_config` tool will [remove](/docs/tutorials/configure-environment-variables#removing-a-config-value) a specific Defang config for your project.
158
+
124
159
## Example Prompts
125
160
126
161
After connecting the Defang MCP Server to your IDE using an installation method, you can type in prompts in your chat to invoke the AI agent to use any MCP tool(s).
@@ -149,4 +184,28 @@ deploy this with defang /Users/yourname/Documents/project1
149
184
do I have a service called project1
150
185
```
151
186
187
+
You can estimate the cost of a deployment to a supported cloud provider:
188
+
189
+
```
190
+
can you estimate balance mode on aws for this project?
191
+
```
192
+
193
+
```
194
+
can you estimate how much this project will cost on gcp?
195
+
```
196
+
197
+
You can list, set and remove Defang configs for a project:
198
+
199
+
```
200
+
what defang configs do I have set for this project?
201
+
```
202
+
203
+
```
204
+
set the defang config DATABASE_URL to example.com
205
+
```
206
+
207
+
```
208
+
remove the defang config DATABASE_URL
209
+
```
210
+
152
211
Feel free to try any of these prompts or create your own!
0 commit comments