MCP Connector

Connect to and Query Vertica Databases

MCP server for Vertica exposing query, streaming, bulk-load, and schema-inspection tools with fine-grained write permissions.

Works with vertica

90
Spark score
out of 100
Updated 8 months ago
Version 0.1.14
Models
universal

Add to Favorites

Why it matters

Establish secure connections to Vertica databases, execute complex SQL queries, and manage data operations with fine-grained access control.

Outcomes

What it gets done

01

Manage database connections with pooling and SSL support.

02

Execute SQL queries and stream large result sets.

03

Perform bulk data loading using the COPY command.

04

Inspect table schemas, indexes, and views.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-vertica | bash

Capabilities

Tools your agent gets

execute_query

Execute SQL queries with support for all SQL operations

stream_query

Stream large query results in batches with configurable batch size

copy_data

Bulk load data using the COPY command, efficient for large datasets

get_table_structure

Retrieve detailed table structure, including column information and constraints

list_indexes

List all indexes for a table with index type, uniqueness, and column information

list_views

List all views in a schema with view definitions

Overview

Vertica MCP Server

This MCP server connects to Vertica, exposing query execution/streaming, COPY-based bulk loading, and schema inspection (table structure, indexes, views) as tools, with layered connection, operation, and per-schema permissions. Use it when an agent needs to query, stream, bulk-load, or inspect a Vertica database's schema - write and DDL operations are disabled by default and must be explicitly enabled per operation and schema.

What it does

Provides an MCP server for Vertica - described as the first implementation of a Vertica MCP server, listed in the official Model Context Protocol Registry - exposing database connection management, query operations, and schema inspection as MCP tools.

Connection management includes connection pooling with configurable limits, SSL/TLS support, automatic connection cleanup, and connection timeout handling. Six tools are exposed: execute_query (runs SQL queries, supporting all SQL operations), stream_query (streams large query results in configurable batches), copy_data (bulk data loading via Vertica's COPY command, efficient for large datasets), get_table_structure (detailed table structure, column information, constraints), list_indexes (all indexes for a table, with index type/uniqueness/column info), and list_views (all views in a schema, with view definitions). Security features layer operation-level permissions (INSERT, UPDATE, DELETE, DDL, each independently toggleable) with schema-specific permission overrides, plus SSL/TLS support and password masking in logs.

{
  "mcpServers": {
    "vertica": {
      "command": "uvx",
      "args": ["mcp-vertica"],
      "env": {
        "VERTICA_HOST": "localhost",
        "VERTICA_PORT": 5433,
        "VERTICA_DATABASE": "VMart",
        "VERTICA_USER": "dbadmin",
        "VERTICA_PASSWORD": "test_password",
        "VERTICA_CONNECTION_LIMIT": 10,
        "VERTICA_SSL": false,
        "VERTICA_SSL_REJECT_UNAUTHORIZED": true
      }
    }
  }
}

Configuration is environment-variable driven: connection settings (VERTICA_HOST, VERTICA_PORT, VERTICA_DATABASE, VERTICA_USER, VERTICA_PASSWORD, VERTICA_CONNECTION_LIMIT, VERTICA_SSL, VERTICA_SSL_REJECT_UNAUTHORIZED), operation permissions (ALLOW_INSERT_OPERATION, ALLOW_UPDATE_OPERATION, ALLOW_DELETE_OPERATION, ALLOW_DDL_OPERATION, all boolean), and per-schema permissions (SCHEMA_INSERT_PERMISSIONS, SCHEMA_UPDATE_PERMISSIONS, SCHEMA_DELETE_PERMISSIONS, SCHEMA_DDL_PERMISSIONS, each a comma-separated schema:bool list). It can also run via Docker or uvx with CLI args instead of environment variables. Debug logging is available in Docker via a DEBUG env var (0=none through 3=maximum verbosity, -vvv) and an EXTRA_ARGS variable for passing additional CLI flags.

When to use - and when NOT to

Use it when an AI agent needs to query, stream, bulk-load, or inspect the schema of a Vertica database directly, with fine-grained control over which write/DDL operations are allowed per schema. Write and DDL operations are disabled by default (ALLOW_*_OPERATION=false) and must be explicitly enabled - review the permission configuration before allowing any agent to perform inserts, updates, deletes, or DDL against production data.

Inputs and outputs

Configuration is Vertica connection details (host, port, database, user, password, connection limit, SSL settings) plus operation and schema-level permission flags, supplied via environment variables or CLI args. Tool inputs are SQL queries, table/schema names, or COPY-command data; outputs are query results (direct or streamed in batches), table/index/view metadata, or load-operation results.

Capabilities

For local development and testing, the project ships a Docker Compose example that spins up a Vertica Community Edition container (vertica/vertica-ce) bound to ports 5433 and 5444, with a persisted VMart data volume and a vsql-based healthcheck - letting the server be exercised against a real Vertica instance without a production connection. The project is MIT licensed.

How to install

Install automatically via Smithery (npx -y @smithery/cli install @nolleh/mcp-vertica --client claude), or manually by configuring your MCP client with uvx mcp-vertica (or the Docker image nolleh/mcp-vertica) and the environment variables shown above. Available as a PyPI package (mcp-vertica).

Who it's for

Teams running Vertica who want an AI agent to query, stream, bulk-load, or inspect their database schema directly, with explicit, per-schema control over which write and DDL operations the agent is permitted to run.

Source README

MseeP.ai Security Assessment Badge

MCP Vertica

PyPI version
License: MIT
Downloads
smithery badge
MCP Community

šŸ† First implementation of Vertica MCP Server • Learn more

āœ… Listed in Model Context Protocol Official Registry

A Vertica MCP(model-context-protocol) Server

Vertica MCP server

Example: MCP Server Setting

Create or edit the file your mcp client config file with the following content:

UVX
{
  "mcpServers": {
    "vertica": {
      "command": "uvx",
      "args": ["mcp-vertica"],
      "env": {
        "VERTICA_HOST": "localhost",
        "VERTICA_PORT": 5433,
        "VERTICA_DATABASE": "VMart",
        "VERTICA_USER": "dbadmin",
        "VERTICA_PASSWORD": "test_password",
        "VERTICA_CONNECTION_LIMIT": 10,
        "VERTICA_SSL": false,
        "VERTICA_SSL_REJECT_UNAUTHORIZED": true
      }
    }
  }
}

Or with args

{
  "mcpServers": {
    "vertica": {
      "command": "uvx",
      "args": [
        "mcp-vertica",
        "--host=localhost",
        "--db-port=5433",
        "--database=VMart",
        "--user=dbadmin",
        "--password=test_password",
        "--connection-limit=10"
      ]
    }
  }
}
Docker
{
  "mcpServers": {
    "vertica": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "nolleh/mcp-vertica"],
      "env": {
        "VERTICA_HOST": "localhost",
        "VERTICA_PORT": 5433,
        "VERTICA_DATABASE": "VMart",
        "VERTICA_USER": "dbadmin",
        "VERTICA_PASSWORD": "test_password",
        "VERTICA_CONNECTION_LIMIT": 10,
        "VERTICA_SSL": false,
        "VERTICA_SSL_REJECT_UNAUTHORIZED": true
      }
    }
  }
}

Features

Database Connection Management

  • Connection pooling with configurable limits
  • SSL/TLS support
  • Automatic connection cleanup
  • Connection timeout handling

Query Operations

  • Execute SQL queries
  • Stream large query results in batches
  • Copy data operations
  • Transaction management

Schema Management

  • Table structure inspection
  • Index management
  • View management
  • Constraint information
  • Column details

Security Features

  • Operation-level permissions (INSERT, UPDATE, DELETE, DDL)
  • Schema-specific permissions
  • SSL/TLS support
  • Password masking in logs

Tools

Database Operations

  1. execute_query

    • Execute SQL queries
    • Support for all SQL operations
  2. stream_query

    • Stream large query results in batches
    • Configurable batch size
  3. copy_data

    • Bulk data loading using COPY command
    • Efficient for large datasets

Schema Management

  1. get_table_structure

    • Get detailed table structure
    • Column information
    • Constraints
  2. list_indexes

    • List all indexes for a table
    • Index type and uniqueness
    • Column information
  3. list_views

    • List all views in a schema
    • View definitions

Configuration

Environment Variables

VERTICA_HOST=localhost
VERTICA_PORT=5433
VERTICA_DATABASE=VMart
VERTICA_USER=newdbadmin
VERTICA_PASSWORD=vertica
VERTICA_CONNECTION_LIMIT=10
VERTICA_SSL=false
VERTICA_SSL_REJECT_UNAUTHORIZED=true

Operation Permissions

ALLOW_INSERT_OPERATION=false
ALLOW_UPDATE_OPERATION=false
ALLOW_DELETE_OPERATION=false
ALLOW_DDL_OPERATION=false

Schema Permissions

SCHEMA_INSERT_PERMISSIONS=schema1:true,schema2:false
SCHEMA_UPDATE_PERMISSIONS=schema1:true,schema2:false
SCHEMA_DELETE_PERMISSIONS=schema1:true,schema2:false
SCHEMA_DDL_PERMISSIONS=schema1:true,schema2:false

Installation

Installing via Smithery

To install Vertica Database Connector for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @nolleh/mcp-vertica --client claude

Installing Manually

Open your favorite mcp client's config file, then configure with uvx mcp-vertica

Example: Mcp Server Setting

Development

Debug Mode

When running with Docker, you can enable debug logging by setting the DEBUG environment variable:

# Run with maximum verbosity (-vvv)
docker run -e DEBUG=3 -e VERTICA_HOST=localhost ... nolleh/mcp-vertica:latest

# Run with medium verbosity (-vv)
docker run -e DEBUG=2 -e VERTICA_HOST=localhost ... nolleh/mcp-vertica:latest

# Pass additional arguments
docker run -e EXTRA_ARGS="--connection-limit=20" -e VERTICA_HOST=localhost ... nolleh/mcp-vertica:latest

In docker-compose.yml:

environment:
  DEBUG: 3  # 0=none, 1=-v, 2=-vv, 3=-vvv
  EXTRA_ARGS: "--connection-limit=20"  # Optional additional arguments
Appendix: For Testing, VerticaDB Docker Compose Example
version: "3.8"

services:
  vertica:
    # image: vertica/vertica-ce:11.1.0-0
    image: vertica/vertica-ce:latest
    platform: linux/amd64
    container_name: vertica-ce
    environment:
      VERTICA_MEMDEBUG: 2
    ports:
      - "5433:5433"
      - "5444:5444"
    volumes:
      - vertica_data:/home/dbadmin/VMart
    healthcheck:
      test:
        [
          "CMD",
          "/opt/vertica/bin/vsql",
          "-h",
          "localhost",
          "-d",
          "VMart",
          "-U",
          "dbadmin",
          "-c",
          "SELECT 1",
        ]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 30s
    restart: unless-stopped

  mcp-vertica:
    image: nolleh/mcp-vertica:latest
    container_name: mcp-vertica
    ports:
      - "8081:8081"
    environment:
      # Transport mode
      TRANSPORT: http
      PORT: 8081
      # Debug settings (0=none, 1=-v, 2=-vv, 3=-vvv)
      DEBUG: 3  # Set to 3 for maximum verbosity
      # Extra command line arguments (optional)
      # EXTRA_ARGS: "--some-flag"
      # Vertica connection settings
      VERTICA_HOST: vertica
      VERTICA_PORT: 5433
      VERTICA_DATABASE: VMart
      VERTICA_USER: dbadmin
      VERTICA_PASSWORD: ""
      VERTICA_CONNECTION_LIMIT: 10
      VERTICA_SSL: "false"
    depends_on:
      vertica:
        condition: service_healthy

volumes:
  vertica_data:
    driver: local

Then run server by following instruction Example: Mcp Server Setting,
Then see everything works as fine

FAQ

Common questions

Discussion

Questions & comments Ā· 0

Sign In Sign in to leave a comment.