
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 分