MN

mattmorgis/nuanced-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

18 stars 6 forks 品質 45 トレンド 22

Nuanced ライブラリを介して LLM にコールグラフ解析機能を提供するモデルコンテキストプロトコル(MCP)サーバー

概要

Nuanced ライブラリを介して LLM にコールグラフ解析機能を提供するモデルコンテキストプロトコル(MCP)サーバー。 このMCPサーバーでは、LLMが標準化されたツールやリソースを介して関数呼び出しグラフにアクセスすることで、コード構造を理解することができます。 これにより、AI アシスタントが次のようになります。 - Pythonリポジトリのコールグラフを初期化 - 関数呼び出しの関係を調べる - 関数間の依存関係を分析する - より文脈的に認識されたコードの援助を提供 - 指定したリポジトリパスのコードグラフを初期化 - 入力:repo path (string) - 別の初期化リポジトリに切り替える - 入力:repo path(string) - すべての初期化リポジトリを一覧表示 - 必要な入力なし - 特定の関数の呼び出しグラフを取得する - 入力: - file path (string) - functions name (string) - repo path (string, Optional) - 指定されていない場合にアクティブなリポジトリを使用する - コードベースですべてのモジュールまたはファイル依存関係を検索 - 入力(少なくとも1つが必要です): - file path(string、オプション) - module name(string、...

概要(AI 翻訳)

Nuanced ライブラリを介して LLM にコールグラフ解析機能を提供するモデルコンテキストプロトコル(MCP)サーバー。

概要

このMCPサーバーでは、LLMが標準化されたツールやリソースを介して関数呼び出しグラフにアクセスすることで、コード構造を理解することができます。 これにより、AI アシスタントが次のようになります。

  • Pythonリポジトリの呼び出しグラフを初期化
  • 関数呼び出しの関係を調べる
  • 関数間の依存関係の分析
  • より文脈的に認識されるコードの援助を提供して下さい

API の

ツール

  • initialize graph

  • 指定したリポジトリパスのコードグラフを初期化

  • 入力: repo_path (文字列)

  • switch repository

  • 異なる初期化リポジトリに切り替える

  • 入力: repo_path (文字列)

  • list repositories

  • 初期化されたリポジトリをすべてリストする

  • 必要な入力無し

  • get function call graph

  • 特定の関数の呼び出しグラフを取得する

  • 入力:

  • [file_path (文字列)

  • [function_name (文字列)

  • [repo_path (文字列、オプション) - 指定された場合は、アクティブなリポジトリを使用します

  • analyze 依存関係

  • コードベースですべてのモジュールやファイル依存関係を検索する

  • 入力(少なくとも1つ必要):

  • file_path

  • module_name

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Nuanced MCP Server

A Model Context Protocol (MCP) server that provides call graph analysis capabilities to LLMs through the nuanced library.

Overview

This MCP server enables LLMs to understand code structure by accessing function call graphs through standardized tools and resources. It allows AI assistants to:

  • Initialize call graphs for Python repos
  • Explore function call relationships
  • Analyze dependencies between functions
  • Provide more contextually aware code assistance

API

Tools

  • initialize_graph

    • Initialize a code graph for the given repository path
    • Input: repo_path (string)
  • switch_repository

    • Switch to a different initialized repository
    • Input: repo_path (string)
  • list_repositories

    • List all initialized repositories
    • No inputs required
  • get_function_call_graph

    • Get the call graph for a specific function
    • Inputs:
      • file_path (string)
      • function_name (string)
      • repo_path (string, optional) - uses active repository if not specified
  • analyze_dependencies

    • Find all module or file dependencies in the codebase
    • Inputs (at least one required):
      • file_path (string, optional)
      • module_name (string, optional)
  • analyze_change_impact

    • Analyze the impact of changing a specific function
    • Inputs:
      • file_path (string)
      • function_name (string)

Resources

  • graph://summary

    • Get a summary of the currently loaded code graph
    • No parameters required
  • graph://repo/{repo_path}/summary

    • Get a summary of a specific repository’s code graph
    • Parameters:
      • repo_path (string) - Path to the repository
  • graph://function/{file_path}/{function_name}

    • Get detailed information about a specific function
    • Parameters:
      • file_path (string) - Path to the file containing the function
      • function_name (string) - Name of the function to analyze

Prompts

  • analyze_function

    • Create a prompt to analyze a function with its call graph
    • Parameters:
      • file_path (string) - Path to the file containing the function
      • function_name (string) - Name of the function to analyze
  • impact_analysis

    • Create a prompt to analyze the impact of changing a function
    • Parameters:
      • file_path (string) - Path to the file containing the function
      • function_name (string) - Name of the function to analyze
  • analyze_dependencies_prompt

    • Create a prompt to analyze dependencies of a file or module
    • Parameters (at least one required):
      • file_path (string, optional) - Path to the file to analyze
      • module_name (string, optional) - Name of the module to analyze

Usage with Claude Desktop

Add this to your claude_desktop_config.json

UV

{
  "mcpServers": {
    "nuanced": {
      "command": "uv",
      "args": [
        "--directory",
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "nuanced": { "command": "uv", "args": [ "--directory", "/path/to/nuanced-mcp", "run", "nuanced_mcp_server.py" ] } } }