- Home
- MCP servers
- StatFlow
StatFlow
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 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": {
"rucha-nandgirikar-statflow": {
"command": "python",
"args": [
"-m",
"statflow.server"
],
"env": {
"PYTHONPATH": "/path/to/statflow/src"
}
}
}
}StatFlow provides an MCP server that lets AI assistants securely access database analysis tools, generate Excel reports, and produce thesis-quality Word documents. It enables you to orchestrate data extraction, statistical computations, and publication-ready outputs through standardized MCP tooling, making complex workflows autonomous and repeatable.
How to use
You interact with StatFlow through an MCP-compatible AI assistant. After you configure the MCP client, you can ask your assistant to run complete analyses, generate analysis Excel files, or create thesis reports. The server exposes three tools that execute data extraction, statistical analysis, and document generation in a streamlined workflow. Use natural language prompts like “Run complete analysis with StatFlow” or “Create Excel analysis using StatFlow” to trigger the corresponding tool, and the assistant will handle the appropriate tool calls and return the results.
How to install
# 1. Clone the project repository
git clone <repository-url>
cd statflow
# 2. Create a Python 3.8+ virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate
# 3. Install dependencies
pip install -r requirements.txt
Additional configuration and usage notes
The server is designed to run as a standard input/output (stdio) process managed by an MCP client. To start using StatFlow, run the python module that hosts the MCP server. If you are configuring a client like Cursor, you would point the MCP client to launch this stdio process as shown in the example MCP setup snippet.
Notes on usage with MCP clients
Set up your MCP client to launch StatFlow as a stdio server. The client should execute the following command to start the MCP server: python -m statflow.server with the appropriate working directory and Python path configured.
Security and best practices
Use read-only MCP resources for data access when possible to avoid unintended data modification. Implement proper error handling in your tool calls so AI assistants receive clear status messages and do not proceed with incomplete workflows. Manage API keys and credentials securely, and ensure your OpenAI API keys (for any AI-powered components) are kept confidential and rotated regularly.
Example use cases
- Run complete statistical analyses across multiple MySQL databases and generate a consolidated Excel report followed by a thesis-quality document. - Generate Excel analysis files from database dumps for quick review. - Create a comprehensive, AI-assisted report that combines statistical results with narrative insights.
Troubleshooting
If you encounter connectivity or tool execution errors, verify that the MCP server process starts correctly and that the Python environment includes all dependencies listed in the requirements. Check the console for error messages from the MCP tool handlers and ensure the MCP client can read the server’s output via stdio.
Maintenance and updates
Keep dependencies up to date by periodically updating the virtual environment and reinstalling requirements. When adding new databases or analysis capabilities, update the configuration to load new data sources dynamically and extend tool definitions as needed.
Examples of how the tools map to actions
run_complete_analysismaps to the full workflow from DB extraction to Excel generation and final thesis report. -generate_analysis_excelmaps to DB extraction and Excel table creation only. -generate_thesis_reportmaps to producing a thesis-quality Word document from Excel analysis results.
Available tools
run_complete_analysis
Executes the full analysis pipeline: extract data from databases, generate analysis Excel files, and create a thesis-ready Word report. Returns a success status and file locations.
generate_analysis_excel
Fetches data from configured databases and produces analysis-focused Excel files with statistical tables and visuals. Returns the path to the generated Excel file.
generate_thesis_report
Generates a comprehensive thesis-quality report from Excel analysis results, delivering an AI-assisted narrative document in Word format.