home / mcp / sftp mcp server

SFTP MCP Server

This read-only MCP Server allows you to connect to SFTP data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out our MCP Server for SFTP (https://www.cdata.com/drivers/sftp/download/mcp).

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "cdatasoftware-sftp-mcp-server-by-cdata": {
      "command": "java",
      "args": [
        "-jar",
        "/PATH/TO/CDataMCP-jar-with-dependencies.jar",
        "/PATH/TO/Salesforce.prp"
      ]
    }
  }
}

You set up a read-only MCP server that exposes live SFTP data through a simple MCP interface. This lets you ask natural language questions about your SFTP data and have the answers retrieved in real time without writing SQL. The server wraps the CData JDBC Driver for SFTP, turning SFTP data into relational style models for convenient querying by your MCP client.

How to use

Use an MCP client to connect to the local MCP server and ask questions about your SFTP data. After the server is running, you can request data tables, list columns, or run SELECT-like queries via the built‑in tools. Typical workflows include discovering available tables, inspecting columns for a table, and querying for specific records or aggregates. You do not need to write SQL to interact with the data; the MCP client will translate your natural language requests into the appropriate data operations behind the scenes.

How to install

Prerequisites: ensure you have Java installed on your machine. You may also need Maven for building the MCP server from source.

1) Clone the project and navigate into the directory.

git clone https://github.com/cdatasoftware/sftp-mcp-server-by-cdata.git
cd sftp-mcp-server-by-cdata

2) Build the MCP server to create the runnable JAR with all dependencies.

mvn clean install

3) Obtain and license the CData JDBC Driver for SFTP. Follow the driver’s installation flow and license it, typically by running the license command from the driver’s lib directory.

4) Create a JDBC connection string using the Driver’s connection utility and test the connection. Copy the resulting connection string for later use in the .prp file.

5) Create a .prp file (for example, sftp.prp) with the JDBC settings. Include the Prefix, ServerName, ServerVersion, DriverPath, DriverClass, JdbcUrl, and Tables as shown.

Prefix=sftp
ServerName=CDataSFTP
ServerVersion=1.0
DriverPath=PATH\\TO\\cdata.jdbc.sftp.jar
DriverClass=cdata.jdbc.sftp.SFTPDriver
JdbcUrl=jdbc:sftp:InitiateOAuth=GETANDREFRESH;
Tables=

6) Run the MCP server locally using the generated .prp file. This starts the server on standard input/output so you can connect with compatible MCP clients on the same machine.

java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/sftp.prp

Additional setup notes

The server operates in stdio mode, meaning the MCP client must run on the same machine. If you need to switch to a remote setup or a different interaction mode, you would configure the client accordingly, but the example here focuses on local stdio usage.

Tools and basic actions

Once the MCP server is configured and running, you will have access to built‑in tools to read from and explore the SFTP data source. The typical tools are exposed with names based on the server prefix used in your .prp configuration.

Troubleshooting and tips

If you don’t see the MCP server in your client after starting, fully quit the client and restart it to refresh the available servers. If data cannot be retrieved, double‑check the .prp file contents and ensure the connection string is correct. When in doubt, re-create the connection string using the driver’s utility and copy it into your .prp file.

Available tools

cd_sftp_mcp_get_tables

Retrieves the list of available tables (data sources) from the SFTP connection. The output is provided in CSV format with column headers on the first line.

cd_sftp_mcp_get_columns

Retrieves the list of columns for a specified table. The output is provided in CSV format with column headers on the first line.

cd_sftp_mcp_run_query

Executes a read-only SQL SELECT query against the configured SFTP data source and returns the results.