{
  "openapi": "3.0.1",
  "info": {
    "title": "FTP, FTPS & SFTP MCP Server",
    "description": "Connect AI assistants to FTP, FTPS, and SFTP servers through MCP. List directories, read and upload files, edit text, and manage remote files using your own server credentials.",
    "version": "0.0",
    "x-build-id": "pT9tsN07CXwCm4X1M"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/theprogrammer~mcp-server-ftp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-theprogrammer-mcp-server-ftp",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/theprogrammer~mcp-server-ftp/runs": {
      "post": {
        "operationId": "runs-sync-theprogrammer-mcp-server-ftp",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/theprogrammer~mcp-server-ftp/run-sync": {
      "post": {
        "operationId": "run-sync-theprogrammer-mcp-server-ftp",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "protocol",
          "host",
          "username"
        ],
        "properties": {
          "protocol": {
            "title": "Protocol",
            "enum": [
              "ftp",
              "ftps",
              "sftp"
            ],
            "type": "string",
            "description": "Select the connection protocol.",
            "default": "sftp"
          },
          "host": {
            "title": "Server hostname",
            "type": "string",
            "description": "Hostname or IP address, without a URL or path."
          },
          "port": {
            "title": "Port",
            "minimum": 1,
            "maximum": 65535,
            "type": "integer",
            "description": "Leave empty for port 21 (FTP/FTPS) or 22 (SFTP)."
          },
          "username": {
            "title": "Username",
            "type": "string",
            "description": "Username for the remote file server."
          },
          "password": {
            "title": "Password",
            "type": "string",
            "description": "Password for the remote file server, if used."
          },
          "privateKey": {
            "title": "SSH private key",
            "type": "string",
            "description": "Optional SFTP private key in PEM or OpenSSH format."
          },
          "passphrase": {
            "title": "SSH key passphrase",
            "type": "string",
            "description": "Passphrase for the SSH private key, if encrypted."
          },
          "hostKeySha256": {
            "title": "SFTP host key fingerprint",
            "type": "string",
            "description": "Required for SFTP. The server's trusted SHA256 fingerprint, for example SHA256:... Obtain it from your server administrator."
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "backup",
              "sync",
              "compare"
            ],
            "type": "string",
            "description": "Leave empty for a Standby MCP task. Set this to run one job from the Console, the API, or a Schedule."
          },
          "remotePath": {
            "title": "Remote directory",
            "type": "string",
            "description": "Directory to back up, sync, or compare. Defaults to /.",
            "default": "/"
          },
          "include": {
            "title": "Include globs",
            "type": "array",
            "description": "Only consider files matching at least one pattern. Empty includes every file. A pattern without a slash matches the file name in any directory. ** crosses directories.",
            "items": {
              "type": "string"
            }
          },
          "exclude": {
            "title": "Exclude globs",
            "type": "array",
            "description": "Skip files matching any of these patterns. Exclude is applied before include.",
            "items": {
              "type": "string"
            }
          },
          "direction": {
            "title": "Sync direction",
            "enum": [
              "remote-to-store",
              "store-to-remote"
            ],
            "type": "string",
            "description": "Sync only. remote-to-store copies the server into the snapshot. store-to-remote copies a snapshot onto the server.",
            "default": "remote-to-store"
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Sync only. Report what would change and do not copy or delete anything.",
            "default": false
          },
          "deleteExtraneous": {
            "title": "Delete extraneous files",
            "type": "boolean",
            "description": "Sync only. Delete destination files that are not in the source. Off by default. A backup always replaces its named snapshot and does not delete remote files.",
            "default": false
          },
          "snapshotName": {
            "title": "Snapshot name",
            "type": "string",
            "description": "Name of the snapshot in the key-value store. 1-40 characters: letters, numbers, and !-_.'(). Use a new name to keep an older backup.",
            "default": "backup"
          },
          "keyValueStoreId": {
            "title": "Key-value store",
            "type": "string",
            "description": "Store ID or name for the snapshot. Leave empty to use a persistent named store unique to this server, username, and directory. Use the same store when restoring to a different server or directory."
          },
          "maxFileBytes": {
            "title": "Maximum file size (bytes)",
            "minimum": 1,
            "maximum": 104857600,
            "type": "integer",
            "description": "Files larger than this fail the job with an error before they are stored. Default and hard cap: 100 MiB (104857600). Files are streamed one at a time."
          },
          "baseline": {
            "title": "Compare against",
            "enum": [
              "snapshot",
              "server"
            ],
            "type": "string",
            "description": "Compare only. A snapshot is a backup already stored under Snapshot name.",
            "default": "snapshot"
          },
          "compareRemotePath": {
            "title": "Directory on the second server",
            "type": "string",
            "description": "Remote directory for the second server. Leave empty to use the same directory as Remote directory."
          },
          "compareProtocol": {
            "title": "Second server protocol",
            "enum": [
              "ftp",
              "ftps",
              "sftp"
            ],
            "type": "string",
            "description": "Required when Compare against is a second server."
          },
          "compareHost": {
            "title": "Second server hostname",
            "type": "string",
            "description": "Hostname or IP address of the second server."
          },
          "comparePort": {
            "title": "Second server port",
            "minimum": 1,
            "maximum": 65535,
            "type": "integer",
            "description": "Leave empty for port 21 (FTP/FTPS) or 22 (SFTP)."
          },
          "compareUsername": {
            "title": "Second server username",
            "type": "string",
            "description": "Username for the second server."
          },
          "comparePassword": {
            "title": "Second server password",
            "type": "string",
            "description": "Password for the second server, if used."
          },
          "comparePrivateKey": {
            "title": "Second server SSH private key",
            "type": "string",
            "description": "Optional SFTP private key for the second server."
          },
          "comparePassphrase": {
            "title": "Second server SSH key passphrase",
            "type": "string",
            "description": "Passphrase for the second server's private key, if encrypted."
          },
          "compareHostKeySha256": {
            "title": "Second server SFTP fingerprint",
            "type": "string",
            "description": "Required when the second server uses SFTP. SHA256 host key fingerprint."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}