nx-mcp v0.0.7
Nx MCP Server
A Model Context Protocol server implementation for Nx.
Overview
The Nx MCP Server provides structured context about your Nx workspace to AI assistant models, enabling them to better understand and interact with your Nx projects. It serves as a bridge between AI models and your Nx workspace and documentation.
Installation
Simply invoke the MCP server via npx
or your package manager's equivalent.
npx nx-mcp /path/to/nx/workspace
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
, you can use the --sse
and --port
flags. Keep in mind that the Nx MCP server only supports a single concurrent connection right now, so connecting multiple clients at the same time might break in some cases.
Run nx-mcp --help
to see what options are available.
Available Tools
Currently, the Nx MCP server provides a set of tools. Resources, Roots and Prompts aren't supported yet.
- nx_workspace: Returns an annotated representation of the local nx configuration and the project graph
- nx_project_details: Returns the full project configuration for a specific nx project
- nx_docs: Retrieves documentation sections relevant to user queries
- nx_generators: Returns a list of available generators in the workspace
- nx_generator_schema: Provides detailed schema information for a specific generator
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-mcp
usingnx run nx-mcp:build
(ornx run nx-mcp:build:debug
for debugging with source maps) - Use the MCP Inspector to test out your changes