|
1 | | -# TelemetryFlow Python MCP Server - Environment Variables Example |
| 1 | +# TelemetryFlow Python MCP Server Environment Variables |
2 | 2 | # Copy this file to .env and fill in your values |
3 | 3 |
|
4 | | -# Required: Anthropic API Key |
5 | | -ANTHROPIC_API_KEY=your-api-key-here |
| 4 | +# ============================================================================= |
| 5 | +# CLAUDE API (Required) |
| 6 | +# ============================================================================= |
| 7 | +# Your Anthropic API key |
| 8 | +ANTHROPIC_API_KEY=your-anthropic-api-key-here |
6 | 9 |
|
7 | | -# Optional: Server Configuration |
8 | | -TELEMETRYFLOW_MCP_SERVER_DEBUG=false |
9 | | -TELEMETRYFLOW_MCP_LOG_LEVEL=info |
| 10 | +# Alternative environment variable name (both are supported) |
| 11 | +# TELEMETRYFLOW_MCP_CLAUDE_API_KEY=your-api-key-here |
10 | 12 |
|
11 | | -# Optional: Claude Configuration |
12 | | -TELEMETRYFLOW_MCP_CLAUDE_DEFAULT_MODEL=claude-sonnet-4-20250514 |
13 | | -TELEMETRYFLOW_MCP_CLAUDE_MAX_TOKENS=4096 |
14 | | -TELEMETRYFLOW_MCP_CLAUDE_TEMPERATURE=1.0 |
| 13 | +# Claude API base URL (optional, defaults to https://api.anthropic.com) |
| 14 | +# TELEMETRYFLOW_MCP_CLAUDE_BASE_URL=https://api.anthropic.com |
15 | 15 |
|
16 | | -# Optional: MCP Configuration |
17 | | -TELEMETRYFLOW_MCP_MCP_ENABLE_TOOLS=true |
18 | | -TELEMETRYFLOW_MCP_MCP_ENABLE_RESOURCES=true |
19 | | -TELEMETRYFLOW_MCP_MCP_ENABLE_PROMPTS=true |
| 16 | +# Default model to use (optional) |
| 17 | +# TELEMETRYFLOW_MCP_CLAUDE_DEFAULT_MODEL=claude-sonnet-4-20250514 |
20 | 18 |
|
21 | | -# Optional: Database (for full deployment) |
22 | | -POSTGRES_PASSWORD=your-postgres-password |
23 | | -CLICKHOUSE_PASSWORD=your-clickhouse-password |
| 19 | +# ============================================================================= |
| 20 | +# TELEMETRYFLOW OBSERVABILITY (TELEMETRYFLOW SDK) |
| 21 | +# ============================================================================= |
| 22 | +# Your TelemetryFlow API key for observability (logs, metrics, traces) |
| 23 | +# Option 1: Single API key (Python SDK compatibility) |
| 24 | +TELEMETRYFLOW_API_KEY=your-telemetryflow-api-key-here |
24 | 25 |
|
25 | | -# Optional: TelemetryFlow SDK Configuration |
26 | | -# Enable telemetry to send metrics, logs, and traces to TelemetryFlow platform |
27 | | -TELEMETRYFLOW_ENABLED=false |
| 26 | +# Option 2: Split API key ID and secret (Python SDK native) |
| 27 | +# TELEMETRYFLOW_API_KEY_ID=tfk_your-key-id-here |
| 28 | +# TELEMETRYFLOW_API_KEY_SECRET=tfs_your-key-secret-here |
28 | 29 |
|
29 | | -# TelemetryFlow API Credentials (required if telemetry is enabled) |
30 | | -TELEMETRYFLOW_API_KEY_ID=tfk_your-key-id-here |
31 | | -TELEMETRYFLOW_API_KEY_SECRET=tfs_your-key-secret-here |
| 30 | +# TelemetryFlow API endpoint (default: api.telemetryflow.id:4317) |
| 31 | +TELEMETRYFLOW_ENDPOINT=localhost:4317 |
32 | 32 |
|
33 | | -# TelemetryFlow Service Configuration |
| 33 | +# Service identification |
34 | 34 | TELEMETRYFLOW_SERVICE_NAME=telemetryflow-mcp |
35 | 35 | TELEMETRYFLOW_SERVICE_VERSION=1.1.2 |
36 | 36 | TELEMETRYFLOW_SERVICE_NAMESPACE=telemetryflow |
| 37 | + |
| 38 | +# Environment (development, staging, production) |
37 | 39 | TELEMETRYFLOW_ENVIRONMENT=development |
38 | 40 |
|
39 | | -# TelemetryFlow Connection Settings |
40 | | -TELEMETRYFLOW_ENDPOINT=api.telemetryflow.id:4317 |
| 41 | +# ============================================================================= |
| 42 | +# SERVER CONFIGURATION |
| 43 | +# ============================================================================= |
| 44 | +# Server host (default: localhost) |
| 45 | +TELEMETRYFLOW_MCP_SERVER_HOST=localhost |
| 46 | + |
| 47 | +# Server port (default: 8080) |
| 48 | +TELEMETRYFLOW_MCP_SERVER_PORT=8080 |
| 49 | + |
| 50 | +# Transport type: stdio, sse, websocket (default: stdio) |
| 51 | +TELEMETRYFLOW_MCP_SERVER_TRANSPORT=stdio |
| 52 | + |
| 53 | +# Debug mode (default: false) |
| 54 | +TELEMETRYFLOW_MCP_DEBUG=false |
| 55 | + |
| 56 | +# ============================================================================= |
| 57 | +# LOGGING |
| 58 | +# ============================================================================= |
| 59 | +# Log level: debug, info, warn, error (default: info) |
| 60 | +TELEMETRYFLOW_MCP_LOG_LEVEL=info |
| 61 | + |
| 62 | +# Log format: json, text (default: json) |
| 63 | +TELEMETRYFLOW_MCP_LOG_FORMAT=json |
| 64 | + |
| 65 | +# ============================================================================= |
| 66 | +# MCP PROTOCOL CONFIGURATION |
| 67 | +# ============================================================================= |
| 68 | +# Enable tools capability (default: true) |
| 69 | +TELEMETRYFLOW_MCP_ENABLE_TOOLS=true |
| 70 | + |
| 71 | +# Enable resources capability (default: true) |
| 72 | +TELEMETRYFLOW_MCP_ENABLE_RESOURCES=true |
| 73 | + |
| 74 | +# Enable prompts capability (default: true) |
| 75 | +TELEMETRYFLOW_MCP_ENABLE_PROMPTS=true |
| 76 | + |
| 77 | +# ============================================================================= |
| 78 | +# REDIS (Caching & Queue) |
| 79 | +# ============================================================================= |
| 80 | +# Redis connection URL |
| 81 | +TELEMETRYFLOW_MCP_REDIS_URL=redis://localhost:6379 |
| 82 | + |
| 83 | +# Enable caching (default: true) |
| 84 | +TELEMETRYFLOW_MCP_CACHE_ENABLED=true |
| 85 | + |
| 86 | +# Cache TTL in seconds (default: 300) |
| 87 | +TELEMETRYFLOW_MCP_CACHE_TTL=300 |
| 88 | + |
| 89 | +# Enable queue processing (default: true) |
| 90 | +TELEMETRYFLOW_MCP_QUEUE_ENABLED=true |
| 91 | + |
| 92 | +# Queue concurrency (default: 5) |
| 93 | +TELEMETRYFLOW_MCP_QUEUE_CONCURRENCY=5 |
| 94 | + |
| 95 | +# ============================================================================= |
| 96 | +# DATABASE (PostgreSQL) |
| 97 | +# ============================================================================= |
| 98 | +# PostgreSQL connection URL |
| 99 | +TELEMETRYFLOW_MCP_POSTGRES_URL=postgres://postgres:postgres@localhost:5432/telemetryflow_mcp?sslmode=disable |
| 100 | + |
| 101 | +# Connection pool settings |
| 102 | +TELEMETRYFLOW_MCP_POSTGRES_MAX_CONNS=25 |
| 103 | +TELEMETRYFLOW_MCP_POSTGRES_MIN_CONNS=5 |
| 104 | + |
| 105 | +# ============================================================================= |
| 106 | +# ANALYTICS DATABASE (ClickHouse) |
| 107 | +# ============================================================================= |
| 108 | +# ClickHouse connection URL |
| 109 | +TELEMETRYFLOW_MCP_CLICKHOUSE_URL=clickhouse://localhost:9000/telemetryflow_mcp |
| 110 | + |
| 111 | +# ============================================================================= |
| 112 | +# TELEMETRY CONFIGURATION |
| 113 | +# ============================================================================= |
| 114 | +# Enable telemetry (default: true) |
| 115 | +TELEMETRYFLOW_MCP_TELEMETRY_ENABLED=true |
| 116 | + |
| 117 | +# Telemetry backend: telemetryflow, otel (default: telemetryflow) |
| 118 | +# Uses TelemetryFlow SDK as the primary telemetry backend |
| 119 | +TELEMETRYFLOW_MCP_TELEMETRY_BACKEND=telemetryflow |
| 120 | + |
| 121 | +# ============================================================================= |
| 122 | +# OPENTELEMETRY COMPATIBILITY (Optional - for legacy OTEL integration) |
| 123 | +# ============================================================================= |
| 124 | +# Note: TelemetryFlow SDK is the primary telemetry backend. |
| 125 | +# These settings are only used when TELEMETRY_BACKEND=otel or for OTEL export. |
| 126 | + |
| 127 | +# OTLP endpoint for traces/metrics (used by TelemetryFlow SDK for OTEL export) |
| 128 | +TELEMETRYFLOW_MCP_OTLP_ENDPOINT=localhost:4317 |
| 129 | + |
| 130 | +# Service name (standard OTEL env var, used alongside TelemetryFlow SDK) |
| 131 | +TELEMETRYFLOW_MCP_SERVICE_NAME=telemetryflow-mcp |
| 132 | + |
| 133 | + |
| 134 | +# ============================================================================= |
| 135 | +# TELEMETRYFLOW SDK ADVANCED SETTINGS |
| 136 | +# ============================================================================= |
| 137 | +# Protocol (grpc, http) |
41 | 138 | TELEMETRYFLOW_PROTOCOL=grpc |
| 139 | + |
| 140 | +# Use insecure connection (default: false) |
42 | 141 | TELEMETRYFLOW_INSECURE=false |
| 142 | + |
| 143 | +# Request timeout in seconds |
43 | 144 | TELEMETRYFLOW_TIMEOUT=30 |
| 145 | + |
| 146 | +# Enable compression (default: true) |
44 | 147 | TELEMETRYFLOW_COMPRESSION=true |
45 | 148 |
|
46 | | -# TelemetryFlow Signal Configuration |
| 149 | +# Signal configuration |
47 | 150 | TELEMETRYFLOW_ENABLE_TRACES=true |
48 | 151 | TELEMETRYFLOW_ENABLE_METRICS=true |
49 | 152 | TELEMETRYFLOW_ENABLE_LOGS=true |
50 | 153 | TELEMETRYFLOW_ENABLE_EXEMPLARS=true |
| 154 | + |
| 155 | +# Batch settings |
| 156 | +TELEMETRYFLOW_BATCH_TIMEOUT_MS=5000 |
| 157 | +TELEMETRYFLOW_BATCH_MAX_SIZE=512 |
| 158 | + |
| 159 | +# Retry settings |
| 160 | +TELEMETRYFLOW_RETRY_ENABLED=true |
| 161 | +TELEMETRYFLOW_MAX_RETRIES=3 |
| 162 | +TELEMETRYFLOW_RETRY_BACKOFF_MS=500 |
| 163 | + |
| 164 | +# Rate limiting |
| 165 | +TELEMETRYFLOW_RATE_LIMIT=1000 |
| 166 | + |
| 167 | +# ============================================================================= |
| 168 | +# SECURITY |
| 169 | +# ============================================================================= |
| 170 | +# Require API key for requests |
| 171 | +# TELEMETRYFLOW_MCP_SECURITY_REQUIRE_API_KEY=false |
| 172 | + |
| 173 | +# Rate limit per minute |
| 174 | +# TELEMETRYFLOW_MCP_SECURITY_RATE_LIMIT_PER_MINUTE=100 |
| 175 | + |
| 176 | +# ============================================================================= |
| 177 | +# DOCKER COMPOSE SPECIFIC |
| 178 | +# ============================================================================= |
| 179 | +# MCP Server version |
| 180 | +TELEMETRYFLOW_MCP_VERSION=1.1.2 |
| 181 | + |
| 182 | +# Database ports (for docker-compose) |
| 183 | +REDIS_PORT=6379 |
| 184 | +POSTGRES_PORT=5432 |
| 185 | +POSTGRES_USER=postgres |
| 186 | +POSTGRES_PASSWORD=postgres |
| 187 | +POSTGRES_DB=telemetryflow_mcp |
| 188 | +CLICKHOUSE_HTTP_PORT=8123 |
| 189 | +CLICKHOUSE_NATIVE_PORT=9000 |
| 190 | +CLICKHOUSE_DB=telemetryflow_mcp |
| 191 | +CLICKHOUSE_USER=default |
| 192 | +CLICKHOUSE_PASSWORD= |
| 193 | + |
| 194 | +# Message Queue (NATS) |
| 195 | +NATS_PORT=4222 |
| 196 | +NATS_MONITOR_PORT=8222 |
| 197 | + |
| 198 | +# Observability ports (for docker-compose with observability profile) |
| 199 | +OTEL_GRPC_PORT=4317 |
| 200 | +OTEL_HTTP_PORT=4318 |
| 201 | +JAEGER_UI_PORT=16686 |
| 202 | +PROMETHEUS_PORT=9090 |
| 203 | +GRAFANA_PORT=3000 |
| 204 | +GRAFANA_ADMIN_USER=admin |
| 205 | +GRAFANA_ADMIN_PASSWORD=admin |
0 commit comments