home / mcp / marklogic mcp server
This read-only MCP Server allows you to connect to MarkLogic data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out our MCP Server for MarkLogic (https://www.cdata.com/drivers/marklogic/download/mcp).
Configuration
View docs{
"mcpServers": {
"cdatasoftware-marklogic-mcp-server-by-cdata": {
"command": "java",
"args": [
"-jar",
"/PATH/TO/CDataMCP-jar-with-dependencies.jar",
"/PATH/TO/marklogic.prp"
],
"env": {
"JAVA_HOME": "PATH_TO_JAVA_HOME"
}
}
}
}You deploy a read-only MCP server that lets you query live MarkLogic data through the CData JDBC Driver, without writing SQL. This server exposes MarkLogic data via a simple MCP interface so large language models can fetch up-to-date information by asking natural-language questions.
Once the MCP server is running, you connect your MCP client (such as Claude Desktop) and start asking questions about your MarkLogic data. You can ask about data relationships, counts, or specific records, and the MCP server will translate your requests into live data queries under the hood. Focus on natural-language prompts like: ”What is the total count of documents in the active collection?” or “Show me all records where a field matches a given condition.” Access is read-only by design, but your client can discover available tables (data sources) and columns and perform read queries against them.
# Prerequisites
- Java Runtime Environment (JRE) or JDK 8+ installed
- Maven for building the project (maven) or use an environment that provides mvn
# 1) Clone the project and navigate into it
git clone https://github.com/cdatasoftware/marklogic-mcp-server-by-cdata.git
cd marklogic-mcp-server-by-cdata
# 2) Build the MCP server jar with dependencies
mvn clean install
# This produces: CDataMCP-jar-with-dependencies.jar3) Prepare the CData JDBC Driver for MarkLogic and license it according to your operating system. You will need the JDBC driver jar and a valid license key.
4) Create a properties file for the JDBC connection (example name marklogic.prp) with the required fields shown in the configuration section of this guide. This file will point to the JDBC driver jar and the JDBC URL for MarkLogic.
java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/marklogic.prp
```
(Note: This server uses stdio and runs on the same machine as your client.)Create or update the Claude Desktop configuration to register the new MCP server. Add an entry under mcpServers that launches the MCP server jar with the marklogic.prp configuration.
{
"mcpServers": {
"marklogic_mcp": {
"command": "PATH\\to\\java.exe",
"args": [
"-jar",
"PATH\\to\\CDataMCP-jar-with-dependencies.jar",
"PATH\\to\\marklogic.prp"
]
}
}
}
```
Replace PATH to actual locations on your system.If you do not see the MCP server appear in Claude Desktop immediately, fully quit the client and reopen it so the new MCP server entry is loaded.
You can iterate on your JDBC configuration by updating the marklogic.prp file and restarting the MCP server. The server exposes tools to discover available tables and columns, and to run read queries in a way that feels natural within your MCP client workflow.
If you cannot see the MCP server in your client, ensure you have fully quit and restarted the client. Verify that the Java process is running and that the path to the JAR and the prp file are correct. If data retrieval fails, confirm your JDBC URL and driver settings, and ensure the MarkLogic data source is reachable.
This MCP server is read-only by design to enable safe querying of live MarkLogic data through the MCP interface.
Retrieves a list of available data sources (tables) from the MarkLogic connection. Output is provided in CSV format with headers.
Retrieves a list of columns for a specified table. Output is provided in CSV format with headers.
Executes a SELECT query against the MarkLogic data source and returns results.