home / mcp / azure synapse mcp server
Provides read-only MCP access to Azure Synapse data via the CData JDBC Driver, enabling LLMs to query live data.
Configuration
View docs{
"mcpServers": {
"cdatasoftware-azure-synapse-mcp-server-by-cdata": {
"command": "java",
"args": [
"-jar",
"/PATH/TO/CDataMCP-jar-with-dependencies.jar",
"/PATH/TO/Salesforce.prp"
],
"env": {
"YOUR_TOKEN": "<YOUR_TOKEN>"
}
}
}
}You have a read-only MCP server that exposes live Azure Synapse data through a simple MCP interface. This enables your AI client to ask natural language questions and retrieve up-to-date information from Synapse without writing SQL. The server wraps the CData JDBC Driver for Azure Synapse and presents the data as MCP tools you can invoke from your AI client.
Once you have the MCP server running, you can use an MCP client to access Azure Synapse data. You will interact with built-in tools that let you discover available tables and columns, and run read-only queries to fetch results. Typical usage includes asking questions like which accounts have the highest revenue, or retrieving open opportunities filtered by stage and date. The tools expose tables and columns you can query, and you can run SQL-like SELECT queries through the server to obtain the results in your AI client.
In practice, your AI client will call the following tools to interact with the data source. The server maps your requests to the underlying JDBC driver and returns results in a structured format suitable for downstream processing by your AI model.
Prerequisites you need before starting: Java (JDK 8+), and Maven for building the MCP server. You will also need a CData JDBC Driver for Azure Synapse installed and licensed, plus a path to a JDBC connection string that targets your Synapse instance.
Step 1: Clone the project and navigate to the project directory.
git clone https://github.com/cdatasoftware/azure-synapse-mcp-server-by-cdata.git
cd azure-synapse-mcp-server-by-cdataStep 2: Build the MCP server to produce the runnable JAR. This creates CDataMCP-jar-with-dependencies.jar.
mvn clean installStep 3: Obtain and license the CData JDBC Driver for Azure Synapse. Follow the driver’s installation guide to install the JAR and license it, then locate the lib directory where the driver JAR resides.
# Example for licensing after installing the driver
java -jar cdata.jdbc.azuresynapse.jar --licenseStep 4: Configure a JDBC connection and test it to obtain the connection string. Run the connection string utility and test the connection; copy the resulting JDBC URL for later use.
java -jar cdata.jdbc.azuresynapse.jar
```
# After a successful test, you will have a JDBC URL to use in the next step.Step 5: Create a .prp file with your JDBC connection details. Use this structure and fill in your values. This example uses a placeholder connection string copied from the test above.
Prefix=azuresynapse
ServerName=CDataAzureSynapse
ServerVersion=1.0
DriverPath=PATH\TO\cdata.jdbc.azuresynapse.jar
DriverClass=cdata.jdbc.azuresynapse.AzureSynapseDriver
JdbcUrl=jdbc:azuresynapse:InitiateOAuth=GETANDREFRESH;
Tables=Step 6: Start the MCP server using the prepared .prp file. The server runs on stdio and is intended to be used by clients on the same machine.
java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/azure-synapse.prpConnect your MCP client by adding a new MCP server entry that points to the local stdio server you started. Your client will discover the available tools (get_tables, get_columns, run_query) and allow you to execute read-only queries against Azure Synapse through the MCP interface.
If you cannot see your MCP server in the client, ensure you have fully quit and restarted the client so it reloads the MCP server list.
If the client cannot retrieve data, verify your connection string is correct and that the JDBC driver is licensed and accessible by the MCP server. Re-run the connection string utility to confirm the JDBC URL works, and copy the connection string into your azure-synapse.prp file.
If you encounter issues connecting to Synapse or running queries, contact CData Support or the CData Community for guidance.
Retrieves a list of tables available in the Azure Synapse data source. The output is in CSV format, with the first line containing column headers.
Retrieves a list of columns for a specified table. The output is CSV with headers on the first line.
Executes a SQL SELECT query against Azure Synapse and returns the results.