home / mcp / alloydb mcp server
This read-only MCP Server allows you to connect to AlloyDB data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out the first managed MCP platform: CData Connect AI (https://www.cdata.com/ai/).
Configuration
View docs{
"mcpServers": {
"cdatasoftware-alloydb-mcp-server-by-cdata": {
"command": "java",
"args": [
"-jar",
"CDataMCP-jar-with-dependencies.jar",
"/PATH/TO/alloydb.prp"
]
}
}
}You can run a local, read-only MCP server that exposes AlloyDB data through a simple MCP interface. This lets large language models query live AlloyDB data without writing SQL, while keeping data access secure and read-only on your machine.
Once you have the MCP server running, you interact with it through an MCP client. The server exposes tools that let the AI read data, retrieve table and column information, and run safe read-only queries against AlloyDB. You don’t need to write SQL to ask questions like which opportunities are open or which accounts belong to a specific industry. Simply ask in natural language and the AI client will use the built-in tools to fetch results from AlloyDB.
Prerequisites you need before starting: the Java runtime, and a prepared AlloyDB data source via the CData JDBC Driver for AlloyDB. You will also set up a local configuration file for the MCP server.
Step 1: Build the MCP server JAR from sources.
git clone https://github.com/cdatasoftware/alloydb-mcp-server-by-cdata.git
cd alloydb-mcp-server-by-cdata
mvn clean installStep 2: Prepare the CData JDBC Driver for AlloyDB by downloading and licensing it, then configure a connection string for your AlloyDB instance.
Step 3: Create a PRP configuration file that points the MCP server at your JDBC connection. Save this as something like alloydb.prp and ensure it includes your JDBC URL and driver details.
Step 4: Run the MCP server using the prepared PRP file.
java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/alloydb.prpThe MCP server runs locally on your machine and uses stdio to communicate with clients. This means the client and server must run on the same host. You can refresh or restart your client to ensure the MCP server appears in your client’s server list after configuration.
Tools exposed by the server follow a naming pattern based on the server name. For the AlloyDB setup, you will access tools named like cdata_alloydb_get_tables, cdata_alloydb_get_columns, and cdata_alloydb_run_query to explore data and perform queries.
If the MCP server does not appear in your client, fully quit the client and relaunch it so that the new server is discovered. Ensure your PRP file is correctly referenced and that the JDBC Driver is licensed and reachable from the server environment.
If data cannot be retrieved, verify the JDBC connection string and driver configuration. Re-create the connection string using the provided utility and ensure the updated string is reflected in the PRP file.
If you encounter issues with the MCP server itself, check for Java errors in the terminal where you started the server and confirm the PRP file paths are accurate.
Access to the local MCP server should be restricted to trusted clients on the same machine or network. Since this setup is read-only, ensure that write-access is not exposed through the MCP configuration.
Retrieves a list of tables available in the AlloyDB data source. The output is returned in CSV format with a header row.
Retrieves a list of columns for a specified table. The output is returned in CSV format with a header row.
Executes a SQL SELECT query against the AlloyDB data source and returns the results.