pandas-mcp-server
7
The Pandas MCP Server is a powerful tool that integrates Model Context Protocol functionalities to process CSV files and execute Pandas operations. It excels at generating interactive visualizations, making it ideal for data analysis tasks.
Pandas MCP Server
This repository contains a server implementation using the Model Context Protocol (MCP) with functionalities to handle CSV files, execute Pandas code, and generate interactive charts such as bar charts, pie charts, and line charts. It supports reading CSV metadata, executing secure Pandas operations, and visualizing results using Chart.js templates.
Requirements
- Python 3.11 or higher
- Install required packages
Functions
- read_metadata: Loads CSVs and provides column structure and sample data.
- run_pandas_code: Executes Pandas code securely.
- bar_chart_to_html: Generates interactive HTML bar charts.
- pie_chart_to_html: Generates interactive HTML pie charts.
- line_chart_to_html: Generates interactive HTML line charts.
Usage
- Configure your MCP client.
- Use the client to interact with the server tools.
Workflow
- Read CSV metadata.
- Execute Pandas operations.
- Visualize results with charts.