Labsco
maverox logo

FDEP MCP Server

โ˜… 4

from maverox

A static code analysis server for enterprise-scale Haskell codebases, providing over 40 comprehensive analysis tools.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

FDEP MCP Server

A Static Code Analysis Model Context Protocol (MCP) server delivering 40+ comprehensive analysis tools for enterprise-scale Haskell codebases. Seamlessly integrates with MCP-compatible AI tools and clients to provide real-time code intelligence and architectural insights.

๐Ÿ”Œ MCP Protocol Compliant | ๐Ÿ—๏ธ 40+ Analysis Tools | โšก Real-time Queries

โœจ MCP Server Features

๐Ÿ“Š 40+ Comprehensive Analysis Tools

  • Module Analysis: 7 tools for module structure and dependencies
  • Function Analysis: 8 tools for call graphs and complexity metrics
  • Type System: 6 tools for type relationships and usage patterns
  • Class Analysis: 3 tools for typeclass and instance analysis
  • Import Analysis: 4 tools for dependency visualization
  • Advanced Queries: 4 tools for complex JSON-based code queries
  • Pattern Analysis: 5 tools for code pattern detection
  • Source Location: 3 tools for location-based analysis
  • Enhanced Analysis: 3 tools for advanced structural analysis

๐Ÿ› ๏ธ MCP Tools Available (40+ Total)

๐Ÿ“ Module Analysis (7 tools)

ToolDescription
initialize_databaseSetup database and import FDEP data
list_modulesGet list of modules with filtering
get_module_detailsDetailed module info with statistics
get_functions_by_moduleList all functions in a module
search_modulesPattern-based module search
get_module_dependenciesModule dependency analysis
get_code_statisticsComprehensive codebase statistics

โšก Function Analysis (8 tools)

ToolDescription
get_function_detailsDetailed function information
search_functionsSearch functions by pattern
get_most_called_functionsFind frequently called functions
get_function_call_graphFunction call hierarchy
get_function_callersWho calls this function
get_function_calleesWhat functions this calls
analyze_function_complexityFunction complexity metrics
get_function_contextComplete function context with dependencies

๐Ÿ—๏ธ Type System Analysis (6 tools)

ToolDescription
list_typesGet types by module/pattern with categories
get_type_detailsType info with constructors/fields
search_typesAdvanced type search with filtering
get_type_dependenciesType dependency analysis
analyze_type_usageType usage patterns
get_nested_typesGet nested type definitions

๐Ÿ“š Class Analysis (3 tools)

ToolDescription
list_classesGet class definitions with filtering
get_class_detailsClass info with instances
search_classesPattern-based class search

๐Ÿ“ฆ Import Analysis (4 tools)

ToolDescription
analyze_importsImport patterns and dependencies
get_import_graphModule import relationship graphs
find_unused_importsPotential cleanup candidates
get_import_detailsComprehensive import information

๐Ÿ” Advanced Queries (4 tools)

ToolDescription
execute_queryBasic SQL queries
execute_advanced_queryJSON-based complex queries with joins
execute_custom_queryCustom SQL queries with parameters
find_cross_module_callsCross-module function usage

๐ŸŽฏ Pattern Analysis (5 tools)

ToolDescription
find_similar_functionsFind functions similar to a given function
find_code_patternsFind recurring code patterns
group_similar_functionsGroup functions by similarity
build_type_dependency_graphBuild comprehensive type dependency graph
analyze_type_relationshipsAnalyze deep type relationships

๐Ÿ“ Source Location (3 tools)

ToolDescription
find_element_by_locationFind code elements by source location
get_location_contextGet context around a source location
generate_function_importsGenerate import statements for functions

๐Ÿ”ฌ Enhanced Analysis (3 tools)

ToolDescription
pattern_match_codeAdvanced pattern matching for code structures
analyze_cross_module_dependenciesComprehensive dependency analysis
enhanced_function_call_graphEnhanced call graphs with advanced options

๐Ÿ” Example Queries

Basic Analysis

# Search for validation functions
search_functions(pattern="validation", limit=10)

# Get details about main functions  
get_function_details(function_name="main")

# Find most called functions
get_most_called_functions(limit=20)

# List modules in a specific area
list_modules(limit=50)

Advanced Analysis

# Get function call hierarchy
get_function_call_graph(function_name="processData", depth=3)

# Analyze type dependencies
get_type_dependencies(type_name="User", include_dependents=true)

# Find cross-module function calls
find_cross_module_calls(source_module="Services", target_module="Database")

# Complex JSON query
execute_advanced_query({
  "type": "function",
  "conditions": [
    {"field": "name", "operator": "like", "value": "%Handler%"}
  ],
  "limit": 50
})

Architectural Analysis

# Module dependency analysis
get_module_dependencies(module_name="Core.Services", include_dependents=true)

# Import relationship graph
get_import_graph(root_module="Main", depth=3)

# Complexity analysis
analyze_function_complexity(module_name="BusinessLogic", min_complexity=5)

# Comprehensive statistics
get_code_statistics(include_details=true)