Establishing a Connection
The CData Code Assist MCP for Cloudant defines each connection to Cloudant 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/Cloudant Data Provider/".
- On macOS, configuration files are stored in "~/Library/Application Support/CData/Cloudant 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.
Authenticating to Cloudant
Cloudant supports two types of authentication:- OAuthAPIKey: Performs authentication based on the API Key. Set AuthScheme to OAuthAPIKey and supply the values for the Cloudant instance APIKey and URL.
- Basic: Basic username/password authentication. Set AuthScheme to Basic.
IBM Cloud IAM
IBM Cloud IAM is OAuthAPIKey-based authentication accessed via a web browser.To authenticate to IBM Cloud, set AuthScheme to OAuthAPIKey and supply the ApiKey and the URL of the target Cloudant instance (for example, https://0c9d3837-8304-4aab-a65a-648169970943-bluemix.cloudant.com).
After setting InitiateOAuth to GETANDREFRESH, you are ready to connect.
When you connect, the server completes the OAuthAPIKey process.
- Extracts the access token and authenticates requests.
- Saves OAuthAPIKey values in OAuthSettingsLocation to be persisted across connections.
Retrieving OAuthAPIKey connection properties
To retrieve the OAuthAPIKey connection properties:- Create an account in IBM Cloud.
- Obtain the ApiKey:
- Log in to your IBM Cloud account.
- Navigate to Platform API Keys page.
- To create a new API Key, click Create an IBM Cloud API Key. Cloudant displays a pop-up form.
- Specify the API Key name and click Create. Cloudant displays the
ApiKey you just created.
Save this information for future reference.
Registering a new instance of Cloudant
If you do not already have Cloud Object Storage in your IBM Cloud account, you can install an instance of SQL Query in your account:
- Log in to your IBM Cloud account.
- Navigate to the Cloudant page.
- Choose a name for your instance and click Create. You are redirected to that Cloudant instance.
IBM Cloudant Legacy
To connect via IBM Cloudant Legacy, ensure that you have a valid IBM Cloudant service credential.To create an IBM Cloudant service credential:
- Log in to the IBM Cloud dashboard.
- Navigate to the Menu icon > Resource List, and open your IBM Cloudant service instance.
- In the menu, click Service credentials.
- Click New credential. Cloudant displays a Add new credential window.
- Enter a name for the new credential.
- Click Add. Your credentials are added to the Service credentials table.
- Click Actions > View credentials.
- Extract the values for User and Password from the JSON file.
Use the values you just obtained to set the User and Password.
Authenticating to a Local Instance
Cloudant supports authenticating to data in local instances from version 1.1.0 and above.To authenticate to your local instance, set these parameters: