使用 AI 构建
安装 Claude Plugin、Kiro Power 或 MCP Server 以使 AI 助手能够有效地使用该插件。通过使用这些工具,您可以通过 AI 加速开发工作流程,同时受益于以一致的方式搭建项目,在设置主要组件时花费更少的时间,并受益于插件内置的安全性、可观测性、类型安全和本地开发功能。
配置您的 AI 助手
Section titled “配置您的 AI 助手”Nx AWS 插件作为 Kiro Power 发布,它将 MCP 服务器与引导文档和工作流指南打包在一起。
-
在 Kiro 中打开 Powers 面板,点击 Add power from GitHub
-
输入以下 URL:
https://github.com/awslabs/nx-plugin-for-aws/tree/release/0.x/powers/nx-plugin-for-aws -
点击 Install
Kiro 会自动配置 MCP 服务器——无需额外设置。
运行以下命令:
kiro-cli mcp add \ --name nx-plugin-for-aws \ --scope global \ --command npx \ --args "-y,@aws/nx-plugin-mcp"详情请参阅 Kiro CLI MCP 文档。
Nx AWS 插件作为 Claude Code 插件发布,它将 Skill 与 MCP 服务器打包在一起。
在 Claude Code 中依次运行以下命令:
/plugin marketplace add awslabs/nx-plugin-for-aws/plugin install nx-plugin-for-aws@nx-plugin-for-aws然后运行 /reload-plugins 来激活插件。
将以下内容添加到 ~/.cursor/mcp.json(或项目中的 .cursor/mcp.json):
{ "mcpServers": { "nx-plugin-for-aws": { "command": "npx", "args": ["-y", "@aws/nx-plugin-mcp"] } }}详情请参阅 Cursor MCP 文档。
将以下内容添加到 ~/.codex/config.toml:
[mcp_servers.nx-plugin-for-aws]command = "npx"args = ["-y", "@aws/nx-plugin-mcp"]详情请参阅 Codex 配置文档。
大多数兼容 MCP 的助手使用 JSON 配置文件。添加以下配置项:
{ "mcpServers": { "nx-plugin-for-aws": { "command": "npx", "args": ["-y", "@aws/nx-plugin-mcp"] } }}如果遇到 ENOENT npx 等问题,请将命令替换为 npx 的完整路径(使用 which npx 查找)。
特定助手的文档请参考:
开始智能编码
Section titled “开始智能编码”让您的 AI 助手使用 nx-plugin-for-aws 进行构建!它通常会创建工作区,使用适用的生成器搭建框架,然后填充业务逻辑。
尝试这样的提示:
“Build a multi-agent application using the Nx Plugin for AWS. I want a React frontend that talks to a backend orchestrator agent which delegates to specialised research and writing agents.”
或者从一个更小的起点开始:
“Use the Nx Plugin for AWS to scaffold a React website backed by a tRPC API, with Cognito auth and CDK infrastructure.”
构建自定义 MCP 服务器
Section titled “构建自定义 MCP 服务器”查看 ts#mcp-server 生成器指南 了解如何构建自定义 MCP 服务器的详细信息。