Defang
STDIOOfficial为IDE中AI编程代理提供Defang云部署工具的MCP服务器
为IDE中AI编程代理提供Defang云部署工具的MCP服务器

This directory hosts the Model Context Protocol (MCP) Server, equipped with Defang tools (deploy, services, destroy) to help users manage their services seamlessly using AI coding agents within supported IDEs.
Follow the guide below to get started.
Make sure you have the npm package manager installed, as npx commands are required for setup.
To connect the MCP Server to your IDE, execute the following command in your
npx -y defang@latest mcp setup --client=<your-ide>
Replace <your-ide> with the name of your preferred IDE.
After setup, you can start the MCP Server with the command:
npx -y defang@latest mcp serve
Once the server is running, you can access the Defang MCP tools directly through the AI agent chat in your IDE.
npx -y defang@latest mcp setup --client=cursor
npx -y defang@latest mcp setup --client=windsurf
npx -y defang@latest mcp setup --client=codex
npx -y defang@latest mcp setup --client=vscode
npx -y defang@latest mcp setup --client=vscode-insiders
While this is not an IDE in the traditional sense, it can support MCP servers.
npx -y defang@latest mcp setup --client=claude
Below are the tools available in the Defang MCP Server.
deployThe deploy tool scans your project directory for Dockerfiles and compose.yaml files, then deploys the detected service(s) using Defang. You can monitor the deployment process in the Defang Portal.
servicesThe services tool displays the details of all your services that are currently deployed with Defang. It shows the Service Name, Deployment ID, Public URL and Service Status. If there are no services found, it will display an appropriate message.
destroyGiven 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.
For more details about the Defang MCP Server, please see our official documentation.