Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl

Nx MCP サーバー

npmバージョン

Nx用のモデルコンテキストプロトコルサーバーの実装。

概要

Nx MCPサーバーは、LLMにモノレポの構造への詳細なアクセスを提供します。プロジェクトの関係性、ファイルのマッピング、実行可能なタスク、オーナーシップ情報、技術スタック、Nxジェネレータ、さらにはNxドキュメントまで、あらゆる情報にアクセスできます。このコンテキストに基づき、LLMはスタックに合わせてコードを生成し、変更の影響を理解し、接続されたファイル全体に変更を正確に適用できます。これは、Nxがワークスペースの高レベルアーキテクチャを既に理解しており、モノレポが関連するすべてのプロジェクトを1か所にまとめているためです。

詳細については、ブログ投稿とドキュメントをご覧ください。

Related MCP server: reposynapse

インストールと使用方法

この MCP サーバーを使用するには、次の 2 つの方法があります。

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"]}'

MCPサーバーの登録方法については、AIツールのドキュメントを参照してください。例えば、 CursorやClaude DesktopはMCPをサポートしています。

stdio経由ではなくサーバーをホストしたい場合は、 --sseおよび--portフラグを使用できます。Nx MCP サーバーは現在、単一の同時接続のみをサポートしているため、複数のクライアントに同時に接続すると、場合によっては問題が発生する可能性があります。

利用可能なオプションを確認するにはnx-mcp --helpを実行します。

b) Nxコンソール拡張機能を使用する

Cursor を使用している場合は、MCP サーバーを自動的に管理する Nx Console 拡張機能を直接インストールできます。

詳細情報:

利用可能なツール

現在、Nx MCP サーバーはツールセットを提供しています。リソース、ルート、プロンプトはまだサポートされていません。

  • 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 貢献ガイドをご覧ください。

基本的な手順は次のとおりです。

  1. Nxコンソールリポジトリをクローンし、インストール手順に従います。

  2. nx run nx nx-mcp``nx run nx-mcp:buildをビルドします (または、ソース マップを使用してデバッグする場合はnx run nx-mcp:build:debug )。

  3. MCPインスペクタを使用して変更をテストします

ライセンス

マサチューセッツ工科大学

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

  • Give your AI agent persistent, governed memory for every project. At task start it recalls the approved decisions, conventions, risks and architecture (semantic search, ranked by importance); at close it proposes what was learned as typed memories that you review and approve — governance, not a notes dump. Agents propose, humans govern: edits go back to pending and deletion is human-only by design. Connect Claude Code, Cursor, Claude Desktop or any MCP client in two minutes with just your API key — hosted (nothing to install) or locally via `uvx solucortex-mcp`. Built by SoluAI and dogfooded daily: SoluCortex is developed using its own living memory.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    A 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.
    7
    15 npm
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Universal MCP server that analyzes any codebase and provides structured context to AI assistants. Dynamic, accurate, and token-efficient.
    18
    7 npm
    MIT