FDEP

Provides a static analysis MCP server with 40+ tools for enterprise-scale Haskell code, enabling real-time queries and insights.
  • python

4

GitHub Stars

python

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "juspay-fdep-mcp-server": {
      "command": "fdep-mcp-server",
      "args": [],
      "env": {
        "DB_HOST": "localhost",
        "DB_NAME": "code_as_data",
        "DB_PORT": "5432",
        "DB_USER": "postgres",
        "FDEP_PATH": "<path-to-fdep-output>",
        "LOG_LEVEL": "INFO",
        "DB_PASSWORD": "postgres"
      }
    }
  }
}

You run a Static Code Analysis MCP server that provides real-time code intelligence for Haskell projects. It exposes 40+ specialized analysis tools through the MCP protocol, enabling you to query modules, functions, types, imports, and more to gain architectural insights across large codebases.

How to use

Connect your MCP client to the FDEP MCP Server to start querying your Haskell codebase. You will configure your client to point at the local or remote MCP endpoint, then run queries to explore modules, functions, types, imports, and advanced analyses. Common actions include listing modules, inspecting module details, building function call graphs, and executing complex JSON-based queries to discover cross-module relationships.

How to install

Prerequisites you need before installation:

  • Python 3.13+
  • UV package manager
  • PostgreSQL database (must be running)
  • FDEP output from Spider plugin for comprehensive analysis

Database setup must be completed before starting the MCP server.

# Start PostgreSQL (if not already running)
# On macOS with Homebrew:
brew services start postgresql

# On Ubuntu/Debian:
sudo systemctl start postgresql

# Create the database
createdb code_as_data # this should match with your $DB_NAME value

Installation options (choose one):

# Clone the repository
git clone https://github.com/juspay/fdep-mcp-server.git
cd fdep_mcp

# Install globally with UV (recommended)
uv tool install .

# OR install globally with pipx
# pipx install .

# OR system-wide installation
# pip install .vi

Initial setup and data import must be completed before using the MCP server with any client.

fdep-mcp-server --setup --verbose

Configure environment variables for the server start and database connections.

cp .env.example .env
# Edit .env with your database settings and FDEP_PATH

Additional configuration and notes

Environmental variables you will typically configure include the path to your FDEP output and your database connection details. You can verify the MCP connection after starting the server by listing available servers and performing a simple query like listing a few modules.

Typical environment variable set for all clients includes:

# Required
FDEP_PATH=/path/to/your/fdep/output

# Database (if different from defaults)
DB_HOST=localhost
DB_PORT=5432
DB_NAME=code_as_data
DB_USER=postgres
DB_PASSWORD=postgres

# Optional
LOG_LEVEL=INFO

Verify Connection

After configuring your client, start the MCP client and look for the fdepAnalyzer server in the available MCP servers. Run a simple query such as listing modules to confirm a successful connection and data import.

Available tools

initialize_database

Setup database schema and import FDEP data to initialize the MCP environment.

list_modules

Retrieve a list of modules with optional filtering to explore the codebase structure.

get_module_details

Fetch detailed information about a specific module, including statistics.

get_functions_by_module

List all functions contained in a given module.

search_modules

Search modules by pattern or criteria to locate relevant areas.

get_module_dependencies

Analyze dependency relationships between modules.

get_code_statistics

Provide comprehensive statistics about the codebase.

get_function_details

Get detailed information about a specific function.

search_functions

Search for functions by pattern across modules.

get_most_called_functions

Identify the most frequently called functions.

get_function_call_graph

Generate the function call hierarchy for a given function.

get_function_callers

List the callers of a specific function.

get_function_callees

List the functions called by a specific function.

analyze_function_complexity

Compute complexity metrics for a function.

get_function_context

Provide the complete context of a function with its dependencies.

list_types

List types by module or pattern with categorization.

get_type_details

Show detailed information about a type, including constructors and fields.

search_types

Advanced type search with filtering options.

get_type_dependencies

Analyze how types depend on one another.

analyze_type_usage

Identify usage patterns of types across the codebase.

get_nested_types

Retrieve nested type definitions.

list_classes

List class definitions with filtering options.

get_class_details

Show class information including instances.

search_classes

Pattern-based search for classes.

analyze_imports

Analyze import patterns and dependencies.

get_import_graph

Generate a graph of module import relationships.

find_unused_imports

Identify imports that may be unused and candidates for cleanup.

get_import_details

Provide comprehensive information about imports.

execute_query

Run basic JSON-based SQL-like queries.

execute_advanced_query

Perform JSON-based complex queries with joins.

execute_custom_query

Run custom SQL queries with parameters.

find_cross_module_calls

Find calls that cross module boundaries.

find_similar_functions

Locate functions similar in structure or name.

find_code_patterns

Detect recurring code patterns across the codebase.

group_similar_functions

Group functions by similarity.

build_type_dependency_graph

Create a comprehensive graph of type dependencies.

analyze_type_relationships

Analyze deep relationships between types.

find_element_by_location

Find code elements by source location.

get_location_context

Provide context around a specific source location.

generate_function_imports

Generate import statements for functions.

pattern_match_code

Advanced pattern matching for code structures.

analyze_cross_module_dependencies

Comprehensive cross-module dependency analysis.

enhanced_function_call_graph

Enhanced call graphs with advanced options.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational