# Json To Python Class — MCP tool `findutils:json_to_python_class`

Generate Python class source code from a JSON object as a dataclass, a Pydantic model, or a plain class. Nested objects become separate classes, field names become snake_case, and type hints are optional.

- 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/json-to-python-class/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/mcp/json-to-python-class/
- Same tool on the other surface: https://findutils.com/api/json-to-python-class/

## Connect

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

Claude Desktop (`claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "findutils": {
      "url": "https://mcp.findutils.com/"
    }
  }
}
```

## Call the tool (verified example)

```bash
curl -X POST https://mcp.findutils.com/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "json_to_python_class",
      "arguments": {
        "json": "{\"userId\":1,\"firstName\":\"A\",\"tags\":[\"x\"]}"
      }
    }
  }'
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `json` | string | yes | JSON object to convert (the root must be an object). |
| `class_name` | string | no | Name of the root class. Default: "Root". Default: `"Root"`. |
| `class_type` | string (dataclass \| pydantic \| plain) | no | Class style: "dataclass", "pydantic", or "plain". Default: "dataclass". Default: `"dataclass"`. |
| `add_type_hints` | boolean | no | Add type hints (str, int, List[...], Optional[Any]). Default: true. Default: `true`. |
| `generate_init` | boolean | no | For class_type "plain": generate an __init__ method. Default: true. Default: `true`. |

Example arguments (verified):

```json
{
  "json": "{\"userId\":1,\"firstName\":\"A\",\"tags\":[\"x\"]}"
}
```

Decoded `json` argument (readability only — send it as a string):

```json
{
  "userId": 1,
  "firstName": "A",
  "tags": [
    "x"
  ]
}
```

## Also a REST endpoint

```bash
curl -X POST https://api.findutils.com/api/tools/json-to-python-class/execute \
  -H "Content-Type: application/json" \
  -d '{
    "json": "{\"userId\":1,\"firstName\":\"A\",\"tags\":[\"x\"]}"
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/json-to-python-class
```

Full REST reference: https://findutils.com/api/json-to-python-class/ · OpenAPI 3.1 spec: https://findutils.com/api/openapi.json

---
Full catalog: POST https://mcp.findutils.com/ with method `tools/list` · https://findutils.com/mcp/ · https://findutils.com/llms.txt
