Files
ajarbot/.env.example
Jordan Ramos bb86a9eef5 Add Cloudflare and Loki MCP server integrations
Features:
- Cloudflare Code Mode MCP: Exposes entire Cloudflare API (2,500+ endpoints)
  via remote MCP server at https://mcp.cloudflare.com/mcp
  * Two tools: search() to query OpenAPI spec, execute() to run JS code
  * Uses npx mcp-remote as stdio bridge
  * Auth via CLOUDFLARE_API_TOKEN as Bearer header

- Loki MCP Server: Log querying and analysis via Loki HTTP API
  * Query logs with LogQL syntax
  * Real-time log streaming support
  * Label introspection and metrics queries
  * Configurable via LOKI_URL environment variable

Technical changes:
- Created mcp_servers/cloudflare/ with config and connection logic
- Created mcp_servers/loki/ with HTTP client and MCP tool wrappers
- Added promtail-config-optimized.yaml for syslog ingestion config
- Updated .env.example with Cloudflare and Loki configuration templates

Both integrations:
- Use environment variables for configuration (no hardcoded credentials)
- Include feature flags (CLOUDFLARE_MCP_ENABLED, LOKI_MCP_ENABLED)
- Follow existing MCP server patterns for consistency

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-24 12:35:04 -07:00

129 lines
4.4 KiB
Plaintext

# ========================================
# Ajarbot Environment Configuration
# ========================================
# Copy this file to .env and configure for your setup
# ========================================
# LLM Configuration
# ========================================
# LLM Mode - Choose how to access Claude
# Options:
# - "agent-sdk" (default) - Use Claude Pro subscription via Agent SDK
# - "api" - Use pay-per-token API (requires ANTHROPIC_API_KEY)
#
# Agent SDK mode pros: Unlimited usage within Pro limits, no API key needed
# API mode pros: Works in any environment, predictable costs, better for production
AJARBOT_LLM_MODE=agent-sdk
# Anthropic API Key - ONLY required for "api" mode
# Get your key from: https://console.anthropic.com/settings/keys
# For agent-sdk mode, authenticate with: claude auth login
ANTHROPIC_API_KEY=your-api-key-here
# ========================================
# Messaging Platform Adapters
# ========================================
# Adapter credentials can also be stored in config/adapters.local.yaml
# Slack
# Get tokens from: https://api.slack.com/apps
AJARBOT_SLACK_BOT_TOKEN=xoxb-your-bot-token
AJARBOT_SLACK_APP_TOKEN=xapp-your-app-token
# Telegram
# Get token from: https://t.me/BotFather
AJARBOT_TELEGRAM_BOT_TOKEN=123456:ABC-your-bot-token
# ========================================
# SSH Access (Optional)
# ========================================
# Proxmox SSH credentials for remote management
PROXMOX_SSH_HOST=192.168.2.100
PROXMOX_SSH_USER=root
PROXMOX_SSH_PORT=22
# Authentication: Use EITHER password OR key (key is more secure)
# Option 1: Password-based (easier but less secure)
PROXMOX_SSH_PASSWORD=your-proxmox-password
# Option 2: Key-based (recommended for security)
# PROXMOX_SSH_KEY_FILE=C:/Users/YourName/.ssh/id_rsa
# Generate key: ssh-keygen -t rsa -b 4096
# Copy to Proxmox: ssh-copy-id root@192.168.2.100
# ========================================
# Cloudflare MCP Integration (Optional)
# ========================================
# Cloudflare Code Mode MCP server exposes the entire Cloudflare API
# See: mcp_servers/cloudflare/config.py for details
# Enable/disable Cloudflare MCP integration
CLOUDFLARE_MCP_ENABLED=false
# Cloudflare API Token (create at https://dash.cloudflare.com/profile/api-tokens)
CLOUDFLARE_API_TOKEN=your-cloudflare-api-token-here
# Cloudflare MCP remote server URL (default: https://mcp.cloudflare.com/mcp)
# CLOUDFLARE_MCP_URL=https://mcp.cloudflare.com/mcp
# ========================================
# Loki MCP Integration (Optional)
# ========================================
# Loki MCP server provides log querying and analysis via Loki HTTP API
# See: mcp_servers/loki/config.py for details
# Enable/disable Loki MCP integration
LOKI_MCP_ENABLED=false
# Loki instance URL (via reverse proxy)
LOKI_URL=https://loki.apophisnetworking.net
# Request timeout in seconds (default: 30)
# LOKI_TIMEOUT=30
# Default number of log lines to return (default: 100)
# LOKI_DEFAULT_LIMIT=100
# ========================================
# Obsidian MCP Integration (Optional)
# ========================================
# Obsidian MCP server provides advanced vault operations via Obsidian REST API
# See: OBSIDIAN_MCP_INTEGRATION.md for setup instructions
# Enable/disable Obsidian MCP integration
OBSIDIAN_MCP_ENABLED=false
# Obsidian Local REST API Key
# Install "Local REST API" plugin in Obsidian first, then generate key in settings
OBSIDIAN_API_KEY=your-obsidian-api-key-here
# Obsidian REST API endpoint (default: http://127.0.0.1:27123)
OBSIDIAN_BASE_URL=http://127.0.0.1:27123
# Path to your main Obsidian vault (overrides config/obsidian_mcp.yaml)
# OBSIDIAN_VAULT_PATH=C:/Users/YourName/Documents/MyVault
# Tool routing strategy (optional, overrides config/obsidian_mcp.yaml)
# Options: obsidian_preferred, custom_preferred, obsidian_only
# OBSIDIAN_ROUTING_STRATEGY=obsidian_preferred
# ========================================
# Alternative LLM Providers (Optional)
# ========================================
# GLM (z.ai) - Optional alternative to Claude
# GLM_API_KEY=your-glm-key-here
# ========================================
# Legacy/Deprecated Settings
# ========================================
# The following settings are deprecated and no longer needed:
#
# USE_CLAUDE_CODE_SERVER=true
# CLAUDE_CODE_SERVER_URL=http://localhost:8000
# USE_AGENT_SDK=true
# USE_DIRECT_API=true
#
# Use AJARBOT_LLM_MODE instead (see above)