Nx MCP Server

nrwl/Nx MCP Server

4.3

Nx MCP Server is hosted online, so all tools can be tested directly either in theInspector tabor in theOnline Client.

If you are the rightful owner of Nx MCP Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Model Context Protocol server implementation for Nx, providing LLMs with deep access to monorepo structures.

Try Nx MCP Server with chat:

MCPHub score:4.25

Has a README

Github repo has a README.md.

Has a License

Github repo has license info.

Server can be inspected

View server inspector

Server schema can be extracted

Can get at lease one tool info from the README or server.

Online hosted on MCPHub

Can be automatically deployed by MCPHub.

Has social accounts

Do not have any social accounts.

Claimed by the author or certified by MCPHub

If you are the author, claim authorship

AI Evaluation Report
Total Score: 8/10

The agent demonstrates a strong understanding of Nx Console's capabilities and provides comprehensive, accurate, and clear guidance on various tasks related to Nx Console. It effectively outlines steps for integrating Nx Console with JetBrains IDEs, creating and using custom schematics, visualizing dependency graphs, and managing configuration files. The agent's responses are well-structured and informative, catering to users of varying experience levels. However, there are areas for improvement, such as addressing potential issues users might encounter, updating outdated information (e.g., the deprecation of workspace.json), and providing more detailed instructions for GUI-based tasks. Additionally, including visual aids and troubleshooting tips would enhance the responses' applicability and user-friendliness. Overall, the agent performs well but could benefit from minor refinements to fully align with current practices and user needs.

  • Test case 1
    Score: 5/10
    What are the key features introduced in the latest version of Nx Console?

    To provide you with the most accurate and up-to-date information about the latest features in Nx Console, I will perform a quick search. Please hold on for a moment while I gather the details.

  • Test case 2
    Score: 8/10
    How can I integrate Nx Console with JetBrains IDEs to enhance my development workflow?

    Integrating Nx Console with JetBrains IDEs can significantly enhance your development workflow by providing a more intuitive interface for managing Nx workspaces. Here's a step-by-step guide on how to achieve this integration:

    Step 1: Install Nx Console Plugin

    1. Open JetBrains IDE: Launch your preferred JetBrains IDE (e.g., WebStorm, IntelliJ IDEA).
    2. Access Plugins: Go to File > Settings (or Preferences on macOS) > Plugins.
    3. Search for Nx Console: In the Plugins window, search for "Nx Console".
    4. Install the Plugin: Click on the "Install" button next to the Nx Console plugin.
    5. Restart the IDE: After installation, restart your IDE to activate the plugin.

    Step 2: Configure Nx Console

    1. Open Nx Console: Once the IDE restarts, you can open Nx Console from the View > Tool Windows > Nx Console.
    2. Select Nx Workspace: If you have multiple Nx workspaces, select the one you want to work with.
    3. Configure Settings: You can configure various settings such as default project, target, and more within the Nx Console settings.

    Step 3: Use Nx Console Features

    1. Run Nx Commands: Use the Nx Console to run various Nx commands like generate, build, serve, and test with a graphical interface.
    2. Generate Code: Easily generate new components, libraries, and applications using the generate command with a guided interface.
    3. Manage Projects: View and manage all your Nx projects and their configurations directly from the console.
    4. View Logs: Access logs and outputs of your commands directly within the IDE for easier debugging.

    Benefits of Using Nx Console with JetBrains IDEs

    • Improved Productivity: The graphical interface simplifies command execution, reducing the need to remember CLI commands.
    • Error Reduction: The guided interface helps prevent errors by providing options and defaults.
    • Enhanced Debugging: Integrated logs and outputs make it easier to troubleshoot issues.
    • Streamlined Workflow: Manage all aspects of your Nx workspace from within the IDE, reducing context switching.

    By integrating Nx Console with JetBrains IDEs, you can streamline your development process, making it more efficient and less error-prone. This setup is particularly beneficial for developers working on large Nx workspaces with multiple projects.

  • Test case 3
    Score: 8/10
    How can I create and use custom schematics in Nx Console to automate repetitive tasks in my Nx workspace?

    Creating and using custom schematics in Nx Console can significantly streamline and automate repetitive tasks in your Nx workspace. Here's a step-by-step guide to help you get started:

    Step 1: Set Up Your Nx Workspace

    1. Install Nx CLI: Ensure you have the Nx CLI installed globally. You can do this by running:

      npm install -g nx
      
    2. Create an Nx Workspace: If you don't have an Nx workspace yet, create one using:

      npx create-nx-workspace@latest
      

    Step 2: Create a Custom Schematic

    1. Generate a New Schematic: Use the Nx CLI to generate a new schematic. Navigate to your workspace directory and run:

      nx generate @nrwl/workspace:schematic my-schematic
      

      Replace my-schematic with the name of your schematic.

    2. Modify the Schematic: Navigate to the generated schematic files, typically located in tools/schematics/my-schematic. Modify the index.ts file to define the tasks you want to automate. This might involve creating files, modifying existing files, or running commands.

    3. Define Schema: Update the schema.json file to define the options your schematic will accept. This file describes the inputs your schematic can take, such as project name, directory, etc.

    4. Test the Schematic: Before using it in your workspace, test your schematic to ensure it behaves as expected. You can run:

      nx workspace-schematic my-schematic
      

    Step 3: Use Custom Schematic in Nx Console

    1. Open Nx Console: Launch Nx Console, which is a GUI for managing Nx workspaces. You can open it as a VSCode extension or as a standalone application.

    2. Locate Your Schematic: In Nx Console, navigate to the "Generate" section. You should see your custom schematic listed there.

    3. Run the Schematic: Select your schematic, fill in the required options as defined in your schema.json, and execute it. Nx Console will provide a user-friendly interface to input parameters and run the schematic.

    Step 4: Automate and Integrate

    1. Automate Tasks: Use your custom schematic to automate repetitive tasks across your projects. This can include setting up new projects, adding configurations, or generating boilerplate code.

    2. Integrate with CI/CD: Consider integrating your schematics into your CI/CD pipeline to automate tasks during the build or deployment process.

    Additional Tips

    • Documentation: Keep your schematics well-documented to make it easier for team members to understand and use them.
    • Version Control: Store your schematics in version control to track changes and collaborate with others.
    • Community Schematics: Explore existing community schematics for inspiration or to extend your workspace capabilities.

    By following these steps, you can create powerful custom schematics in Nx Console to enhance productivity and maintain consistency across your Nx workspace.

  • Test case 4
    Score: 8/10
    How can I visualize and analyze the dependency graph of my Nx workspace using Nx Console?

    Visualizing and analyzing the dependency graph of your Nx workspace using Nx Console is a straightforward process. Nx Console is a powerful tool that provides a graphical interface for managing and interacting with your Nx workspace. Here’s how you can visualize and analyze the dependency graph:

    Steps to Visualize the Dependency Graph

    1. Install Nx Console:

      • If you haven't already, install Nx Console as a Visual Studio Code extension. You can find it in the Extensions Marketplace by searching for "Nx Console."
    2. Open Your Nx Workspace:

      • Launch Visual Studio Code and open your Nx workspace. Ensure that your workspace is properly set up with Nx.
    3. Access Nx Console:

      • Once your workspace is open, navigate to the Nx Console panel. You can find it in the sidebar of Visual Studio Code.
    4. Generate the Dependency Graph:

      • In the Nx Console, look for the option to generate the dependency graph. This is typically found under the "Run" or "Graph" section.
      • Click on "Generate Graph" or a similar option. This will trigger Nx to analyze your workspace and generate a visual representation of the dependencies between your projects.
    5. View the Graph:

      • The dependency graph will be displayed in a new window or tab. It visually represents how different projects in your workspace are interconnected.
      • You can interact with the graph by zooming in and out, panning, and clicking on individual nodes to see more details about each project.

    Analyzing the Dependency Graph

    • Identify Dependencies:

      • Use the graph to identify which projects depend on others. This can help you understand the impact of changes in one project on others.
    • Detect Circular Dependencies:

      • Look for circular dependencies, which can cause issues in your build process. The graph makes it easier to spot these problematic relationships.
    • Optimize Project Structure:

      • Analyze the graph to find opportunities to optimize your project structure. You might discover that some projects can be refactored to reduce complexity.
    • Focus on Critical Paths:

      • Identify critical paths in your project dependencies. These are paths where changes can have the most significant impact on your workspace.

    Additional Tips

    • Use Filters:

      • Nx Console often provides filtering options to focus on specific parts of the graph, such as only showing certain types of projects or dependencies.
    • Export the Graph:

      • If needed, you can export the graph for documentation or further analysis outside of Nx Console.

    By following these steps, you can effectively visualize and analyze the dependency graph of your Nx workspace, helping you manage and optimize your projects more efficiently.

  • Test case 5
    Score: 8/10
    How can I manage and edit configuration files like `workspace.json` or `nx.json` using Nx Console to customize my Nx workspace settings?

    Managing and editing configuration files like workspace.json or nx.json using Nx Console is a straightforward process that can greatly enhance your productivity when working with Nx workspaces. Here's a step-by-step guide on how to do it:

    Step 1: Install Nx Console

    First, ensure that you have Nx Console installed. Nx Console is available as a Visual Studio Code extension, which provides a graphical interface for managing Nx workspaces.

    • Install Nx Console: Open Visual Studio Code, go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window, and search for "Nx Console". Click "Install" to add it to your editor.

    Step 2: Open Your Nx Workspace

    • Open Workspace: Open your Nx workspace in Visual Studio Code. You can do this by selecting "File" > "Open Folder" and navigating to the root directory of your Nx workspace.

    Step 3: Access Nx Console

    • Access Nx Console: Once your workspace is open, you can access Nx Console by clicking on the Nx icon in the Activity Bar. This will open the Nx Console panel.

    Step 4: Navigate to Configuration Files

    • Locate Configuration Files: In the Nx Console panel, you will see a list of projects and tools available in your workspace. Look for the "Configuration" section or use the search bar to find workspace.json or nx.json.

    Step 5: Edit Configuration Files

    • Edit Files: Click on the configuration file you want to edit. Nx Console provides a user-friendly interface to modify these files. You can change settings, add new configurations, or update existing ones directly from the console.

    Step 6: Save Changes

    • Save Changes: After making the necessary changes, ensure you save the file. Nx Console will automatically update the configuration in your workspace.

    Additional Tips

    • Validation and Suggestions: Nx Console often provides validation and suggestions as you edit configuration files, helping you avoid errors.
    • Command Execution: You can also run Nx commands directly from the console, which can be useful for testing changes immediately.
    • Documentation: Refer to the official Nx documentation for detailed explanations of configuration options available in workspace.json and nx.json.

    By using Nx Console, you can efficiently manage and customize your Nx workspace settings without manually editing JSON files, reducing the risk of syntax errors and improving your workflow.