Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

nuanced-mcp

MCP.Pizza Chef: MattMorgis

The nuanced-mcp is an MCP server that enables LLMs to analyze Python code structure by exposing function call graphs through the nuanced library. It supports initializing call graphs for repositories, exploring function relationships, and analyzing dependencies, empowering AI assistants with deeper contextual code understanding and navigation capabilities.

Use This MCP server To

Initialize call graphs for Python repositories Explore function call relationships in codebases Analyze dependencies between functions Switch between multiple initialized repositories List all initialized code repositories Retrieve call graphs for specific functions Support AI code assistants with contextual code insights

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",
        "/path/to/nuanced-mcp",
        "run",
        "nuanced_mcp_server.py"
      ]
    }
  }
}

nuanced-mcp FAQ

How do I initialize a call graph for a repository?
Use the initialize_graph tool with the repository path to build the call graph for that Python repo.
Can I switch between different repositories?
Yes, the switch_repository tool allows switching to another initialized repository by providing its path.
What programming languages does nuanced-mcp support?
It currently supports Python repositories for call graph analysis.
How does nuanced-mcp improve AI code assistance?
By providing detailed function call graphs, it enables LLMs to understand code structure and dependencies better, enhancing contextual code help.
Is there a way to list all repositories currently initialized?
Yes, the list_repositories tool returns all repositories that have been initialized for analysis.
What kind of function call information can I retrieve?
You can get detailed call graphs for specific functions, showing their callers and callees within the repo.
Does nuanced-mcp integrate with multiple LLM providers?
Yes, it is designed to work with various LLMs like OpenAI, Claude, and Gemini through the MCP protocol.
How do I provide the repository path for analysis?
The repository path is passed as a string input to the initialize_graph or switch_repository tools.