home / mcp / graphql mcp server

GraphQL MCP Server

This read-only MCP Server allows you to connect to GraphQL 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/).

Installation
Add the following to your MCP client configuration file.

Configuration

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

You can run a local MCP server that exposes live GraphQL data through a simple MCP interface. This read-only server lets AI clients query GraphQL-backed data without writing SQL, helping you obtain up-to-date information from supported sources in natural language.

How to use

You will start the MCP server on your machine and connect an MCP client (for example Claude Desktop) to it. The server runs on your local host and listens for commands issued by the client. Once connected, you can ask questions about your data and receive live results without writing any SQL. Use the client to explore tables and columns, run read-only queries, and retrieve data like a dashboard or reports.

How to install

Prerequisites: Install a Java Runtime Environment (JRE) or JDK and Maven for building the server.

1. Clone the project and navigate into the repository.

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

2. Build the server to produce the runnable JAR file.

mvn clean install

3. Download and install the CData JDBC Driver for GraphQL from the official site and license it.

https://www.cdata.com/drivers/graphql/download/jdbc

4. License the JDBC Driver by running the license command from the driver’s lib directory and entering your name, email, and a license key (TRIAL or your key). The path varies by OS.

java -jar cdata.jdbc.graphql.jar --license

5. Create a connection string using the driver’s connection string utility, then test and copy the JDBC URL.

java -jar cdata.jdbc.graphql.jar

6. Save the JDBC URL and create a .prp file (e.g. graphql.prp) with the connection details.

Prefix=graphql
ServerName=CDataGraphQL
ServerVersion=1.0
DriverPath=PATH\TO\cdata.jdbc.graphql.jar
DriverClass=cdata.jdbc.graphql.GraphQLDriver
JdbcUrl=jdbc:graphql:InitiateOAuth=GETANDREFRESH;
Tables=

Run the MCP server locally

Start the MCP server on the same machine as the client. The server runs in stdio mode and is started with the Java runtime and the prepared .prp file.

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

Available tools

graphql_mcp_get_tables

Retrieves the list of available data sources or tables exposed by the GraphQL MCP server. The output is provided in CSV format with headers.

graphql_mcp_get_columns

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

graphql_mcp_run_query

Executes a read-only query against the data source and returns results.