Configure the MCP client
This section provides information about how you can configure the MCP client to enable secure communication between Vertica AI Assist and the Vertica environment.
About the MCP client
The MCP client is a secure bridge that connects Vertica AI Assist to Vertica ensuring that database credentials are never exposed to the LLM. It provides:
- A secure, controlled interface between Vertica AI Assist and Vertica.
- Support for standardized database operations such as query execution, schema retrieval, and EXPLAIN plans.
- Authentication using JWT tokens, along with connection pooling and secure handling of user credentials.
Pre-requisites
Before configuring the MCP client, ensure that the MCP server is installed and configured. For information about installing and configuring the MCP server, see MCP server.
Configure the MCP client
Configuring the MCP client enables Vertica AI Assist to securely access databases and perform operations such as natural language to SQL (NL2SQL) conversion, query optimization, and query explanation. The configuration process establishes:
- Secure AI-driven database access
- Support for multiple database connections
- Schema-aware SQL generation
- Authenticated and auditable operations After configuring the MCP serve, use the configuration script to supply the required connection details.
Configuration script
Configure the MCP client using the mcp_configure.sh script located in /opt/vconsole/uc/scripts. This script prompts for the required inputs and generates a YAML configuration file (a human-readable format for configuration data) in config/dbconfigs/. The MCP client uses this file to establish a connection with the MCP server for AI operations.
Gather the following information before you run the configuration script:
- JWT Token — Authentication token for the MCP server. Generate this token on the Vertica host where the MCP server is installed. For information about obtaining JWT tokens, see MCP server.
- MCP Server Hostname or IP address — The system on which the MCP server is running. Identify the host by checking the node that is running MCP.
- MCP Port — The port used by the MCP server. The default port is 8667.
- Cluster and Database Information — Obtain this information from the MC View infrastructure page:
- MC cluster name
- Vertica database name
Run the configuration script
- Navigate to the scripts directory.
cd /opt/vconsole/uc/scriptsNote
Run the configuration script only from this directory. - Run the configuration script.
The configuration script prompts you to enter the JWT token, MCP server hostname or IP address, MCP port, cluster, and database information../mcp_configure.sh - Do one of the following:
- Yes - The configuration script generates a configuration file named <cluster_name>_<db_name>_conf.yaml.
- No - The configuration script prompts you to re-enter the MCP configuration details.
- Exit - The configuration script exits without creating a configuration file.
Post configuration
After completing the configuration:
- Restart the AI service.
- Verify connectivity by checking the log file logs/ai.log.
- Look for the message
MCP connected.
View the MCP server status
To view the MCP server status:
- Choose AI preferences under Settings in the home page.
The AI preferences page opens and displays the following information:
- Host - The host name.
- Model - The large language model (LLM) that is used.
- Creator - The person who created the LLM.
- Enabled for - The database for which the LLM is enabled.
- Status - The current status of the LLM.
- Hover over ⋮ and select Edit. All the details of the LLM are displayed. The MCP server status can be one of the following:
- Active - Indicates successful connection between the MCP server and the Vertica database.
- Inactive - Indicates when the connection could not be established due to errors. The MCP server might be inactive due to one of these reasons:
- Invalid Token
- Token Expired
- MCP Server is not active
- Not supported - Indicates that the Vertica database version is below 26.1, which is not supported by MCP.
Troubleshooting MCP server in inactive status
The MCP server can be in Inactive status due to one of the following issues:
- Missing or invalid configuration The YAML configuration file may be missing or contain incorrect cluster or database details. Re-run the configuration script with correct values.
- Expired or invalid JWT token The token may have expired or been entered incorrectly. Generate a new token on the Vertica server and update the configuration.
- MCP server not running Ensure that the MCP server is running. Restart the service if required.
This configuration ensures that Vertica AI Assist can securely interact with your database environment while maintaining enterprise-grade security, traceability, and performance.