Establishing a Connection
The CData Code Assist MCP for MarkLogic defines each connection to MarkLogic as a named configuration that an MCP Client (such as Claude Desktop) can use when sending natural language queries.
You create and manage these configurations using the CData Code Assist MCP Configuration Tool. The tool automatically handles formatting, storage, and registration with MCP clients.
Understanding Connection Configurations
Each connection configuration is stored in a .mcp file. This file includes the details needed to initialize the connector when an MCP Client starts a session.
- On Windows, configuration files are stored in "~/AppData/Roaming/CData/MarkLogic Data Provider/".
- On macOS, configuration files are stored in "~/Library/Application Support/CData/MarkLogic Data Provider/".
The .mcp file is a text file that contains a list of connection properties and a timestamp. For example:
#Tue May 20 15:48:40 EDT 2025 AuthScheme=Basic User=myUser Password=myPassword Security Token=myToken
The configuration tool handles these settings automatically. Each saved configuration enables an MCP client to launch a dedicated MCP server instance with the correct connector and options. Manual file editing is not required.
Connecting to MarkLogic
Picking an API
The CData Code Assist MCP for MarkLogic offers access to both the REST and ODBC APIs for MarkLogic. Please see Picking the right API for a discussion on which API is right for your use case.
Connection Details
Regardless of which API you are connecting to, you will need to include the following connection details:
- Server - The server being connected to.
- Database - (Optional) The specific database to connect to.
- Port - (Optional) The specific port to use if the default port for the selected API is not being used default.
Create an ODBC Server
If connecting to the ODBC API, please follow the guide in MarkLogic's official website on how to create an ODBC Server, https://docs.marklogic.com/guide/admin/odbc.
Authenticating to MarkLogic
To authenticate to MarkLogic, specify the following connection properties: