# Csv To Sql — REST API endpoint `csv-to-sql`

Convert CSV text into SQL INSERT statements, optionally preceded by a CREATE TABLE. The first row is the header and becomes the column list. Column types are inferred from the first 50 data rows as integer, numeric, boolean, or text, and identifiers are quoted for the chosen dialect (Postgres, MySQL, or SQLite). Empty cells become NULL by default. Nothing is executed against a database.

- Category: data
- MCP server: https://mcp.findutils.com/ (Streamable HTTP, no API keys, 120 req/min per IP)
- REST endpoint: POST https://api.findutils.com/api/tools/csv-to-sql/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/csv-to-sql/
- Same tool on the other surface: https://findutils.com/mcp/csv-to-sql/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/csv-to-sql/execute \
  -H "Content-Type: application/json" \
  -d '{
    "csv": "id,name\n1,Ada\n2,\"Doe, John\"",
    "table": "people",
    "dialect": "postgres"
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/csv-to-sql
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `csv` | string | yes | CSV text with a header row. |
| `table` | string | no | Target table name. Default: "my_table". Default: `"my_table"`. |
| `dialect` | string (postgres \| mysql \| sqlite) | no | Identifier quoting and type names. Default: postgres. Default: `"postgres"`. |
| `create_table` | boolean | no | Emit a CREATE TABLE before the inserts. Default: true. Default: `true`. |
| `null_empty` | boolean | no | Write an empty cell as NULL rather than an empty string. Default: true. Default: `true`. |
| `batch` | boolean | no | Emit one multi-row INSERT instead of one statement per row. Default: false. Default: `false`. |

Example arguments (verified):

```json
{
  "csv": "id,name\n1,Ada\n2,\"Doe, John\"",
  "table": "people",
  "dialect": "postgres"
}
```

OpenAPI 3.1 spec: https://findutils.com/api/openapi.json · Interactive docs: https://findutils.com/api/docs/

## Also an MCP tool

```bash
claude mcp add findutils --transport http https://mcp.findutils.com/
```

Then ask the client to call `findutils:csv_to_sql`. Full MCP reference: https://findutils.com/mcp/csv-to-sql/

---
Full catalog: GET https://api.findutils.com/api/tools · https://findutils.com/api/ · https://findutils.com/llms.txt
