Deephaven Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Deephaven Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
deephaven_mcp.jsonSupercharge your AI workflows with real-time data. Deephaven MCP brings the power of live dataframes directly to your favorite AI tools -— Claude Desktop, Cursor, VS Code (GitHub Copilot), Windsurf, and more.
Most data tools force you to choose: fast or real-time. With Deephaven's revolutionary live dataframes, you get both. Process streaming data at millisecond speeds while your AI assistant helps you build, query, and analyze -— all through natural language.
🚀 What makes this different:
Deephaven MCP implements the Model Context Protocol (MCP) standard using FastMCP to provide seamless integration between Deephaven Community Core and Deephaven Enterprise systems and your AI development workflow. Perfect for data scientists, engineers, analysts, business users, and anyone who wants to harness real-time data—regardless of programming experience. Let AI generate the code while you focus on insights.
Get up and running in 5 minutes! This quickstart assumes you have a local Deephaven Community Core instance running on localhost:10000. If you don't have one, download and start Deephaven Community Core first.
Using `uv` (recommended):
Pick a suitable project directory for your venv.
name_of_your_venv=".venv"
uv venv $name_of_your_venv -p 3.11Using standard `venv`:
python3.11 -m venv .venvReplace3.11/python3.11with any supported Python version (3.11, 3.12, or 3.13).
For most users, installing with both Community + Enterprise support is the best default.
These instructions cover the installation of the Deephaven MCP system server, which enables AI agents to interact with Deephaven Community and Enterprise systems.
Note: The Deephaven MCP docs server is hosted by Deephaven and requires no installation.
Using `uv` (recommended):
uv pip install "deephaven-mcp[community,enterprise]"Using standard `pip`:
.venv/bin/pip install "deephaven-mcp[community,enterprise]"Optional Dependencies:
| Extra | Use when |
|---|---|
[community] | You want to create Community Core sessions using python (no Docker) |
[enterprise] | You need to connect to Deephaven Enterprise (Core+) systems |
[test] | You want to run the test suite |
[lint] | You only need code quality tools (linting, formatting, type checking) |
[dev] | You're developing/contributing to this project (includes everything) |
For more details and additional installation methods, see Installation & Initial Setup.
Create a file called deephaven_mcp.json anywhere on your system:
{
// Community Core session configurations
"community": {
"sessions": {
// "local" is a custom name - use any name you want for your sessions
"local": {
"host": "localhost", // Server hostname or IP address
"port": 10000, // Deephaven gRPC port (default: 10000)
// Full authentication handler class name (can also use "PSK" shorthand)
"auth_type": "io.deephaven.authentication.psk.PskAuthenticationHandler",
"auth_token": "YOUR_PASSWORD_HERE" // Must match your Deephaven server token
}
},
// Optional: Enable MCP tools for creating/deleting sessions on-demand
// Useful for temporary workspaces and dynamic testing environments
"session_creation": {
"defaults": {
"launch_method": "python" // "python" or "docker"
}
}
}
}⚠️ Security Note: Since this file contains authentication credentials, set restrictive permissions:
>
``sh chmod 600 deephaven_mcp.json ``💡 Dynamic Sessions: Thesession_creationsection enables on-demand Community Core session creation. Requirements:deephaven-server(installed in any Python venv) for the python method, or Docker for the docker method. See Community Session Creation Configuration for details.
For Claude Desktop, open Claude Desktop → Settings → Developer → Edit Config and add:
{
"mcpServers": {
"deephaven-systems": {
"command": "/full/path/to/your/.venv/bin/dh-mcp-systems-server",
"args": [],
"env": {
"DH_MCP_CONFIG_FILE": "/full/path/to/your/deephaven_mcp.json",
"PYTHONLOGLEVEL": "INFO"
}
},
"deephaven-docs": {
"command": "/full/path/to/your/.venv/bin/mcp-proxy",
"args": [
"--transport=streamablehttp",
"https://deephaven-mcp-docs-prod.dhc-demo.deephaven.io/mcp"
]
}
}
}For other tools, see the detailed setup instructions below.
Restart your AI tool (or IDE). This will start your mcp servers from the installation in the venv you have supplied, located from the configuration supplied.
Confirm the setup is working by asking:
"List my Deephaven sessions and show me the tables in the local session"
"What Python packages are installed in my Deephaven environment?"
"Execute this Python code in my Deephaven session: t = empty_table(100).update('x=i', 'y=i*2')"Need help? Check the Troubleshooting section, ask the built-in docs server about Deephaven features, or join the Deephaven Community Slack!
Already have `deephaven-mcp` installed? Here's how to upgrade:
Using `uv`:
uv pip install --upgrade deephaven-mcpUsing standard `pip`:
.venv/bin/pip install --upgrade deephaven-mcpTo upgrade with optional dependencies:
# uv
uv pip install --upgrade "deephaven-mcp[community,enterprise]"
# pip
.venv/bin/pip install --upgrade "deephaven-mcp[community,enterprise]"After upgrading, restart your AI tool for changes to take effect.
Manages and connects to multiple Deephaven Community Core sessions and Deephaven Enterprise systems. This allows for unified control and interaction with your Deephaven instances from various client applications.
Key Capabilities:
Session Management:
sessions_list - List all configured sessionssession_details - Get detailed session informationmcp_reload - Reload configuration and clear cachesCommunity Sessions:
session_community_create - Dynamically launch Community Core sessionssession_community_delete - Delete dynamically created sessionssession_community_credentials - Retrieve session credentialsEnterprise Systems & Sessions:
enterprise_systems_status - Get enterprise system statussession_enterprise_create - Create enterprise sessionssession_enterprise_delete - Delete enterprise sessionsPersistent Query (PQ) Management:
pq_name_to_id - Convert PQ name to canonical pq_idpq_list - List all persistent queries on a systempq_details - Get detailed PQ informationpq_create - Create new persistent queriespq_modify - Modify existing persistent query configurationpq_start - Start persistent queries (supports parallel execution with configurable concurrency)pq_stop - Stop running persistent queries (supports parallel execution with configurable concurrency)pq_restart - Restart persistent queries (supports parallel execution with configurable concurrency)pq_delete - Delete persistent queries (supports parallel execution with configurable concurrency)Parallel Batch Operations: When operating on multiple PQs, pq_start, pq_stop, pq_restart, and pq_delete execute operations in parallel with a default concurrency limit of 20. This provides near-batch performance (~10x faster for large batches) while maintaining granular per-item error reporting for AI agents. The concurrency limit can be adjusted via the max_concurrent parameter to balance performance and server load.
Table Operations:
session_tables_list - List available tablessession_tables_schema - Get table schema informationsession_table_data - Retrieve table data with formatting optionsCatalog Discovery (Enterprise):
catalog_tables_list - List catalog tablescatalog_namespaces_list - Browse catalog namespacescatalog_tables_schema - Get catalog table schemascatalog_table_sample - Sample catalog table dataExecution & Packages:
session_script_run - Execute Python/Groovy scriptssession_pip_list - Query installed packagesFor detailed tool documentation with parameters and examples, see the Developer & Contributor Guide.
Connects to Deephaven's documentation knowledge base via Inkeep AI to answer questions about Deephaven features, APIs, and usage patterns. Ask questions in natural language and get specific answers with code examples and explanations.
graph TD
A["MCP Clients (Claude Desktop, etc.)"] --"stdio (MCP)"--> B("MCP Systems Server")
B --"Manages"--> C("Deephaven Community Core Worker 1")
B --"Manages"--> D("Deephaven Community Core Worker N")
B --"Manages"--> E("Deephaven Enterprise System 1")
B --"Manages"--> F("Deephaven Enterprise System N")
E --"Manages"--> G("Enterprise Worker 1.1")
E --"Manages"--> H("Enterprise Worker 1.N")
F --"Manages"--> I("Enterprise Worker N.1")
F --"Manages"--> J("Enterprise Worker N.N")Clients connect to the [MCP Systems Server](#systems-server-architecture), which in turn manages and communicates with [Deephaven Community Core](https://deephaven.io/community/) sessions and [Deephaven Enterprise](https://deephaven.io/enterprise/) systems.
graph TD
A["MCP Clients with streamable-http support"] --"streamable-http (direct)"--> B("MCP Docs Server")
C["MCP Clients without streamable-http support"] --"stdio"--> D["mcp-proxy"]
D --"streamable-http"--> B
B --"Accesses"--> E["Deephaven Documentation Corpus via Inkeep API"]Modern MCP clients can connect directly via streamable-http for optimal performance. Clients without native streamable-http support can use [`mcp-proxy`](https://github.com/modelcontextprotocol/mcp-proxy) to bridge stdio to streamable-http.
pip install uv or see the uv installation guide.venv) tools and pip.⚡ Quick Path: For a fast getting-started experience, see the 🚀 Quick Start guide above. This section provides additional installation details and alternative methods.
The recommended way to install deephaven-mcp is from PyPI, which provides the latest stable release.
#### Using uv (Fast, Recommended)
uv is a high-performance Python package manager. For detailed uv workflows and project-specific setup, see the uv documentation.
Install uv:
pip install uvCreate environment and install:
# Create virtual environment with Python 3.11+, in a chosen project directory
name_of_your_venv=".venv"
uv venv $name_of_your_venv -p 3.11
# Install deephaven-mcp (choose your extras)
uv pip install deephaven-mcp # Basic
uv pip install "deephaven-mcp[community]" # + Python session creation
uv pip install "deephaven-mcp[enterprise]" # + Enterprise support
uv pip install "deephaven-mcp[community,enterprise]" # Both#### Using Standard pip and venv
Create environment and install:
# Create virtual environment
python3.11 -m venv .venv
# Install deephaven-mcp (choose your extras)
.venv/bin/pip install deephaven-mcp # Basic
.venv/bin/pip install "deephaven-mcp[community]" # + Python session creation
.venv/bin/pip install "deephaven-mcp[enterprise]" # + Enterprise support
.venv/bin/pip install "deephaven-mcp[community,enterprise]" # BothOptional Dependency Reference:
| Extra | Provides |
|---|---|
[community] | Python-based Community Core session creation (no Docker) |
[enterprise] | Deephaven Enterprise (Core+) system connectivity |
[test] | Testing framework and utilities |
[lint] | Code quality tools (linting, formatting, type checking) |
[dev] | Full development environment (all of the above) |
This section covers all aspects of configuring Deephaven MCP, from defining your sessions and systems to setting environment variables and managing browser access.
deephaven_mcp.jsonThis section explains how to configure the Deephaven MCP Systems Server to connect to and manage your Deephaven Community Core instances and Deephaven Enterprise systems. This involves creating a systems session definition file and understanding how the server locates this file.
deephaven_mcp.json FileThis file tells the MCP Systems Server how to connect to your Deephaven instances. You'll create this file to define your connections to either Community Core sessions or Enterprise systems (or both).
File Format: The configuration file supports both standard JSON and JSON5 formats:
// This is a comment/* This is a multi-line comment */The configuration file supports two main sections:
You can include either section, both, or neither (empty file). Each section contains connection details specific to that type of Deephaven system.
🔒 Security Note: For controlling access to session credentials, see the Security Configuration section below.
#### Community Examples
Minimal configuration (no connections):
{}Anonymous authentication (simplest):
{
"community": {
"sessions": {
// No authentication required - use only for local development!
// When auth_type is omitted, defaults to "Anonymous"
"my_local_server": {
"host": "localhost", // Deephaven server address
"port": 10000 // Default Deephaven port (gRPC)
}
}
}
}PSK authentication:
{
"community": {
"sessions": {
"psk_server": {
"host": "localhost",
"port": 10000,
// Pre-Shared Key authentication (most common for production)
// Can use "PSK" shorthand or full class name shown here
"auth_type": "io.deephaven.authentication.psk.PskAuthenticationHandler",
"auth_token": "your-shared-secret-key" // Token configured on server
}
}
}
}Basic authentication with environment variable:
{
"community": {
"sessions": {
"prod_session": {
"host": "deephaven-prod.example.com", // Remote server
"port": 10000,
"auth_type": "Basic", // HTTP Basic authentication
// More secure: read credentials from environment variable
// Set in shell: export DH_AUTH_TOKEN="username:password"
"auth_token_env_var": "DH_AUTH_TOKEN" // Must be in "user:pass" format
}
}
}
}TLS/SSL configuration:
{
"community": {
"sessions": {
"secure_tls_session": {
"host": "secure.deephaven.example.com",
"port": 443, // Standard HTTPS port (use 10000 for non-TLS)
"use_tls": true, // Enable SSL/TLS encryption
// Optional: Custom CA certificate for server verification
"tls_root_certs": "/absolute/path/to/ca.pem", // Must be absolute path!
// Optional: Mutual TLS (mTLS) for client authentication
"client_cert_chain": "/absolute/path/to/client-cert.pem",
"client_private_key": "/absolute/path/to/client-key.pem"
}
}
}
}#### Community Configuration Fields
All community session fields are optional. Default values are applied by the server if a field is omitted.
💡 See Examples Above: For complete configuration examples, refer to Community Examples.
| Field | Type | Required When | Description |
|---|---|---|---|
host | string | Optional | Hostname or IP address of the Deephaven Community Core session (e.g., "localhost") |
port | integer | Optional | Port number for the session connection (e.g., 10000) |
auth_type | string | Optional | Authentication type: "PSK" (shorthand), "Anonymous" (default), "Basic", or full class names like "io.deephaven.authentication.psk.PskAuthenticationHandler" |
auth_token | string | Optional | Authentication token. For "Basic" auth: "username:password" format. Mutually exclusive with auth_token_env_var |
auth_token_env_var | string | Optional | Environment variable name containing the auth token (e.g., "MY_AUTH_TOKEN"). More secure than hardcoding tokens |
never_timeout | boolean | Optional | If true, attempts to configure the session to never time out |
session_type | string | Optional | Type of session to create: "groovy" or "python" |
use_tls | boolean | Optional | Set to true if the connection requires TLS/SSL |
tls_root_certs | string | Optional | Absolute path to PEM file with trusted root CA certificates for TLS verification |
client_cert_chain | string | Optional | Absolute path to PEM file with client's TLS certificate chain (for mTLS) |
client_private_key | string | Optional | Absolute path to PEM file with client's private key (for mTLS) |
#### Community Session Creation Configuration
The session_creation key enables dynamic creation of Deephaven Community Core sessions on-demand. When configured, the MCP tools session_community_create and session_community_delete become available.
Requirements by launch method:
launch_method: "docker"):deephaven-mcp installation (no additional packages needed)launch_method: "python"):deephaven-server installed in a Python environmentpython_venv_path parameter| Field | Type | Required When | Description | |
|---|---|---|---|---|
session_creation | object | Optional | Configuration for creating community sessions. If omitted, session creation tools are unavailable | |
session_creation.max_concurrent_sessions | integer | Optional | Maximum concurrent sessions (default: 5). Set to 0 to disable session creation | |
session_creation.defaults | object | Optional | Default parameters for new sessions | |
session_creation.defaults.launch_method | string | Optional | How to launch sessions: "docker" or "python" (default: "docker") | |
session_creation.defaults.auth_type | string | Optional | Authentication type: "PSK" (default), "Anonymous", or full class name "io.deephaven.authentication.psk.PskAuthenticationHandler". Case-insensitive for shorthand. Basic auth not supported for dynamic sessions | |
session_creation.defaults.auth_token | string | Optional | Pre-shared key for PSK auth. If omitted with PSK auth, a secure token is auto-generated | |
session_creation.defaults.auth_token_env_var | string | Optional | Environment variable containing auth token. Mutually exclusive with auth_token | |
session_creation.defaults.programming_language | string | Optional | Programming language for Docker sessions: "Python" or "Groovy" (default: "Python"). Docker only. Mutually exclusive with docker_image. See examples below. | |
session_creation.defaults.docker_image | string | Optional | Custom Docker image to use. Docker only. Mutually exclusive with programming_language. If neither specified, defaults to Python image. See examples below. | |
session_creation.defaults.docker_memory_limit_gb | float | Optional | Container memory limit in GB (Docker only, default: no limit) | |
session_creation.defaults.docker_cpu_limit | float | Optional | Container CPU limit in cores (Docker only, default: no limit) | |
session_creation.defaults.docker_volumes | array | Optional | Volume mounts in format ["host:container:mode"] (Docker only, default: []) | |
session_creation.defaults.python_venv_path | string | Optional | Path to custom Python venv directory (Python only). If provided, uses deephaven from that venv. If null (default), uses same venv as MCP server. Raises error if used with docker. | |
session_creation.defaults.heap_size_gb | float \ | int | Optional | JVM heap size in gigabytes (e.g., 4 or 2.5, default: 4). Integer values use 'g' suffix (4 → -Xmx4g). Float values converted to MB (2.5 → -Xmx2560m) |
session_creation.defaults.extra_jvm_args | array | Optional | Additional JVM arguments (e.g., ["-XX:+UseG1GC"], default: []) | |
session_creation.defaults.environment_vars | object | Optional | Environment variables as key-value pairs (default: {}) | |
session_creation.defaults.startup_timeout_seconds | float | Optional | Maximum time to wait for session startup (default: 60) | |
session_creation.defaults.startup_check_interval_seconds | float | Optional | Time between health checks during startup (default: 2) | |
session_creation.defaults.startup_retries | integer | Optional | Connection attempts per health check (default: 3) |
Docker Image Configuration Examples:
// CORRECT: Use programming_language for standard Deephaven images
{
"session_creation": {
"defaults": {
"launch_method": "docker",
"programming_language": "Python" // Uses ghcr.io/deephaven/server:latest
}
}
}
// CORRECT: Use programming_language for Groovy
{
"session_creation": {
"defaults": {
"launch_method": "docker",
"programming_language": "Groovy" // Uses ghcr.io/deephaven/server-slim:latest
}
}
}
// CORRECT: Use docker_image for custom images
{
"session_creation": {
"defaults": {
"launch_method": "docker",
"docker_image": "my-custom-deephaven:v1.0" // Uses your custom image
}
}
}
// INCORRECT: Don't use both programming_language and docker_image together
{
"session_creation": {
"defaults": {
"launch_method": "docker",
"programming_language": "Python", // Conflict!
"docker_image": "custom:latest" // Conflict!
}
}
}📝 Session Lifecycle Notes:
>
Automatic Cleanup:
>
- Sessions are automatically stopped and cleaned up when the MCP server shuts down - All ports are released and containers/processes are terminated gracefully - On restart, the MCP server detects and cleans up any orphaned resources from previous runs
>
Session Management:
>
- Auto-generated PSK tokens are logged at WARNING level for visibility (similar to Jupyter notebooks) - Created sessions use session IDs in format:community:dynamic:{session_name}- Only dynamically created sessions can be deleted viasession_community_delete- Static configuration-based sessions cannot be deleted via MCP tools
#### Enterprise Examples
Password authentication (direct):
{
"enterprise": {
"systems": {
// "dev_enterprise_system" is a custom name - use any name you like
"dev_enterprise_system": {
// Enterprise server provides this URL (for envoy on port 8000, and typically ends with /iris/connection.json)
"connection_json_url": "https://dev-enterprise.example.com:8000/iris/connection.json",
"auth_type": "password", // Username/password authentication
"username": "admin",
"password": "your-password-here" // Consider password_env_var for security!
}
}
}
}Password authentication (environment variable):
{
"enterprise": {
"systems": {
"my_enterprise_system": {
"connection_json_url": "https://my-enterprise.example.com:8000/iris/connection.json",
"auth_type": "password",
"username": "admin",
// RECOMMENDED: Read password from environment variable
// Set in shell: export DH_ENTERPRISE_PASSWORD="your-password"
"password_env_var": "DH_ENTERPRISE_PASSWORD"
}
}
}
}Private key authentication:
{
"enterprise": {
"systems": {
"saml_enterprise": {
"connection_json_url": "https://enterprise.example.com:8000/iris/connection.json",
// Private key authentication (commonly used with SAML/SSO setups)
// Your IT/security team provides the private keypair file (Deephaven proprietary format)
// Typically named: priv-<keyname>.base64.txt
"auth_type": "private_key",
"private_key_path": "/absolute/path/to/priv-mykeyname.base64.txt" // Must be absolute!
}
}
}
}#### Enterprise Configuration Fields
The enterprise key contains a "systems" dictionary mapping custom system names to their configuration objects.
💡 See Examples Above: For complete configuration examples, refer to Enterprise Examples.
| Field | Type | Required When | Description | |
|---|---|---|---|---|
connection_json_url | string | Always | URL to the Enterprise server's connection.json file. For standard HTTPS port 443, no port is needed (e.g., "https://enterprise.example.com/iris/connection.json"). For non-standard ports, include the port number explicitly (e.g., "https://enterprise.example.com:8123/iris/connection.json") | |
auth_type | string | Always | Authentication method: "password" for username/password auth, or "private_key" for private key-based auth (e.g., SAML) | |
username | string | auth_type = "password" | Username for authentication | |
password | string | auth_type = "password" | Password (use password_env_var instead for security) | |
password_env_var | string | auth_type = "password" | Environment variable containing the password (recommended) | |
private_key_path | string | auth_type = "private_key" | Absolute path to the Deephaven private keypair file (proprietary format, typically named priv-<keyname>.base64.txt; provided by your IT/security team) | |
connection_timeout | integer \ | float | Optional | Timeout in seconds for establishing connection to Enterprise system (default: 10.0) |
session_creation | object | Optional | Configuration for creating enterprise sessions. If omitted, session creation tools are unavailable | |
session_creation.max_concurrent_sessions | integer | Optional | Maximum concurrent sessions (default: 5). Set to 0 to disable session creation | |
session_creation.defaults | object | Optional | Default parameters for new sessions | |
session_creation.defaults.heap_size_gb | float \ | int | Optional | Default JVM heap size in gigabytes for new sessions (e.g., 4 or 2.5). Enterprise library handles conversion internally |
session_creation.defaults.programming_language | string | Optional | Default programming language for new sessions ("Python" or "Groovy", default: "Python") | |
session_creation.defaults.auto_delete_timeout | integer | Optional | Default auto-deletion timeout in seconds for idle sessions (API default: 600) | |
session_creation.defaults.server | string | Optional | Default target server/environment name where sessions will be created | |
session_creation.defaults.engine | string | Optional | Default engine type for new sessions (e.g., "DeephavenCommunity") | |
session_creation.defaults.extra_jvm_args | array | Optional | Default additional JVM arguments for new sessions (e.g., ["-XX:+UseG1GC"]) | |
session_creation.defaults.extra_environment_vars | array | Optional | Default environment variables for new sessions (format: ["NAME=value"]) | |
session_creation.defaults.admin_groups | array | Optional | Default user groups with administrative permissions for new sessions | |
session_creation.defaults.viewer_groups | array | Optional | Default user groups with read-only access to new sessions | |
session_creation.defaults.timeout_seconds | float | Optional | Default session startup timeout in seconds (API default: 60) | |
session_creation.defaults.session_arguments | object | Optional | Default arguments for pydeephaven.Session constructor (passed as-is, no validation of contents) |
📝 Note: All file paths should be absolute and accessible by the MCP server process.
The top-level security section in deephaven_mcp.json controls security-sensitive features. This section is optional.
#### Community Credential Retrieval
The security.community.credential_retrieval_mode setting controls whether and how the session_community_credentials MCP tool can retrieve authentication credentials programmatically.
🔒 SECURITY WARNING
>
When credential retrieval is enabled, your AI assistant can see and access the authentication tokens. The AI can use these credentials to connect to your Deephaven sessions. The credentials may also be logged by the AI assistant.
>
Only enable credential retrieval modes if you understand these security implications. NEVER enable credential retrieval when the MCP server is accessible over untrusted networks.
| Field | Type | Values | Description |
|---|---|---|---|
security.community.credential_retrieval_mode | string | "none" (default), "dynamic_only", "static_only", "all" | Controls credential retrieval access |
Mode Descriptions:
session_community_createcommunity.sessionsExample Configuration:
{
"security": {
"community": {
"credential_retrieval_mode": "dynamic_only"
}
},
"community": {
"sessions": {
"local": {
"host": "localhost",
"port": 10000
}
}
}
}Here's a complete example showing both Community and Enterprise configurations:
{
/* ====================================
* Community Core Session Configurations
* ==================================== */
"community": {
"sessions": {
// Local development - no authentication
"my_local_deephaven": {
"host": "localhost",
"port": 10000,
"session_type": "python" // "python" or "groovy" - sets query language
},
// Staging environment - PSK authentication
"psk_authenticated_session": {
"host": "localhost",
"port": 10001,
"auth_type": "io.deephaven.authentication.psk.PskAuthenticationHandler",
"auth_token": "your-shared-secret-key",
"session_type": "python"
},
// Production - Basic auth with TLS
"basic_auth_session": {
"host": "secure.deephaven.example.com",
"port": 10002,
"auth_type": "Basic",
"auth_token": "username:password", // Better: use auth_token_env_var!
"use_tls": true,
"tls_root_certs": "/path/to/community_root.crt" // Absolute path
}
},
/* Dynamic session creation configuration
* Enables on-demand session creation via MCP tools */
"session_creation": {
"max_concurrent_sessions": 5, // Maximum number of concurrent dynamic sessions
"defaults": {
"launch_method": "docker", // "docker" or "python"
"auth_type": "PSK", // Auto-generate PSK tokens for security
"docker_image": "ghcr.io/deephaven/server:latest", // Docker image to use
"docker_memory_limit_gb": null, // null = no limit, or specify GB (e.g., 8.0)
"docker_cpu_limit": null, // null = no limit, or specify cores (e.g., 2.0)
"docker_volumes": [], // Empty = no mounts, or add paths like ["/data:/data"]
"heap_size_gb": 4.0, // JVM heap size (4GB works for most cases)
"extra_jvm_args": [], // Custom JVM flags if needed
"environment_vars": {}, // Custom environment variables
"startup_timeout_seconds": 60, // How long to wait for session to start
"startup_check_interval_seconds": 2, // How often to check if ready
"startup_retries": 3 // Number of restart attempts on failure
}
}
},
/* ====================================
* Enterprise System Configurations
* ==================================== */
"enterprise": {
"systems": {
// "prod_cluster" is a custom name - use whatever makes sense for your setup
"prod_cluster": {
"connection_json_url": "https://prod.enterprise.example.com/iris/connection.json",
"auth_type": "password",
"username": "your_username",
"password_env_var": "ENTERPRISE_PASSWORD", // Read from environment (secure)
// Enable dynamic Enterprise session creation
"session_creation": {
"max_concurrent_sessions": 3, // Lower limit for production stability
"defaults": {
"heap_size_gb": 8.0, // Larger heap for production workloads
"programming_language": "Groovy", // "Python" or "Groovy"
"auto_delete_timeout": 3600, // Auto-delete idle sessions after 1 hour
"server": "gpu-server-1", // Target specific Enterprise server/node
"engine": "DeephavenCommunity", // Engine type (check with your admin)
// Performance tuning: G1GC with 200ms pause target
"extra_jvm_args": ["-XX:+UseG1GC", "-XX:MaxGCPauseMillis=200"],
// Custom environment for your workflows (format: "KEY=value")
"extra_environment_vars": ["PYTHONPATH=/custom/libs", "LOG_LEVEL=DEBUG"],
// Access control: Who can admin vs view the session
"admin_groups": ["deephaven-admins", "data-team-leads"],
"viewer_groups": ["analysts", "data-scientists"],
"timeout_seconds": 120.0, // Wait up to 2 minutes for session startup
// Custom args passed to pydeephaven.Session (advanced)
"session_arguments": {"custom_setting": "example_value"}
}
}
},
// Separate data science environment - private key auth (SAML)
"data_science_env": {
"connection_json_url": "https://data-science.enterprise.example.com/iris/connection.json",
"auth_type": "private_key",
"private_key_path": "/path/to/priv-mykeyname.base64.txt" // Proprietary keypair file from your IT team
}
}
}
}⚠️ Security Warning: The deephaven_mcp.json file can contain sensitive information such as authentication tokens, usernames, and passwords. Ensure that this file is protected with appropriate filesystem permissions to prevent unauthorized access.>
For example, on Unix-like systems (Linux, macOS), you can restrict permissions to the owner only:
>
``bash chmod 600 /path/to/your/deephaven_mcp.json ``DH_MCP_CONFIG_FILEThe DH_MCP_CONFIG_FILE environment variable tells the Deephaven MCP Systems Server where to find your deephaven_mcp.json file (detailed in The deephaven_mcp.json File). You will set this environment variable as part of the server launch configuration within your LLM tool, as detailed in the Setup Instructions by Tool section.
When launched by an LLM tool, the MCP Systems Server process reads this variable to load your session definitions. For general troubleshooting or if you need to set other environment variables like PYTHONLOGLEVEL (e.g., to DEBUG for verbose logs), these are also typically set within the LLM tool's MCP server configuration (see Setup Instructions by Tool).
⚠️ Security Warning: Environment variables containing sensitive information like API keys and authentication tokens should be handled securely and never committed to version control.
For the full reference of all supported environment variables — including credential variables, timeout tuning, and Docs Server configuration — see [docs/ENV.md](docs/ENV.md).
The variables needed to get started are:
deephaven_mcp.json configuration fileDH_MCP_CONFIG_FILE=/path/to/your/deephaven_mcp.jsonDEBUG, INFO, WARNING, ERRORINFOPYTHONLOGLEVEL=DEBUGdeephaven_mcp.json configuration's auth_token_env_var field will be used to source authentication tokens"auth_token_env_var": "MY_AUTH_TOKEN", then MY_AUTH_TOKEN=username:passwordWhen you create a Deephaven session via the MCP tools, you may want to access it through a web browser. By default, authentication credentials are not returned through MCP tools for security.
When a session is created with an auto-generated token, the connection information is logged to your console:
====================================================================
🔑 Session 'my-analysis' Created - Browser Access Information:
Port: 45123
Base URL: http://localhost:45123
Auth Token: abc123xyz789...
Browser URL: http://localhost:45123/?psk=abc123xyz789
To retrieve credentials via MCP tool, set security.community.credential_retrieval_mode
in your deephaven_mcp.json configuration.
====================================================================You can copy this URL directly into your browser.
If you want AI agents to retrieve credentials programmatically, you can enable the session_community_credentials tool in your configuration:
{
"security": {
"community": {
"credential_retrieval_mode": "dynamic_only"
}
},
"community": {
"session_creation": {
"defaults": {
"launch_method": "docker",
"heap_size_gb": 4
}
}
}
}Valid `credential_retrieval_mode` values:
Ask your AI assistant: "Get me the browser URL for session 'my-analysis'"
The AI will use session_community_credentials to retrieve the authenticated URL.
🔒 SECURITY WARNING
>
This tool exposes sensitive credentials. Only enable credential retrieval if the MCP server is running locally and you understand the security implications. NEVER enable when accessible over untrusted networks.
After creating or modifying your MCP configuration, you must restart your IDE or AI assistant for the changes to take effect.
#### Restart and Verify
deephaven-systems and deephaven-docs listed Are the Deephaven MCP servers working? Can you list any available sessions?Your AI assistant should connect to both servers and respond with information about Deephaven capabilities and available sessions.
If the servers don't appear or you encounter errors, see the Troubleshooting section.
This section explains how to connect Deephaven to your AI assistant or IDE. While the goal is the same -— pointing your tool to the Deephaven MCP servers -— the specific configuration steps vary for each tool.
All AI tools that support MCP use the same core configuration format: a JSON object called "mcpServers". This object defines how to launch the Deephaven MCP servers.
The `mcpServers` object is always the same - what differs between tools is only where this object goes in their configuration file:
| Tool | Configuration Structure |
|---|---|
| Windsurf, Cursor, Claude Desktop | The mcpServers object is the root of the JSON file. |
| VS Code | The mcpServers object goes inside a "servers" key |
Here's the standard mcpServers configuration for Deephaven. It works for both uv and pip installations.
Note: you will not start these mcpServers directly. When configuration is supplied to your AI Tool, the servers will be started via that tool.
⚙️ Important: All paths in the following examples must be absolute paths. Replace /full/path/to/your/ with the correct absolute path to your project directory (where the venv was setup)."mcpServers": {
"deephaven-systems": {
"command": "/full/path/to/your/.venv/bin/dh-mcp-systems-server",
"args": [],
"env": {
"DH_MCP_CONFIG_FILE": "/full/path/to/your/deephaven_mcp.json",
"PYTHONLOGLEVEL": "INFO"
}
},
"deephaven-docs": {
"command": "/full/path/to/your/.venv/bin/mcp-proxy",
"args": [
"--transport=streamablehttp",
"https://deephaven-mcp-docs-prod.dhc-demo.deephaven.io/mcp"
]
}
}📝 Note: Change"PYTHONLOGLEVEL": "INFO"to"PYTHONLOGLEVEL": "DEBUG"for detailed server logs (see Troubleshooting).
The Deephaven MCP Docs Server natively supports streaming HTTP connections and can be accessed directly by AI agents without requiring the mcp-proxy tool. This provides optimal performance with lower latency and reduced overhead compared to the proxy-based approach.
How It Works:
https://deephaven-mcp-docs-prod.dhc-demo.deephaven.io/mcpWhen to Use Direct HTTP:
When to Use Proxy-Based Approach:
⚠️ Note: Each tool uses different configuration schemas for direct HTTP servers. The examples below show tool-specific formats.
For Windsurf IDE:
"deephaven-docs": {
"serverUrl": "https://deephaven-mcp-docs-prod.dhc-demo.deephaven.io/mcp",
"disabled": false
}For VS Code:
"deephaven-docs": {
"type": "http",
"url": "https://deephaven-mcp-docs-prod.dhc-demo.deephaven.io/mcp"
}For more details on HTTP server configuration, see the Windsurf MCP documentation and VS Code HTTP servers guide.
📝 Note: Claude Desktop and Cursor currently require the proxy-based approach shown in the standard configuration above.
The following sections provide specific integration steps for each supported IDE and AI assistant platform, covering the required configuration and file locations.
Open Claude Desktop → Settings → Developer → Edit Config to configure your MCP servers:
{
"mcpServers": {
"deephaven-systems": {
"command": "/full/path/to/your/.venv/bin/dh-mcp-systems-server",
"args": [],
"env": {
"DH_MCP_CONFIG_FILE": "/full/path/to/your/deephaven_mcp.json",
"PYTHONLOGLEVEL": "INFO"
}
},
"deephaven-docs": {
"command": "/full/path/to/your/.venv/bin/mcp-proxy",
"args": [
"--transport=streamablehttp",
"https://deephaven-mcp-docs-prod.dhc-demo.deephaven.io/mcp"
]
}
}
}Additional Resources:
Create or edit an MCP configuration file:
.cursor/mcp.json in your project root~/.cursor/mcp.json for all projects{
"mcpServers": {
"deephaven-systems": {
"command": "/full/path/to/your/.venv/bin/dh-mcp-systems-server",
"args": [],
"env": {
"DH_MCP_CONFIG_FILE": "/full/path/to/your/deephaven_mcp.json",
"PYTHONLOGLEVEL": "INFO"
}
},
"deephaven-docs": {
"command": "/full/path/to/your/.venv/bin/mcp-proxy",
"args": [
"--transport=streamablehttp",
"https://deephaven-mcp-docs-prod.dhc-demo.deephaven.io/mcp"
]
}
}
}Additional Resources:
To add MCP servers to your workspace, run the MCP: Add Server command from the Command Palette (Cmd-Shift-P), then select Workspace Settings to create the .vscode/mcp.json file. Alternatively, create .vscode/mcp.json manually in your project root.
Configure your servers:
{
"servers": {
"deephaven-systems": {
"command": "/full/path/to/your/.venv/bin/dh-mcp-systems-server",
"args": [],
"env": {
"DH_MCP_CONFIG_FILE": "/full/path/to/your/deephaven_mcp.json",
"PYTHONLOGLEVEL": "INFO"
}
},
"deephaven-docs": {
"command": "/full/path/to/your/.venv/bin/mcp-proxy",
"args": [
"--transport=streamablehttp",
"https://deephaven-mcp-docs-prod.dhc-demo.deephaven.io/mcp"
]
}
}
}You will see the mcp servers listed in the Extensions sidebar under "MCP Servers". (Collapse the sections for extensions to install to have the mcp servers easily visible.)
Additional Resources:
Go to Windsurf Settings > Cascade > MCP Servers > Manage MCPs > View Raw Config to open ~/.codeium/windsurf/mcp_config.json for editing.
Configure the file with your Deephaven servers:
{
"mcpServers": {
"deephaven-systems": {
"command": "/full/path/to/your/.venv/bin/dh-mcp-systems-server",
"args": [],
"env": {
"DH_MCP_CONFIG_FILE": "/full/path/to/your/deephaven_mcp.json",
"PYTHONLOGLEVEL": "INFO"
}
},
"deephaven-docs": {
"command": "/full/path/to/your/.venv/bin/mcp-proxy",
"args": [
"--transport=streamablehttp",
"https://deephaven-mcp-docs-prod.dhc-demo.deephaven.io/mcp"
]
}
}
}Additional Resources:
This section provides comprehensive guidance for diagnosing and resolving common issues with Deephaven MCP setup and operation. Issues are organized by category, starting with the most frequently encountered problems.
Before diving into detailed troubleshooting, try these common solutions:
| Error | Where You'll See This | Solution |
|---|---|---|
spawn uv ENOENT | IDE/AI assistant logs | Use full path to uv |
Connection failed | MCP server logs | Check internet connection and server URLs |
Config not found | MCP server startup | Verify full path to deephaven_mcp.json |
Permission denied | Command execution | Ensure uv executable has proper permissions |
Python version error | Virtual environment | Verify supported Python version is installed and accessible |
JSON parse error | IDE/AI assistant logs | Fix JSON syntax errors in configuration files |
Module not found: deephaven_mcp | MCP server logs | Ensure virtual environment is activated and dependencies installed |
Invalid session_id format | MCP tool responses | Use format: {type}:{source}:{session_name} |
Most configuration problems stem from JSON syntax errors or incorrect paths:
/ even on Windows in JSONDH_MCP_CONFIG_FILE must point to valid deephaven_mcp.json fileenv block must use correct namesDH_MCP_CONFIG_FILE environment variable is correctly set in the JSON config and points to a valid deephaven_mcp.json filedeephaven_mcp.json) are running and accessible from the MCP Systems Server's environmentmcpServers object in the LLM tool, and deephaven_mcp.json) using a JSON validator tool or your IDE's linting featuresPYTHONLOGLEVEL=DEBUG in the env block of your JSON config to get more detailed logs from the MCP serversmcp-proxy's target URL (https://deephaven-mcp-docs-prod.dhc-demo.deephaven.io) if using the Docs Server.ping) or curl from the relevant machine) if connections are failing.uv is installed and its installation directory is in your system's PATH environment variable, accessible by the LLM tool.command field in your JSON config uses the correct absolute path to the executable within your .venv/bin/ (or .venv\Scripts\) directory.Module not found errors, command not found for installed packagesuv pip install -e ".[dev]" in your virtual environmentpython --version find . -name "*.pyc" -deleteuv is installed and pyproject.toml is properly configureduv is in your system's PATH environment variableuv commands from the project root directorydeephaven_mcp.json file syntax and content - see Community Configuration or Enterprise Configuration{type}:{source}:{session_name}community:local_dev:my_session, enterprise:staging:analytics/ in JSON file paths, even on Windows.venv\Scripts\ instead of .venv/bin/chmod +x /path/to/executableufw status or iptables -LLog File Locations:
~/Library/Logs/Claude/mcp-server-*.logWhat to Look For in Logs:
Enabling Debug Logging:
Set PYTHONLOGLEVEL=DEBUG in your MCP server configuration's env block for detailed logging:
{
"mcpServers": {
"deephaven-systems": {
"command": "/path/to/dh-mcp-systems-server",
"env": {
"DH_MCP_CONFIG_FILE": "/path/to/deephaven_mcp.json",
"PYTH~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.