
Nx Mcp
io.github.nrwl由 GitHub 账号 nrwl 发布v0.25.0更新于 Nov 10, 2026
A Model Context Protocol server implementation for Nx
概览
Nx MCP 服务器,让 AI 助手深入了解 Nx monorepo:项目关系图、任务、生成器、文档和 Nx Cloud CI 数据。
- 可以做什么
- 检索与问题相关的 Nx 文档章节
- 查看工作区:项目图、nx.json 配置、项目详情、可用插件与生成器 schema(默认精简模式下隐藏)
- 监控正在运行的 Nx 任务:列出 TUI 进程、状态及终端输出
- 可视化 Nx 项目图(需运行中的 IDE 实例)
- 查询 Nx Cloud CI:流水线执行信息、失败任务输出,并应用、拒绝或重跑自愈修复
- 适用场景
- 适用于在 Nx monorepo 中开发时,希望助手按现有技术栈生成代码、分析改动影响,或排查 Nx Cloud 上失败的 CI 运行。
- 运行要求
- 以 stdio 本地运行,通常用 npx nx-mcp@latest 启动;也可加 --transport http 在本机端口提供 HTTP 服务。需要 Nx 工作区;Nx Cloud 工具与 CI 资源需工作区启用 Nx Cloud。未声明环境变量或认证。
安装
在 SourceWeft 中
- 打开 控制台中的 Nx Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Nx MCP Server
A Model Context Protocol server implementation for Nx.
Overview
The Nx MCP server gives LLMs deep access to your monorepo’s structure: project relationships, file mappings, runnable tasks, ownership info, tech stacks, Nx generators, and even Nx documentation. With this context, LLMs can generate code tailored to your stack, understand the impact of a change, and apply modifications across connected files with precision. This is possible because Nx already understands the higher-level architecture of your workspace, and monorepos bring all relevant projects into one place.
Read more in our blog post and in our docs.
Installation and Usage
There are two ways to use this MCP server:
a) Run it via the nx-mcp package
Simply invoke the MCP server via npx or your package manager's equivalent.
Here's an example of a mcp.json configuration:
Claude Code
VSCode
Warp
Go to Settings -> AI -> Manage MCP Servers -> + Add to add an MCP Server.
Alternatively, use the slash command /add-mcp in the Warp Agent prompt.
Refer to your AI tool's documentation for how to register an MCP server. For example, Cursor or Claude Desktop support MCP.
If you want to host the server instead of communicating via stdio, use --transport http and optionally --port (default 9921). Clients connect to http://localhost:<port>/mcp using the Streamable HTTP transport. It supports multiple concurrent connections, allowing different clients to connect simultaneously with independent sessions. The deprecated SSE transport (--sse, --transport sse) has been removed.
Run nx-mcp --help to see what options are available.
b) Use the Nx Console extension
If you're using Cursor you can directly install the Nx Console extension which automatically manages the MCP server for you.
More info:
Minimal Mode (Default)
By default, the Nx MCP server runs in minimal mode, which hides workspace analysis tools that overlap with AI tool skills/instructions. This reduces tool clutter and context window usage for AI agents that already have access to equivalent functionality through skills.
The following tools are hidden in minimal mode:
nx_available_pluginsnx_workspace_pathnx_workspacenx_project_detailsnx_generatorsnx_generator_schema
To disable minimal mode and expose all tools, use the --no-minimal flag:
Available Tools
The Nx MCP server provides a comprehensive set of tools for interacting with your Nx workspace.
Always Available
- nx_docs: Returns documentation sections relevant to user queries about Nx
- nx_current_running_tasks_details: Lists currently running Nx TUI processes and task statuses
- nx_current_running_task_output: Returns terminal output for specific running tasks
- nx_visualize_graph: Visualizes the Nx graph (requires running IDE instance)
Hidden in Minimal Mode (use --no-minimal to enable)
- nx_available_plugins: Lists available Nx plugins from the core team and local workspace plugins
- nx_workspace_path: Returns the path to the Nx workspace root
- nx_workspace: Returns readable representation of project graph and nx.json configuration
- nx_project_details: Returns complete project configuration in JSON format for a given project
- nx_generators: Returns list of generators relevant to user queries
- nx_generator_schema: Returns detailed JSON schema for a specific Nx generator
Nx Cloud Tools (only available w/ Nx Cloud enabled)
These tools provide insights and interactions with your Nx Cloud CI/CD data:
- ci_information: Retrieves CI pipeline execution information for the current branch or a specific Nx Cloud URL. Returns failed tasks with
runIdmetadata and supports aselectparameter for field selection with pagination. - ci_task_output: Retrieves terminal output for a specific failed CI task, using a
runIdfromci_informationor resolving it from the branch / URL context. - update_self_healing_fix: Apply, reject, or request a rerun for a self-healing CI fix from Nx Cloud
When no workspace path is specified, only the nx_docs and nx_available_plugins tools will be available.
Available Resources
When connected to an Nx Cloud-enabled workspace, the Nx MCP server automatically exposes recent CI Pipeline Executions (CIPEs) as MCP resources. Resources appear in your AI tool's resource picker, allowing the LLM to access detailed information about CI runs including failed tasks, terminal output, and affected files.
Contributing & Development
Contributions are welcome! Please see the Nx Console contribution guide for more details.
The basic steps are:
- Clone the Nx Console repository and follow installation steps
- Build the
nx-mcpusingnx run nx-mcp:build(ornx run nx-mcp:build:debugfor debugging with source maps) - Use the MCP Inspector to test out your changes
Configuration File
You can also configure the MCP server via a JSON file at .nx/nx-mcp-config.json in your workspace root. This is useful when the MCP server binary is managed by a plugin or extension where you can't pass CLI args directly.
All keys are optional and match the CLI option names. CLI arguments take precedence over config file values.
License
来源:apps/nx-mcp/README.md,提交 690e94c
工具
0版本历史
1- v0.25.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分