Skip to content

Commit 9ffeed5

Browse files
committed
update mcp doc
1 parent 3012586 commit 9ffeed5

File tree

1 file changed

+69
-10
lines changed

1 file changed

+69
-10
lines changed

docs/concepts/mcp.md

Lines changed: 69 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ This page is a guide to the Defang MCP Server detailing its installation, tools,
2020

2121
## Installation
2222

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/)
2726
:::
27+
2828
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:
2929

3030
```bash
31-
npx -y defang@latest mcp setup --client=<your-ide>
31+
defang mcp setup --client=<your-ide>
3232
```
3333

3434
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
3737

3838
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.
3939

40+
:::warning
41+
'npx' is supported but not recommended
42+
43+
```bash
44+
npx -y defang@latest mcp setup --client=<your-ide>
45+
```
46+
47+
:::
48+
4049
## Supported IDEs
4150

4251
### Cursor
4352

4453
Setup command:
4554

4655
```bash
47-
npx -y defang@latest mcp setup --client=cursor
56+
defang mcp setup --client=cursor
4857
```
4958

5059
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
5665
Setup command:
5766

5867
```bash
59-
npx -y defang@latest mcp setup --client=windsurf
68+
defang mcp setup --client=windsurf
6069
```
6170

6271
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
6877
Setup command:
6978

7079
```bash
71-
npx -y defang@latest mcp setup --client=vscode
80+
defang mcp setup --client=vscode
7281
```
7382

7483
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
8089
Setup command:
8190

8291
```bash
83-
npx -y defang@latest mcp setup --client=vscode-insiders
92+
defang mcp setup --client=vscode-insiders
8493
```
8594

8695
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:
8796

8897
![VS Code](/img/mcp-concept/vscode-insiders.png)
8998

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+
90109
### Claude Desktop
91110

92111
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.
93112

94113
Setup command:
95114

96115
```bash
97-
npx -y defang@latest mcp setup --client=claude
116+
defang mcp setup --client=claude
98117
```
99118

100119
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
121140

122141
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.
123142

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+
124159
## Example Prompts
125160

126161
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
149184
do I have a service called project1
150185
```
151186

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+
152211
Feel free to try any of these prompts or create your own!

0 commit comments

Comments
 (0)