Vertica MCP Server

Vertica MCP Server

Enables AI assistants to query and explore Vertica databases through natural language with readonly protection by default. Supports SQL execution, schema discovery, large dataset streaming, and Vertica-specific optimizations like projection awareness.

Category
访问服务器

README

Vertica MCP Server

A Model Context Protocol (MCP) server for Vertica databases. Enables AI assistants to query and explore Vertica databases through natural language.

Safety-first design: Readonly mode by default. Write operations require explicit configuration.

Features

  • 6 MCP Tools: Query execution, streaming, schema discovery
  • Readonly Protection: Only SELECT/SHOW/DESCRIBE/EXPLAIN/WITH queries by default
  • Large Dataset Streaming: Efficient batch processing (up to 1M rows)
  • Vertica-Optimized: Projection awareness, columnar query support
  • Production Ready: Connection pooling, SSL support, timeout configuration
  • Parameter Binding: SQL injection protection

Quick Start

Claude Code

claude mcp add vertica --scope user -- npx -y @hechtcarmel/vertica-mcp@latest  --env-file /path/to/your/.env

Create your .env file with connection details:

VERTICA_HOST=your-vertica-host.com
VERTICA_PORT=5433
VERTICA_DATABASE=your_database
VERTICA_USER=your_username
VERTICA_PASSWORD=your_password

Cursor

  1. Create environment file ~/.cursor/vertica.env:
VERTICA_HOST=your-vertica-host.com
VERTICA_PORT=5433
VERTICA_DATABASE=your_database
VERTICA_USER=your_username
VERTICA_PASSWORD=your_password
  1. Configure ~/.cursor/mcp.json:
{
  "mcpServers": {
    "vertica-mcp": {
      "command": "npx",
      "args": [
        "@hechtcarmel/vertica-mcp",
        "--env-file",
        "/Users/yourusername/.cursor/vertica.env"
      ]
    }
  }
}
  1. Restart Cursor

Claude Desktop

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "vertica-mcp": {
      "command": "npx",
      "args": [
        "@hechtcarmel/vertica-mcp",
        "--env-file",
        "/path/to/your/.env"
      ]
    }
  }
}

Configuration

Required Variables

VERTICA_HOST          # Database hostname
VERTICA_DATABASE      # Database name
VERTICA_USER          # Username

Optional Variables

VERTICA_PORT=5433                      # Default: 5433
VERTICA_PASSWORD                       # Password (optional)
VERTICA_READONLY_MODE=true             # Default: true
VERTICA_CONNECTION_LIMIT=10            # Default: 10 (max: 100)
VERTICA_QUERY_TIMEOUT=60000            # Default: 60000ms
VERTICA_SSL=false                      # Default: false
VERTICA_SSL_REJECT_UNAUTHORIZED=true   # Default: true
VERTICA_DEFAULT_SCHEMA=public          # Default: public

Enabling Write Operations

To allow INSERT/UPDATE/DELETE/CREATE/DROP operations:

VERTICA_READONLY_MODE=false

Warning: Only disable readonly mode if you understand the implications.

Available Tools

Query Execution

  • execute_query: Execute SQL with optional parameters
  • stream_query: Handle large datasets with configurable batching

Schema Discovery

  • get_table_structure: Table columns, types, constraints
  • list_tables: All tables in schema with metadata
  • list_views: All views with definitions
  • list_indexes: Vertica projections for optimization

Usage Examples

Query Data

SELECT customer_state, COUNT(*) as count
FROM customer_dimension
GROUP BY customer_state
ORDER BY count DESC
LIMIT 10;

Explore Schema

SHOW TABLES;
DESCRIBE customer_dimension;

Analyze Performance

EXPLAIN SELECT * FROM store_sales_fact
WHERE sale_date_key > '2023-01-01';

Stream Large Results

When querying large datasets, use the stream_query tool:

  • Default batch size: 1000 rows
  • Configurable batch size: 1-10,000 rows
  • Maximum rows: 1,000,000

Troubleshooting

Connection Failed

# Test connectivity directly
vsql -h localhost -p 5433 -d VMart -U dbadmin

Verify:

  • Host and port are reachable
  • Database credentials are correct
  • User has required permissions

Permission Errors

  • User needs SELECT permissions on tables
  • User needs access to system catalogs (v_catalog.*)

Query Timeouts

Increase timeout for complex queries:

VERTICA_QUERY_TIMEOUT=300000  # 5 minutes

Large Result Sets

Use stream_query instead of execute_query for queries returning >10,000 rows.

Requirements

  • Node.js >= 18.0.0
  • Vertica database (any recent version)
  • Network access to Vertica server

Support

License

MIT License - see LICENSE file.

Acknowledgments

This project's architecture and tool design are based on mcp-vertica by @nolleh.


Current Version: 1.3.5

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选