arunak1998/mcp_csv_server
If you are the rightful owner of mcp_csv_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The MCP Polars SQL Analyst Server is a high-performance server designed for CSV analysis and SQL execution using the Polars DataFrame engine.
MCP Polars SQL Analyst Server
High-performance Model Context Protocol (MCP) server for CSV analysis and SQL execution using Polars
š Overview
The MCP Polars SQL Analyst Server enables AI agents and developers to interact with CSV datasets through natural language or SQL queries.
It leverages the Polars DataFrame engine (Rust-powered, multi-threaded, lazy evaluation) for lightning-fast analytics on large files.
With this server, you can:
- ā Discover CSV files available in a directory
- ā Inspect schemas, datatypes, and stats
- ā Run SQL queries directly on your CSVs using Polars SQL
- ā Easily integrate with AI agents and dashboards for interactive CSV insights
⨠Features
-
High-Performance Data Processing
- Rust-based Polars engine (faster than pandas)
- Multi-threaded execution across CPUs
- Lazy evaluation for optimized queries
- Memory-efficient for large datasets
-
MCP Tools Available
-
get_files_list
- š Retrieve all available CSV files in the configured directory
- Returns: List of file names and paths
-
get_schema
- š Extract schema: column names, datatypes, and basic stats
- Params: file_path (CSV file path)
- Returns: JSON with field info
-
execute_polars_sql
- š Run SQL queries on CSV data via Polars SQL engine
- Params: sql_query, file_path
- Returns: Structured query results
-
š ļø Technology Stack
- MCP Framework: FastMCP ā rapid protocol server creation
- Data Engine: Polars ā fast, Rust-native DataFrame library
- Query Language: SQL (via Polars SQL context)
- File Support: CSV datasets
š¦ Installation bash
Clone repository
git clone https://github.com/yourusername/mcp-polars-analyst.git cd mcp-polars-analyst
Install dependencies
pip install -e . ā¶ļø Usage Start the MCP server and point to your CSV directory:
bash
FILE_LOCATION="/mnt/c/workspaces/mcpserver/temp/*.csv"
python server/analyst.py
The server will:
Scan the specified location for CSVs
Initialize Polars SQL context
Expose MCP tools (get_files_list, get_schema, execute_polars_sql)
Start SSE (Server-Sent Events) for agent communication