Setting up the SeaLights MCP server

Running the Sealights MCP server

The MCP SeaLights Server can be run in various ways depending on your deployment needs. Below are comprehensive examples for different scenarios.

{
  "mcpServers": {
    "mcp-sealights": {
      "command": "uv",
      "args": [
        "run",
        "main.py",
        "--transport", "stdio"
      ],
      "cwd": "/path/to/SL.Sealights.MCP",
      "env": {
        "SEALIGHTS_DOMAIN": "app.sealights.io",
        "SEALIGHTS_API_TOKEN": "your_api_token_here",
        "SEALIGHTS_AGENT_TOKEN": "your_agent_token_here",
        "SEALIGHTS_LOG_LEVEL": "INFO"
      }
    }
  }
}

or

Using --env-file Flag

{
  "mcpServers": {
    "mcp-sealights": {
      "command": "uv",
      "args": [
        "run",
        "main.py",
        "--env-file", "/path/to/sealights.env",
        "--transport", "stdio"
      ],
      "cwd": "/path/to/SL.Sealights.MCP"
    }
  }
}

Method 2: Using Docker

docker run -it --rm \
  -e SEALIGHTS_DOMAIN=app.sealights.io \
  -e SEALIGHTS_API_TOKEN=your_api_token_here \
  -e SEALIGHTS_AGENT_TOKEN=your_agent_token_here \
  -p 8000:8000 \
  sealights/sealights-mcp

in your MCP Client configuration, you can specify the server URL as follows:

{
  "mcpServers": {
     "mcp-sealights": {
            "type": "sse",
            "url": "http://localhost:8000/sse"
     }
  }
}

Environment Variables

The MCP SeaLights Server can be configured using the following environment variables. You can copy .env.example to .env and configure the values according to your setup.

Core SeaLights Settings

Variable
Required
Default
Description

SEALIGHTS_DOMAIN

Yes

-

SeaLights domain (e.g., app.sealights.io, your-company.sealights.io)

SEALIGHTS_API_TOKEN

Yes

-

SeaLights API token for authentication

SEALIGHTS_AGENT_TOKEN

No

-

SeaLights Agent token for agent-based operations

HTTP Client Settings

Variable
Required
Default
Description

SEALIGHTS_CONNECTION_TIMEOUT

No

30.0

HTTP connection timeout in seconds

SEALIGHTS_READ_TIMEOUT

No

60.0

HTTP read timeout in seconds

SEALIGHTS_MAX_CONNECTIONS

No

100

Maximum number of HTTP connections

SEALIGHTS_SSL_VERIFY

No

true

Verify SSL certificates (true/false)

Proxy Settings (Optional)

Variable
Required
Default
Description

SEALIGHTS_PROXY_URL

No

-

Proxy server URL (e.g., http://proxy.company.com:8080)

SEALIGHTS_PROXY_AUTH_USERNAME

No

-

Proxy authentication username

SEALIGHTS_PROXY_AUTH_PASSWORD

No

-

Proxy authentication password

Logging Settings

Variable
Required
Default
Description

SEALIGHTS_LOG_LEVEL

No

WARNING

Log level (DEBUG, INFO, WARNING, ERROR)

MCP_VERBOSE

No

false

Enable verbose MCP logging (true/false/1/0/yes/no)

Tool Categories

Control which tool categories are enabled. All are enabled by default.

Variable
Required
Default
Description

SEALIGHTS_ENABLE_COCKPIT_TOOLS

No

true

Enable Cockpit tools (dashboard, metrics, etc.)

SEALIGHTS_ENABLE_COVERAGE_TOOLS

No

true

Enable Coverage tools (test coverage analysis)

SEALIGHTS_ENABLE_REPORTS_TOOLS

No

true

Enable Reports tools (test reports, analytics)

SEALIGHTS_ENABLE_OPTIMIZATION_TOOLS

No

true

Enable Test Optimization tools (test selection, prioritization)

SEALIGHTS_ENABLE_WORKFLOWS_TOOLS

No

true

Enable Common Workflows tools (CI/CD integrations)

SEALIGHTS_ENABLE_EXECUTIONS_TOOLS

No

true

Enable Executions tools (test execution management)

Operational Settings

Variable
Required
Default
Description

READ_ONLY_MODE

No

false

Run in read-only mode (disables all write operations)

Example Configuration

Create a .env file in your project root with the following content:

# Core SeaLights Settings
SEALIGHTS_DOMAIN=app.sealights.io
SEALIGHTS_API_TOKEN=your_api_token_here
SEALIGHTS_AGENT_TOKEN=your_agent_token_here

# HTTP Client Settings (optional - defaults shown)
SEALIGHTS_CONNECTION_TIMEOUT=30.0
SEALIGHTS_READ_TIMEOUT=60.0
SEALIGHTS_MAX_CONNECTIONS=100
SEALIGHTS_SSL_VERIFY=true

# Logging (optional)
SEALIGHTS_LOG_LEVEL=INFO
MCP_VERBOSE=false

# All tool categories are enabled by default
# Uncomment to disable specific categories:
# SEALIGHTS_ENABLE_COCKPIT_TOOLS=false
# SEALIGHTS_ENABLE_COVERAGE_TOOLS=false
# SEALIGHTS_ENABLE_REPORTS_TOOLS=false
# SEALIGHTS_ENABLE_OPTIMIZATION_TOOLS=false
# SEALIGHTS_ENABLE_WORKFLOWS_TOOLS=false
# SEALIGHTS_ENABLE_EXECUTIONS_TOOLS=false

# Operational settings
READ_ONLY_MODE=false

Command-Line Options

The MCP SeaLights Server supports comprehensive command-line configuration. You can run the server with various options to override environment variables or configure specific behaviors.

Usage

# Basic usage
python3 main.py

# With specific options
python3 main.py --domain app.sealights.io --api-token YOUR_TOKEN --verbose

# Show all available options
python3 main.py --help

Core Authentication Options

Flag
Environment Variable
Type
Default
Description

--domain

SEALIGHTS_DOMAIN

String

-

SeaLights domain (e.g., app.sealights.io, your-company.sealights.io)

--api-token

SEALIGHTS_API_TOKEN

String

-

SeaLights API token for authentication

--agent-token

SEALIGHTS_AGENT_TOKEN

String

-

SeaLights Agent token for agent-based operations

Server Configuration Options

Flag
Environment Variable
Type
Default
Description

--env-file

-

Path

.env

Path to environment file to load

--transport

-

Choice

sse

Transport type: stdio or sse

--port

-

Integer

8000

Port to listen on for SSE transport

--read-only

READ_ONLY_MODE

Flag

false

Run in read-only mode (disables all write operations)

HTTP Client Options

Flag
Environment Variable
Type
Default
Description

--connection-timeout

SEALIGHTS_CONNECTION_TIMEOUT

Float

30.0

HTTP connection timeout in seconds

--read-timeout

SEALIGHTS_READ_TIMEOUT

Float

60.0

HTTP read timeout in seconds

--max-connections

SEALIGHTS_MAX_CONNECTIONS

Integer

100

Maximum number of HTTP connections

--ssl-verify / --no-ssl-verify

SEALIGHTS_SSL_VERIFY

Flag

--ssl-verify

Enable/disable SSL certificate verification

Proxy Configuration Options

Flag
Environment Variable
Type
Default
Description

--proxy-url

SEALIGHTS_PROXY_URL

String

-

Proxy URL (e.g., http://proxy.company.com:8080)

--proxy-username

SEALIGHTS_PROXY_AUTH_USERNAME

String

-

Proxy authentication username

--proxy-password

SEALIGHTS_PROXY_AUTH_PASSWORD

String

-

Proxy authentication password

Logging Options

Flag
Environment Variable
Type
Default
Description

-v / --verbose

SEALIGHTS_LOG_LEVEL

Count

0

Increase verbosity (can be used multiple times) 0 = WARNING, 1 = INFO, 2+ = DEBUG

Tool Category Options

Control which tool categories are enabled. All categories are enabled by default.

Flag
Environment Variable
Type
Default
Description

--enable-cockpit-tools / --disable-cockpit-tools

SEALIGHTS_ENABLE_COCKPIT_TOOLS

Flag

--enable-cockpit-tools

Enable/disable Cockpit tools (dashboard, metrics, etc.)

--enable-coverage-tools / --disable-coverage-tools

SEALIGHTS_ENABLE_COVERAGE_TOOLS

Flag

--enable-coverage-tools

Enable/disable Coverage tools (test coverage analysis)

--enable-reports-tools / --disable-reports-tools

SEALIGHTS_ENABLE_REPORTS_TOOLS

Flag

--enable-reports-tools

Enable/disable Reports tools (test reports, analytics)

--enable-optimization-tools / --disable-optimization-tools

SEALIGHTS_ENABLE_OPTIMIZATION_TOOLS

Flag

--enable-optimization-tools

Enable/disable Test Optimization tools (test selection, prioritization)

--enable-workflows-tools / --disable-workflows-tools

SEALIGHTS_ENABLE_WORKFLOWS_TOOLS

Flag

--enable-workflows-tools

Enable/disable Common Workflows tools (CI/CD integrations)

--enable-executions-tools / --disable-executions-tools

SEALIGHTS_ENABLE_EXECUTIONS_TOOLS

Flag

--enable-executions-tools

Enable/disable Executions tools (test execution management)

Example Commands

# Start with basic configuration
python3 main.py --domain app.sealights.io --api-token your_token_here

# Start with verbose logging
python3 main.py --domain app.sealights.io --api-token your_token_here -vv

# Start with SSE transport on custom port
python3 main.py --transport sse --port 9000 --domain app.sealights.io --api-token your_token_here

# Start with proxy configuration
python3 main.py \
  --domain app.sealights.io \
  --api-token your_token_here \
  --proxy-url http://proxy.company.com:8080 \
  --proxy-username proxy_user \
  --proxy-password proxy_pass

# Start with specific tool categories disabled
python3 main.py \
  --domain app.sealights.io \
  --api-token your_token_here \
  --disable-optimization-tools \
  --disable-workflows-tools

# Start in read-only mode with custom timeouts
python3 main.py \
  --domain app.sealights.io \
  --api-token your_token_here \
  --read-only \
  --connection-timeout 60.0 \
  --read-timeout 120.0

# Load configuration from custom env file
python3 main.py --env-file /path/to/custom/.env

# Disable SSL verification (for development/testing)
python3 main.py \
  --domain dev.sealights.io \
  --api-token your_token_here \
  --no-ssl-verify

Configuration Precedence

Configuration values are applied in the following order (later values override earlier ones):

  1. Default values (built into the application)

  2. Environment variables (from .env file or system environment)

  3. Command-line arguments (highest precedence)

This means you can set defaults in your .env file and override specific values using command-line flags as needed.

Last updated

Was this helpful?