Nx MCP Server
OfficialNx MCP 服务器
概述
Nx MCP 服务器使 LLM 能够深入访问您的 Monorepo 结构:项目关系、文件映射、可运行任务、所有权信息、技术栈、Nx 生成器,甚至 Nx 文档。在此背景下,LLM 可以生成适合您堆栈的代码,了解更改的影响,并精确地将修改应用于关联的文件。这之所以能够实现,是因为 Nx 已经了解您工作区的更高层级架构,并且 Monorepo 将所有相关项目集中到一处。
Related MCP server: reposynapse
安装和使用
有两种方法可以使用此 MCP 服务器:
a) 通过 nx-mcp 包运行
只需通过npx或包管理器的等效程序调用 MCP 服务器即可。
以下是mcp.json配置的示例:
{
"servers": {
"nx-mcp": {
"type": "stdio",
"command": "npx",
"args": ["nx-mcp@latest", "/path/to/your/workspace"]
}
}
}对于 VSCode 您还可以运行:
code --add-mcp '{"name":"nx-mcp","command":"npx","args":["nx-mcp", "/path/to/your/workspace"]}'请参阅您的 AI 工具的文档,了解如何注册 MCP 服务器。例如, Cursor或Claude Desktop均支持 MCP。
如果您希望托管服务器而不是通过stdio进行通信,可以使用--sse和--port参数。请注意,Nx MCP 服务器目前仅支持单个并发连接,因此同时连接多个客户端在某些情况下可能会中断。
运行nx-mcp --help查看可用的选项。
b) 使用 Nx 控制台扩展
如果您使用 Cursor,您可以直接安装 Nx Console 扩展,它会自动为您管理 MCP 服务器。
更多信息:
可用工具
目前,Nx MCP 服务器提供了一套工具。资源、Roots 和 Prompts 尚不支持。
nx_workspace :返回本地 nx 配置和项目图的注释表示
nx_project_details :返回特定 nx 项目的完整项目配置
nx_docs :检索与用户查询相关的文档部分
nx_generators :返回工作区中可用生成器的列表
nx_generator_schema :提供特定生成器的详细架构信息
nx_available_plugins :从 npm 注册表返回可用的 Nx 插件列表及其描述
当未指定工作区路径时,只有nx_docs和nx_available_plugins工具可用。
贡献与发展
欢迎贡献!更多详情请参阅Nx Console 贡献指南。
基本步骤如下:
克隆Nx Console 存储库并按照安装步骤操作
使用 nx run nx
nx-mcp``nx run nx-mcp:build(或nx run nx-mcp:build:debug使用源映射进行调试)使用MCP 检查器测试您的更改
执照
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
An MCP server that gives your AI access to the source code and docs of all public github repos
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- AlicenseAqualityDmaintenanceA TypeScript-aware MCP server that provides coding agents with repository discovery, code intelligence, and web project context for local codebases. It enables deep symbol navigation, diagnostic reporting, and structural analysis of monorepos without requiring full IDE integration.716 npm1MIT
- AlicenseAqualityDmaintenanceUniversal MCP server that analyzes any codebase and provides structured context to AI assistants. Dynamic, accurate, and token-efficient.1835 npmMIT
- AlicenseBqualityDmaintenanceInstant codebase knowledge graph MCP server. It auto-detects languages, indexes functions, classes, and call chains, enabling LLMs to navigate code in milliseconds.24MIT

Vibgrate AI Contextofficial
AlicenseNot gradedqualityBmaintenanceLocal-first MCP server that gives AI assistants codebase intelligence—code graph, drift analysis, vulnerability attribution, and version-correct library docs—all from the user's machine.1,121 npm6Apache 2.0