๐ CSV Editor - AI-Powered CSV Processing via MCP
Transform how AI assistants work with CSV data. CSV Editor is a high-performance MCP server that empowers Claude, ChatGPT, and other AI assistants with powerful data manipulation capabilities through simple commands.

๐ Quick Start
Installing via Smithery
To automatically install csv-editor for Claude Desktop via Smithery:
npx -y @smithery/cli install @santoshray02/csv-editor --client claude
Fastest Installation (Recommended)
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/santoshray02/csv-editor.git
cd csv-editor
uv sync
uv run csv-editor
Configure Your AI Assistant
Claude Desktop (Click to expand)
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"csv-editor": {
"command": "uv",
"args": ["tool", "run", "csv-editor"],
"env": {
"CSV_MAX_FILE_SIZE": "1073741824"
}
}
}
}
Other Clients (Continue, Cline, Windsurf, Zed)
See MCP_CONFIG.md for detailed configuration.
โจ Features
The Problem
AI assistants struggle with complex data operations - they can read files but lack tools for filtering, transforming, analyzing, and validating CSV data efficiently.
The Solution
CSV Editor bridges this gap by providing AI assistants with 40+ specialized tools for CSV operations, turning them into powerful data analysts that can:
- Clean messy datasets in seconds
- Perform complex statistical analysis
- Validate data quality automatically
- Transform data with natural language commands
- Track all changes with undo/redo capabilities
Key Differentiators
| Feature |
CSV Editor |
Traditional Tools |
| AI Integration |
Native MCP protocol |
Manual operations |
| Auto-Save |
Automatic with strategies |
Manual save required |
| History Tracking |
Full undo/redo with snapshots |
Limited or none |
| Session Management |
Multi-user isolated sessions |
Single user |
| Data Validation |
Built-in quality scoring |
Separate tools needed |
| Performance |
Handles GB+ files with chunking |
Memory limitations |
๐ป Usage Examples
Basic Usage
"Load the sales data and remove duplicates"
"Filter for Q4 2024 transactions over $10,000"
"Calculate correlation between price and quantity"
"Fill missing values with the median"
"Export as Excel with the analysis"
Advanced Usage
๐ Data Analyst Workflow
session = load_csv("daily_sales.csv")
remove_duplicates(session_id)
change_column_type("date", "datetime")
fill_missing_values(strategy="median", columns=["revenue"])
get_statistics(columns=["revenue", "quantity"])
detect_outliers(method="iqr", threshold=1.5)
get_correlation_matrix(min_correlation=0.5)
export_csv(format="excel", file_path="clean_sales.xlsx")
๐ญ ETL Pipeline
load_csv_from_url("https://api.example.com/data.csv")
filter_rows(conditions=[
{"column": "status", "operator": "==", "value": "active"},
{"column": "amount", "operator": ">", "value": 1000}
])
add_column(name="quarter", formula="Q{(month-1)//3 + 1}")
group_by_aggregate(group_by=["quarter"], aggregations={
"amount": ["sum", "mean"],
"customer_id": "count"
})
export_csv(format="parquet")
export_csv(format="json")
๐ Data Quality Assurance
validate_schema(schema={
"customer_id": {"type": "integer", "required": True},
"email": {"type": "string", "pattern": r"^[^@]+@[^@]+\.[^@]+$"},
"age": {"type": "integer", "min": 0, "max": 120}
})
quality_report = check_data_quality()
anomalies = find_anomalies(methods=["statistical", "pattern"])
๐ Documentation
Available Tools
Complete Tool List (40+ tools)
I/O Operations
load_csv - Load from file
load_csv_from_url - Load from URL
load_csv_from_content - Load from string
export_csv - Export to various formats
get_session_info - Session details
list_sessions - Active sessions
close_session - Cleanup
Data Manipulation
filter_rows - Complex filtering
sort_data - Multi-column sort
select_columns - Column selection
rename_columns - Rename columns
add_column - Add computed columns
remove_columns - Remove columns
update_column - Update values
change_column_type - Type conversion
fill_missing_values - Handle nulls
remove_duplicates - Deduplicate
Analysis
get_statistics - Statistical summary
get_column_statistics - Column stats
get_correlation_matrix - Correlations
group_by_aggregate - Group operations
get_value_counts - Frequency counts
detect_outliers - Find outliers
profile_data - Data profiling
Validation
validate_schema - Schema validation
check_data_quality - Quality metrics
find_anomalies - Anomaly detection
Auto-Save & History
configure_auto_save - Setup auto-save
get_auto_save_status - Check status
undo / redo - Navigate history
get_history - View operations
restore_to_operation - Time travel
Configuration
Environment Variables
| Property |
Details |
CSV_MAX_FILE_SIZE |
1GB. Maximum file size |
CSV_SESSION_TIMEOUT |
3600s. Session timeout |
CSV_CHUNK_SIZE |
10000. Processing chunk size |
CSV_AUTO_SAVE |
true. Enable auto-save |
Auto-Save Strategies
CSV Editor automatically saves your work with configurable strategies:
- Overwrite (default) - Update original file
- Backup - Create timestamped backups
- Versioned - Maintain version history
- Custom - Save to specified location
configure_auto_save(
strategy="backup",
backup_dir="/backups",
max_backups=10
)
Advanced Installation Options
Alternative Installation Methods
Using pip
git clone https://github.com/santoshray02/csv-editor.git
cd csv-editor
pip install -e .
Using pipx (Global)
pipx install git+https://github.com/santoshray02/csv-editor.git
From GitHub (Recommended)
pip install git+https://github.com/santoshray02/csv-editor.git
uv pip install git+https://github.com/santoshray02/csv-editor.git
pip install git+https://github.com/santoshray02/csv-editor.git@v1.0.1
๐ง Technical Details
Development
Running Tests
uv run test
uv run test-cov
uv run all-checks
Project Structure
csv-editor/
โโโ src/csv_editor/ # Core implementation
โ โโโ tools/ # MCP tool implementations
โ โโโ models/ # Data models
โ โโโ server.py # MCP server
โโโ tests/ # Test suite
โโโ examples/ # Usage examples
โโโ docs/ # Documentation
๐ค Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Quick Contribution Guide
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Run
uv run all-checks
- Submit a pull request
๐ Roadmap
- [ ] SQL query interface
- [ ] Real-time collaboration
- [ ] Advanced visualizations
- [ ] Machine learning integrations
- [ ] Cloud storage support
- [ ] Performance optimizations for 10GB+ files
๐ฌ Support
๐ License
MIT License - see LICENSE file
๐ Acknowledgments
Built with:
- FastMCP - Fast Model Context Protocol
- Pandas - Data manipulation
- NumPy - Numerical computing
Ready to supercharge your AI's data capabilities? Get started in 2 minutes โ