# Graphql To Typescript — MCP tool `findutils:graphql_to_typescript`

Convert a GraphQL SDL schema into TypeScript type definitions and return the generated code with counts of emitted types, enums, and inputs. Object and interface types become interfaces (or type aliases), enums become TypeScript enums, input types are included by default. Non-null fields (!) are required; nullable fields become optional and accept null. Built-in scalars map to string, number, and boolean.

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

## 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": "graphql_to_typescript",
      "arguments": {
        "schema": "type User {\n  id: ID!\n  name: String\n}\n\nenum Role {\n  ADMIN\n  USER\n}"
      }
    }
  }'
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `schema` | string | yes | GraphQL schema in SDL (type, input, enum definitions). |
| `use_interfaces` | boolean | no | Emit "interface X {}" instead of "type X = {}". Default: true. Default: `true`. |
| `add_exports` | boolean | no | Prefix every declaration with "export". Default: true. Default: `true`. |
| `use_readonly` | boolean | no | Mark every field readonly. Default: false. Default: `false`. |
| `generate_input_types` | boolean | no | Also emit GraphQL input types. Default: true. Default: `true`. |

Example arguments (verified):

```json
{
  "schema": "type User {\n  id: ID!\n  name: String\n}\n\nenum Role {\n  ADMIN\n  USER\n}"
}
```

## Also a REST endpoint

```bash
curl -X POST https://api.findutils.com/api/tools/graphql-to-typescript/execute \
  -H "Content-Type: application/json" \
  -d '{
    "schema": "type User {\n  id: ID!\n  name: String\n}\n\nenum Role {\n  ADMIN\n  USER\n}"
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/graphql-to-typescript
```

Full REST reference: https://findutils.com/api/graphql-to-typescript/ · 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
