home / mcp / cdata's model context protocol (mcp) server for presto

CData's Model Context Protocol (MCP) Server for Presto

A read-only MCP server that exposes Presto data via the CData JDBC Driver for live, queryable access.

Installation
Add the following to your MCP client configuration file.

Configuration

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

You can run a local, read-only MCP server that exposes live Presto data through a simple MCP interface. This lets you ask natural language questions and receive up-to-date results from Presto without writing SQL. The server wraps the CData JDBC Driver for Presto and serves data in a format compatible with MCP clients.

How to use

Once your MCP server is running, you can interact with it from your MCP client (such as Claude Desktop) and ask questions like: “What is the total revenue by region for last quarter?” or “Show open tickets in the SUPPORT project.” The client will use the built-in tools to list tables, inspect columns, and run read-only queries against Presto. No SQL knowledge is required on your part; the client translates your questions into appropriate data requests behind the scenes.

How to install

Prerequisites: you need Java installed on your machine and a Java runtime available on your path. You will also need Maven to build the MCP server, and you must install the CData JDBC Driver for Presto to connect to your Presto data source.

# Step 1: Clone the MCP server project and enter the directory
git clone https://github.com/cdatasoftware/presto-mcp-server-by-cdata.git
cd presto-mcp-server-by-cdata

# Step 2: Build the server jar with dependencies
mvn clean install
# This produces the JAR file: CDataMCP-jar-with-dependencies.jar

Step 3: Download and install the CData JDBC Driver for Presto from the CData website. Follow the supplied installer for your operating system.

Step 4: License the CData JDBC Driver for Presto. Open a terminal and run the license command from the driver’s lib folder, then provide your name, email, and a license key (or TRIAL). The exact steps vary by OS, but the typical flow is: - Navigate to the driver’s installation directory - Run the license command to register your usage

Step 5: Configure your Presto connection. Run the driver’s connection utility to generate a connection string, test the connection, and copy the connection string for later use.

Step 6: Create a .prp file describing your MCP server configuration. Use the example format below as a template, replacing values with your actual paths and connection string.

env
Prefix=presto
ServerName=CDataPresto
ServerVersion=1.0
DriverPath=PATH\\TO\\cdata.jdbc.presto.jar
DriverClass=cdata.jdbc.presto.PrestoDriver
JdbcUrl=jdbc:presto:InitiateOAuth=GETANDREFRESH;
Tables=
```

Save this as presto.prp in a known location, e.g., /PATH/TO/presto.prp.

Step 7: Prepare Claude Desktop (or your MCP client) configuration to point to the local MCP server. Use the following stdio configuration snippet as a reference. Adjust paths to match your environment.

{
  "mcpServers": {
    "presto_mcp": {
      "command": "PATH\\TO\\java.exe",
      "args": [
        "-jar",
        "PATH\\TO\\CDataMCP-jar-with-dependencies.jar",
        "PATH\\TO\\presto.prp"
      ]
    }
  }
}

Additional configuration and notes

Running the server uses stdio, which means the MCP client and the server run on the same machine. Start the server with the complete command sequence shown in the install steps. If you need to change your data source or refresh credentials, update the presto.prp file and restart the server.

Security and access: keep the server on a trusted network or host, and restrict client access as appropriate. Since this server provides read-only access by default, ensure your Presto data source permissions align with your security requirements.

Troubleshooting tips: if the MCP server does not appear in your MCP client, fully quit the client and restart it. Ensure the Java runtime can access the jar and presto.prp file, and verify the JDBC connection works by testing the connection in the CData driver utility.

Tools and capabilities

The MCP server exposes a set of tools to interact with Presto data. You can list available tables, list columns for a table, and run read-only queries. The main tools include:

Tools & Descriptions

- presto_get_tables - Retrieves a list of tables available in the data source. The output is in CSV format with column headers.

- presto_get_columns - Retrieves a list of columns for a table. The output is in CSV format with column headers.

- presto_run_query - Executes a SQL SELECT query against the data source.

Available tools

presto_get_tables

Retrieves a list of available tables in the data source. The output is returned in CSV format with column headers on the first line.

presto_get_columns

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

presto_run_query

Executes a SQL SELECT query against the data source and returns the results.