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 检查器测试您的更改
执照
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.7111MIT
- Alicense-qualityCmaintenanceUniversal MCP server that analyzes any codebase and provides structured context to AI assistants. Dynamic, accurate, and token-efficient.19MIT
- Alicense-qualityDmaintenanceInstant codebase knowledge graph MCP server. It auto-detects languages, indexes functions, classes, and call chains, enabling LLMs to navigate code in milliseconds.MIT
- Alicense-qualityAmaintenanceA production-ready MCP server that enables AI assistants to intelligently understand, analyze, edit, navigate, and review software projects with multi-workspace support, Git integration, and semantic search.MIT
Related MCP Connectors
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
One shared context your team's AI tools read & write over MCP. No re-explaining. Free.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nrwl/nx-console'
If you have feedback or need assistance with the MCP directory API, please join our Discord server