{
  "name": "MCP File Converter \u2014 ConvertFleet API",
  "nodes": [
    {
      "parameters": {
        "content": "## MCP File Converter \u2014 Setup\n1. Get your API key from convertfleet.com\n2. Replace YOUR_CONVERTFLEET_API_KEY in the 'Set Credentials' node\n3. POST to the Webhook URL with JSON:\n   { \"file_url\": \"https://...\", \"target_format\": \"pdf\", \"tool\": \"convert_to_pdf\" }\n   Tools: convert_to_pdf \u00b7 extract_audio \u00b7 resize_image\n4. Paste the webhook URL into mcp-config.json as the endpoint for your Claude Code / Cursor agent tool",
        "height": 260,
        "width": 430
      },
      "id": "sticky-1",
      "name": "Setup Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        180,
        140
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "mcp-convert",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "webhook-1",
      "name": "MCP Tool Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        660,
        400
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "api_key",
              "value": "YOUR_CONVERTFLEET_API_KEY",
              "type": "string"
            },
            {
              "id": "2",
              "name": "api_base",
              "value": "https://api.convertfleet.com/v1",
              "type": "string"
            },
            {
              "id": "3",
              "name": "file_url",
              "value": "={{ $json.body.file_url }}",
              "type": "string"
            },
            {
              "id": "4",
              "name": "target_format",
              "value": "={{ $json.body.target_format ?? 'pdf' }}",
              "type": "string"
            },
            {
              "id": "5",
              "name": "tool",
              "value": "={{ $json.body.tool ?? 'convert_to_pdf' }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": false,
        "options": {}
      },
      "id": "set-1",
      "name": "Set Credentials",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        880,
        400
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $json.api_base }}/convert",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ 'Bearer ' + $json.api_key }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ file_url: $json.file_url, target_format: $json.target_format, tool: $json.tool }) }}",
        "options": {}
      },
      "id": "http-1",
      "name": "Call ConvertFleet API",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1100,
        400
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "cond-1",
              "leftValue": "={{ $json.status }}",
              "rightValue": "done",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        }
      },
      "id": "if-1",
      "name": "Conversion Successful?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        1320,
        400
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "s1",
              "name": "success",
              "value": true,
              "type": "boolean"
            },
            {
              "id": "s2",
              "name": "download_url",
              "value": "={{ $json.download_url }}",
              "type": "string"
            },
            {
              "id": "s3",
              "name": "tool",
              "value": "={{ $json.tool }}",
              "type": "string"
            },
            {
              "id": "s4",
              "name": "format",
              "value": "={{ $json.target_format }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": false,
        "options": {}
      },
      "id": "set-success",
      "name": "Format Success",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        1540,
        280
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "e1",
              "name": "success",
              "value": false,
              "type": "boolean"
            },
            {
              "id": "e2",
              "name": "error",
              "value": "={{ $json.error ?? 'Conversion failed \u2014 check file_url and target_format' }}",
              "type": "string"
            },
            {
              "id": "e3",
              "name": "status",
              "value": "={{ $json.status }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": false,
        "options": {}
      },
      "id": "set-error",
      "name": "Format Error",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        1540,
        520
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ $json }}",
        "options": {
          "responseCode": 200
        }
      },
      "id": "respond-1",
      "name": "Respond to MCP Tool",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1760,
        400
      ]
    }
  ],
  "connections": {
    "MCP Tool Webhook": {
      "main": [
        [
          {
            "node": "Set Credentials",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Credentials": {
      "main": [
        [
          {
            "node": "Call ConvertFleet API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call ConvertFleet API": {
      "main": [
        [
          {
            "node": "Conversion Successful?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Conversion Successful?": {
      "main": [
        [
          {
            "node": "Format Success",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Success": {
      "main": [
        [
          {
            "node": "Respond to MCP Tool",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Error": {
      "main": [
        [
          {
            "node": "Respond to MCP Tool",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}