@mcpx-digital/csv-tools
# @mcpx-digital/csv-tools
**MCP server for local CSV validation and conversion.**
Validate CSV structure, check simple schemas, convert CSV↔JSON, sample rows, and find duplicate keys — all on local files.
> **Privacy:** Never uploads user data anywhere. All processing is local.
## Install
```bash
npx -y @mcpx-digital/csv-tools
```
## Cursor `mcp.json` example
```json
{
"mcpServers": {
"csv-tools": {
"command": "npx",
"args": ["-y", "@mcpx-digital/csv-tools"]
}
}
}
```
Local clone:
```json
{
"mcpServers": {
"csv-tools": {
"command": "node",
"args": ["/absolute/path/to/csv-tools-mcp/index.js"]
}
}
}
```
## Tools
| Tool | What it does |
|------|----------------|
| `validate_csv` | Headers, column counts, duplicate headers |
| `schema_check` | Required columns + basic types |
| `csv_to_json` | CSV → JSON records |
| `json_to_csv` | JSON → CSV (optional write to disk) |
| `sample_rows` | First N rows |
| `find_duplicate_keys` | Duplicate groups by key columns |
## Example prompts
- “Validate `./data/users.csv`”
- “Require columns id,email and check email types”
- “Convert `export.csv` to JSON and show 5 sample rows”
- “Find duplicate `email` values in `users.csv`”
## Development
```bash
git clone https://github.com/TheoryofShadows/csv-tools-mcp.git
cd csv-tools-mcp
npm install
npm test
```
## License
MIT
TDQS
Scored across 6 tools
Most tools target distinct operations (convert, sample, find duplicates, validate, schema check). However, validate_csv and schema_check overlap somewhat since both assess CSV structure/quality, though they focus on different aspects (structure vs. column requirements/types). The descriptions help distinguish them.
Five tools follow snake_case with clear verb_noun or noun patterns (json_to_csv, csv_to_json, validate_csv, sample_rows, find_duplicate_keys), but schema_check lacks a verb and uses a different construction, introducing minor inconsistency.
Six tools is well-scoped for a CSV utility server. Each tool covers a distinct common CSV task (conversion, sampling, duplication detection, validation, schema checking), earning its place without redundancy.
The surface covers key CSV operations: conversion both ways, sampling, duplicate detection, validation, and schema checking. Minor gaps include a dedicated CSV writing/transformation tool (e.g., filter columns, sort) or a dedicated row/column manipulation tool, but core workflows are well supported.