Sponsored by Deepsite.site

Vibe Preprocessing and Analysis MCP Server for CSV files

Created By
mudit142248 months ago
A powerful MCP (Model Control Protocol) server for preprocessing and analyzing CSV files. This server provides a suite of tools for data manipulation, visualization, and analysis.
Content

Vibe Preprocessing and Analysis MCP Server for CSV files

A powerful MCP (Model Control Protocol) server for preprocessing and analyzing CSV files. This server provides a suite of tools for data manipulation, visualization, and analysis through an intuitive interface.

Features

  • Data Loading and Management

    • Load CSV files from a specified working directory
    • Set and manage working directories
    • List files in the working directory
    • Save processed dataframes to new files
  • Data Preprocessing

    • Handle mixed data types in columns
    • Manage null values with various strategies:
      • Remove rows with nulls
      • Fill with mean/median/mode
      • Forward/backward fill
      • Fill with constant values
    • Drop and rename columns
    • Run custom dataframe editing code
    • Save processed data to new files
  • Data Analysis

    • Generate comprehensive data descriptions
    • Create correlation matrices with visualizations
    • Handle mixed data types in columns
    • Run custom analysis code
  • Data Visualization

    • Create various types of plots:
      • Line plots
      • Bar charts
      • Scatter plots
      • Histograms with KDE
      • Box plots
      • Violin plots
      • Pie charts
      • Count plots
      • Kernel Density Estimation plots
    • Custom graph generation through code
    • Save visualizations to the working directory
    • Run custom visualization code

Setup Instructions

Prerequisites

  • Python 3.x
  • uv (recommended package manager). I recommend using uv to manage the server.

Installation

  1. Add MCP and required dependencies:
uv add "mcp[cli]"
uv add pandas matplotlib seaborn numpy
  1. Install the server in Claude Desktop:
mcp install server.py

Alternative Installation with pip

If you prefer using pip:

pip install "mcp[cli]" pandas matplotlib seaborn numpy

Usage

  1. Start the MCP server:
uv run mcp
  1. Test the server using MCP Inspector:
mcp dev server.py

You can install this server in Claude Desktop and interact with it right away by running:

mcp install server.py

Alternatively, you can test it with the MCP Inspector:

mcp dev server.py

Available Tools

Data Management

  • send_work_dir(): Retrieve the current working directory
  • set_work_dir(new_work_dir): Set a new working directory
  • list_work_dir_files(): List files in the current working directory
  • load_csv(filename): Load a CSV file into the system
  • save_global_df(filename): Save the current dataframe to a file

Data Preprocessing

  • handle_column_mixed_types(): Handle columns with mixed data types
  • handle_null_values(strategy, columns): Handle null values in the dataset with various strategies
  • drop_columns(columns): Remove specified columns
  • rename_columns(column_mapping): Rename columns in the dataframe
  • run_custom_df_edit_code(code): Execute custom dataframe manipulation code

Data Analysis

  • describe_df(): Generate a statistical summary of the dataframe
  • generate_correlation_matrix(): Create a correlation matrix with visualization

Data Visualization

  • plot_graph(graph_type, x_column, y_column, output_filename): Create various types of plots
    • Supported graph types: line, bar, scatter, hist, box, violin, pie, count, kde
  • run_custom_graph_code(code): Execute custom visualization code

Environment Variables

  • WORK_DIR: The working directory where files are read from and saved to

Error Handling

The server includes comprehensive error handling for:

  • Missing working directories
  • File not found errors
  • Data loading and processing errors
  • Invalid operations on empty dataframes
  • Mixed data type handling
  • Custom code execution errors
  • Invalid column names
  • Invalid graph types
  • Null value handling errors

Contributing

Feel free to submit issues and enhancement requests!

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
CursorThe AI Code Editor
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Amap Maps高德地图官方 MCP Server
Playwright McpPlaywright MCP server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
WindsurfThe new purpose-built IDE to harness magic
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
ChatWiseThe second fastest AI chatbot™
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Tavily Mcp
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Serper MCP ServerA Serper MCP Server