Get the FREE Ultimate OpenClaw Setup Guide →

fdep

Model Context Protocol (MCP) Server for Advanced Haskell Code Analysis - 40+ Comprehensive Analysis Tools

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio juspay-fdep-mcp-server uvx fdep-mcp-server \
  --env FDEP_PATH="Path to your FDEP output directory"

How to use

The FDEP MCP Server is a static code analysis hub for Haskell projects. It exposes 40+ analysis tools through the MCP protocol, allowing clients to query module structure, dependencies, functions, types, imports, and advanced code queries in real time. After you start the server and connect it to your FDEP data, you can run modular queries such as listing modules, inspecting function call graphs, examining type dependencies, and retrieving comprehensive code statistics. The server is designed to integrate with MCP-compatible clients (e.g., Claude Code, Cursor, VS Code MCP extension, Cline, Continue.dev) so you can query your Haskell codebase from your preferred editor or automation tool. Start by ensuring your FDEP data is loaded, then use the available tools to explore modules, functions, types, and imports, or run complex JSON-based queries to surface architectural patterns and potential refactor opportunities.

How to install

Prerequisites:

  • Python 3.13+ installed on your machine
  • UV package manager installed (recommended)
  • PostgreSQL running (and accessible)
  • FDEP output generated by Spider plugin

Installation steps:

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

  2. Install the MCP server via UV (recommended): uv tool install .

    Note: This registers the fdep-mcp-server globally so MCP clients can discover it.

  3. Alternatively, install with pipx or system-wide Python package installation as described in the README:

    pipx (optional)

    pipx install .

    or system-wide (if you prefer)

    pip install .

  4. Set up the database and import data: fdep-mcp-server --setup --verbose

  5. Configure environment for your FDEP data: cp .env.example .env

    Edit .env with your database settings and FDEP_PATH

  6. Ensure PostgreSQL is running and the code_as_data database is created (example): createdb code_as_data

    Adjust DB_NAME in .env if you use a different name

  7. Start or connect your MCP client to the fdepAnalyzer server as configured (see mcp_config): Use your MCP client to point to fdep-mcp-server with FDEP_PATH set in environment.

Prerequisites recap:

  • Python 3.13+;
  • UV package manager;
  • PostgreSQL running and accessible;
  • FDEP data produced by Spider plugin.

Environment and usage notes:

  • Ensure FDEP_PATH points to your FDEP output directory containing the data to be analyzed.
  • The first run importing data into PostgreSQL can take significant time depending on dataset size.

Additional notes

Tips and common issues:

  • The first startup/import can be slow as the server initializes the PostgreSQL schema and ingests FDEP data. Plan for some latency on first run.
  • Ensure the .env file is correctly configured with DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD, and FDEP_PATH.
  • If you modify FDEP_PATH, re-run setup or ensure the server can access the new path.
  • For clients, the typical server name you’ll reference is fdepAnalyzer; use the command fdep-mcp-server as the executable in your client configurations.
  • Optional environment variables like LOG_LEVEL can help debug or reduce verbosity during setup.
  • If you encounter connection issues, verify that PostgreSQL is running and that the database name in .env matches what your client expects.

Related MCP Servers

Sponsor this space

Reach thousands of developers