Skip to content

Environment Variables

Complete reference for F5XC API MCP Server environment variables.

Quick Setup

For step-by-step authentication setup, see the Authentication Guide.

Variable Reference

Variable Required Description
F5XC_API_URL For auth Tenant URL (auto-normalized)
F5XC_API_TOKEN Token auth API token from XC Console
F5XC_P12_BUNDLE Cert auth Absolute path to P12 certificate bundle
F5XC_P12_PASSWORD Cert auth Password for P12 certificate
F5XC_CERT Cert auth Absolute path to PEM certificate file
F5XC_KEY Cert auth Absolute path to PEM private key file
F5XC_PROFILE No Profile name from ~/.config/f5xc/profiles/
LOG_LEVEL No Logging level: debug, info, warn, error
NODE_ENV No Node environment: development, production

Authentication Variables

F5XC_API_URL

The F5 Distributed Cloud tenant URL. Multiple formats accepted (auto-normalized).

export F5XC_API_URL="https://your-tenant.console.ves.volterra.io"

URL Normalization

See Authentication Guide for accepted URL formats.

F5XC_API_TOKEN

API token from F5XC Console. Required for token-based authentication.

export F5XC_API_TOKEN="your-api-token"

Security

Never commit API tokens to version control.

F5XC_P12_BUNDLE

Absolute path to P12 certificate bundle. Required for P12-based certificate authentication.

export F5XC_P12_BUNDLE="/path/to/certificate.p12"

Absolute Paths Required

Must be an absolute path, not relative.

F5XC_CERT

Absolute path to PEM-formatted certificate file. Use with F5XC_KEY for PEM-based certificate authentication.

export F5XC_CERT="/path/to/certificate.pem"

Alternative to P12

Use F5XC_CERT + F5XC_KEY as an alternative to P12 bundle authentication.

F5XC_KEY

Absolute path to PEM-formatted private key file. Required when using F5XC_CERT.

export F5XC_KEY="/path/to/private-key.pem"

F5XC_P12_PASSWORD

Password for the P12 certificate.

export F5XC_P12_PASSWORD="certificate-password"

F5XC_PROFILE

Select a profile from ~/.config/f5xc/profiles/ for multi-tenant credential management.

export F5XC_PROFILE="staging"

Profile-Based Configuration

Profiles are optional. Use the f5xc-api-configure-auth MCP tool to set up profiles.

See Authentication Guide for details.


Configuration Variables

LOG_LEVEL

Controls logging verbosity. Logs go to stderr to avoid interfering with MCP protocol.

export LOG_LEVEL="info"
Level Description
debug Verbose debugging information
info General operational information (default)
warn Warning messages
error Error messages only

NODE_ENV

Node.js environment setting.

export NODE_ENV="production"
Value Behavior
development Additional debug output
production Optimized for production (default)

Setting Variables

Shell (Temporary)

export F5XC_API_URL="https://tenant.console.ves.volterra.io"
export F5XC_API_TOKEN="your-token"
npx f5xc-api-mcp

Shell Profile (Persistent)

Add to ~/.zshrc, ~/.bashrc, or equivalent:

export F5XC_API_URL="https://tenant.console.ves.volterra.io"
export F5XC_API_TOKEN="your-token"

.env File

Create .env in your project:

F5XC_API_URL=https://tenant.console.ves.volterra.io
F5XC_API_TOKEN=your-token
LOG_LEVEL=info

Security

Add .env to .gitignore to prevent committing credentials.

MCP Configuration

Set in env block:

{
  "mcpServers": {
    "f5xc-api": {
      "command": "npx",
      "args": ["f5xc-api-mcp"],
      "env": {
        "F5XC_API_URL": "https://tenant.console.ves.volterra.io",
        "F5XC_API_TOKEN": "your-token"
      }
    }
  }
}

Docker

Pass with -e flags:

docker run -it \
  -e F5XC_API_URL="https://tenant.console.ves.volterra.io" \
  -e F5XC_API_TOKEN="your-token" \
  ghcr.io/robinmordasiewicz/f5xc-api-mcp

Or with env file:

docker run -it --env-file .env ghcr.io/robinmordasiewicz/f5xc-api-mcp

Authentication Priority

When multiple authentication sources are configured:

  1. Environment Variables (highest priority) - F5XC_API_URL, F5XC_API_TOKEN, etc.
  2. Environment variables override all other sources
  3. Profile-Based Configuration - F5XC_PROFILE selection from ~/.config/f5xc/profiles/
  4. Selected by F5XC_PROFILE env var or active profile
  5. Supports multiple credentials for different tenants
  6. No Authentication (lowest priority) - Documentation mode
  7. Returns API documentation without executing operations

Profile Setup

Use the f5xc-api-configure-auth MCP tool through your AI assistant to set up profiles.


Validation

Check Settings

env | grep F5XC

Verify in Server

Ask Claude:

"Get the F5XC API server info"

Check for authenticated: true and correct authMethod.


Next Steps