home / mcp / vertica mcp server
Provides read-only access to Vertica databases via MCP with query, streaming, and schema discovery capabilities.
Configuration
View docs{
"mcpServers": {
"hechtcarmel-vertica-mcp": {
"command": "npx",
"args": [
"-y",
"@hechtcarmel/vertica-mcp@latest",
"--env-file",
"/path/to/your/.env"
],
"env": {
"VERTICA_HOST": "your-vertica-host.com",
"VERTICA_PORT": "5433",
"VERTICA_USER": "your_username",
"VERTICA_DATABASE": "your_database",
"VERTICA_PASSWORD": "your_password",
"VERTICA_READONLY_MODE": "true"
}
}
}
}You run a Vertex MCP Server to query and explore Vertica databases via natural language. It operates in readonly by default, protects your data, and supports large result streaming, SSL, and parameter binding for safe, scalable AI-assisted data access.
Connect with an MCP client that talks to your MCP server. You can perform typical SQL actions such as selecting data, describing schemas, and explaining query plans. Start with readonly mode enabled to protect data, then selectively enable write operations only after you understand the implications.
Typical usage patterns include querying data with parameter binding to avoid SQL injection, streaming large results in batches, and discovering schema details like table structures and available views. Use the provided tools to execute SQL, stream large datasets, and perform schema discovery tasks.
Prerequisites: Node.js version 18 or newer must be installed on your system.
Install the MCP server client runner and prepare environment values as shown in the example commands.
# Run the Vertica MCP server using npx with environmental configuration
npx -y @hechtcarmel/vertica-mcp@latest --env-file /path/to/your/.env
```
```
# Example .env file contents
VERTICA_HOST=your-vertica-host.com
VERTICA_PORT=5433
VERTICA_DATABASE=your_database
VERTICA_USER=your_username
VERTICA_PASSWORD=your_password
```
```
# If you are using Cursor, you would reference the same environment file in its MCP config
# Path shown is an example and should be replaced with your actual path
```
```
# Claude Desktop/Clipboard style setup contains similar npx-based startup
npx @hechtcarmel/vertica-mcp --env-file /path/to/your/.env
```
```
# Example Vertica connection settings can be adjusted via optional env vars
VERTICA_READONLY_MODE=true
VERTICA_QUERY_TIMEOUT=60000Required environment variables: VERTICA_HOST, VERTICA_DATABASE, and VERTICA_USER must be provided to connect to your Vertica instance.
Optional environment variables include port, password, read-only mode, connection limits, timeouts, SSL settings, and default schema. You can enable or disable write operations by adjusting VERTICA_READONLY_MODE.
If you set VERTICA_READONLY_MODE=false, write operations such as INSERT, UPDATE, DELETE, CREATE, or DROP become available. Only disable readonly mode if you understand the risks.
To optimize performance, you can rely on projection awareness and columnar query support, enable SSL, and configure connection pools and timeouts as described.
-- Basic data query
SELECT customer_state, COUNT(*) as count
FROM customer_dimension
GROUP BY customer_state
ORDER BY count DESC
LIMIT 10;
```
```
-- Schema exploration
SHOW TABLES;
DESCRIBE customer_dimension;
```
```
-- Explain plan for performance analysis
EXPLAIN SELECT * FROM store_sales_fact
WHERE sale_date_key > '2023-01-01';
```
```
-- Streaming large results (batching example, actual batch size is configurable)
SELECT * FROM large_tableConnection failures can be diagnosed by verifying host, port, credentials, and permissions. Test connectivity with a simple Vertica client if needed and ensure the MCP server can reach the Vertica instance.
If you encounter permission errors, ensure the user has SELECT permissions on the needed tables and access to system catalogs (v_catalog.*).
For long-running queries, increase VERTICA_QUERY_TIMEOUT to allow more time for complex executions.
When dealing with large result sets, prefer stream_query over execute_query to manage batching efficiently.
This MCP server is designed with safety-first principles: default readonly mode reduces the risk of unintended data modification. Production deployments should carefully validate and monitor permissions, SSL settings, and connection limits.
Execute SQL with optional parameters and return results.
Handle large result sets by streaming in configurable batches.
Return table columns, types, and constraints.
List all tables in the schema with metadata.
List all views with definitions.
List Vertica projections for optimization.