home / mcp / phoenix mcp server

Phoenix MCP Server

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

Installation
Add the following to your MCP client configuration file.

Configuration

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

This MCP server lets you query live Phoenix data through a simple, read-only MCP interface, enabling LLMs to retrieve up-to-date information without writing SQL. It wraps the CData JDBC Driver for Phoenix and exposes data as MCP tools that you can invoke from an MCP client.

How to use

Start the MCP server on your machine and connect your MCP client to it. Once running, you can ask the AI to read data from Phoenix, list tables and columns, or run read-only queries. The server exposes tools that let you inspect available tables, view their columns, and fetch data through SQL-like queries without writing SQL yourself.

How to install

# Prerequisites
- Java (JDK 11+) installed on your machine
- Maven for building the MCP server
- Access to the CData JDBC Driver for Phoenix

# 1. Clone the project
git clone https://github.com/cdatasoftware/phoenix-mcp-server-by-cdata.git
cd phoenix-mcp-server-by-cdata

# 2. Build the server
mvn clean install

# This creates the MCP JAR with dependencies:
# CDataMCP-jar-with-dependencies.jar

# 3. Install the CData JDBC Driver for Phoenix
# Follow the driver installation steps from the vendor to prepare the driver jar

# 4. License the driver (example steps; adjust paths to your setup)
# Windows
# java -jar cdata.jdbc.apachephoenix.jar --license
# Mac/Linux
# java -jar cdata.jdbc.apachephoenix.jar --license

# 5. Configure your connection and create a .prp file (phoenix.prp)
# The prp file should include the driver path, driver class, and JDBC URL as shown in the example below

Additional sections

Note the server operates in stdio mode, meaning it runs locally on the same machine as the MCP client. The standard workflow is to start the server with a Java command that points to the MCP jar and your prp configuration.

Configuration and running details

Create a Phoenix MCP configuration file (phoenix.prp) with the required JDBC connection properties. Include a prefix for exposed tools, a server name and version, the jar path, JDBC driver class, and the JDBC URL obtained from the Connection String utility. Leave Tables blank to access all data or specify the tables you want access to.

Running the MCP server on your machine

java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/phoenix.prp
```
Note: The server uses stdio, so it can only be used with clients running on the same machine as the server.

Available tools

phoenix_get_tables

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

phoenix_get_columns

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

phoenix_run_query

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