initialize_databaseLABSCO SUMMARY
Haskell only, and the build pipeline is the prerequisite.
This does not read your source. It reads what the Spider plugin emitted during a build, which means the setup cost lands on your Haskell toolchain — cabal configured with the fdep and fieldInspector plugins on GHC 9.2.8 — before the server does anything useful. Once past that, it is the kind of question-answering that no editor gives you: who calls this, what breaks if this type changes, which imports are dead.
What it is
A query layer over FDEP output, the dependency data produced by the Spider plugin during a Haskell build. The analysis is imported into PostgreSQL once, and after that questions about modules, functions, types and typeclasses are answered from the database rather than by re-parsing source.
What you get
- Modules:
list_modules,get_module_details,get_functions_by_module,search_modules,get_module_dependencies,get_code_statistics - Functions:
get_function_details,search_functions,get_most_called_functions,get_function_call_graph,get_function_callers,get_function_callees,analyze_function_complexity,get_function_context - Types and classes:
list_types,get_type_details,search_types,get_type_dependencies,analyze_type_usage,get_nested_types,list_classes,get_class_details,search_classes - Imports:
analyze_imports,get_import_graph,find_unused_imports,get_import_details - Patterns:
find_similar_functions,find_code_patterns,group_similar_functions,build_type_dependency_graph,analyze_type_relationships - Source locations:
find_element_by_location,get_location_context,generate_function_imports - Escape hatches for anything the named tools do not cover:
execute_query,execute_advanced_queryfor JSON-described joins,execute_custom_query, andfind_cross_module_calls
Requirements
Python 3.13+ and the UV package manager, plus a running PostgreSQL with a database created ahead of time. Install the project as a tool, then run it once with the setup flag to initialise the schema and import your data — the first run takes a while because the FDEP datasets are large. FDEP_PATH points at the Spider plugin's output; DB_HOST, DB_PORT, DB_NAME, DB_USER and DB_PASSWORD configure the database. Not on PyPI: its pyproject names the package fdep-mcp-server, version 0.1.0, and it installs from a clone.
Setup effort
Build from source — git clone https://github.com/juspay/fdep-mcp-server.git && cd fdep-mcp-server
USE CASES
Understanding what a change will break
Walk the call graph outward from a function and see the cross-module callers before you touch it.
Finding where the complexity lives
Rank functions by complexity within a module rather than guessing from file size.
Cleaning up a large module
Find unused imports and near-duplicate functions instead of reading every file.
Asking something the tools do not cover
Describe the query as JSON conditions or drop to SQL against the imported analysis.
43 tools
Listed in project docs. Your client may show a different list.
list_modulesget_module_detailsget_functions_by_modulesearch_modulesget_module_dependenciesget_code_statisticsget_function_detailssearch_functionsget_most_called_functionsget_function_call_graphget_function_callersget_function_calleesanalyze_function_complexityget_function_contextlist_typesget_type_detailssearch_typesget_type_dependenciesanalyze_type_usageget_nested_typeslist_classesget_class_detailssearch_classesanalyze_importsget_import_graphfind_unused_importsget_import_detailsexecute_queryexecute_advanced_queryexecute_custom_queryfind_cross_module_callsfind_similar_functionsfind_code_patternsgroup_similar_functionsbuild_type_dependency_graphanalyze_type_relationshipsfind_element_by_locationget_location_contextgenerate_function_importspattern_match_codeanalyze_cross_module_dependenciesenhanced_function_call_graphBEFORE YOU INSTALL
What to know first
Tools you get
43 tools named in the project's documentation.
Requires
- fdep-mcp-server on PATH
- Python 3.13+
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
git clone https://github.com/juspay/fdep-mcp-server.git && cd fdep-mcp-server
uv tool install .With PostgreSQL running, create the database with createdb code_as_data — the name must match DB_NAME in .env (default code_as_data)
cp .env.example .envEdit .env with your database settings and FDEP_PATH, then initialise the schema and import your FDEP data — the first run takes a while
fdep-mcp-server --setup --verboseMCP Clients
Claude Code
{
"mcpServers": {
"fdepAnalyzer": {
"command": "fdep-mcp-server",
"args": [],
"env": {
"FDEP_PATH": "<YOUR_FDEP_PATH>"
}
}
}
}.mcp.json at your project root
Cline
{
"mcpServers": {
"fdepAnalyzer": {
"command": "fdep-mcp-server",
"args": [],
"env": {
"FDEP_PATH": "<YOUR_FDEP_PATH>"
}
}
}
}Continue
{
"mcpServers": [
{
"name": "fdepAnalyzer",
"command": "fdep-mcp-server",
"args": [],
"env": {
"FDEP_PATH": "<YOUR_FDEP_PATH>"
}
}
]
}.continue/config.json