# MCP Gateway Configuration - Category-Based Loading
#
# Load specific capability categories instead of everything.
# This keeps context lean and costs low.
#
# Usage: mcp-gateway --config examples/config-bundles.yaml

server:
  host: "127.0.0.1"
  port: 39401
  request_timeout: 30s
  shutdown_timeout: 5s

capabilities:
  enabled: true
  name: my-gateway  # Your gateway name (appears in gateway_list_servers)

  # Load capabilities from directories:
  directories:
    # Option 1: Point to your capability YAML files
    - ${CAPABILITIES_PATH:-./capabilities}

    # Option 2: Organize by category
    # - ${CAPABILITIES_PATH:-./capabilities}/google    # Gmail, Calendar, Drive
    # - ${CAPABILITIES_PATH:-./capabilities}/search    # Brave, Exa
    # - ${CAPABILITIES_PATH:-./capabilities}/llm       # LLM providers

# Add MCP server backends here (if you also want to proxy MCP servers)
backends: {}

# =============================================================================
# How Capabilities Work
# =============================================================================
#
# Each .yaml file in your capabilities directory defines a REST API tool:
#
#   name: weather
#   description: Get current weather for a location
#   auth:
#     type: api_key
#     key: env:WEATHER_API_KEY
#   rest:
#     base_url: https://api.weather.com
#     path: /v1/current
#     method: GET
#     params:
#       lat: "{latitude}"
#       lon: "{longitude}"
#   input:
#     type: object
#     properties:
#       latitude: { type: number, description: Latitude }
#       longitude: { type: number, description: Longitude }
#
# The gateway:
# 1. Loads YAML definitions
# 2. Exposes them via Meta-MCP (gateway_list_tools, gateway_invoke)
# 3. Injects credentials at runtime (never stored in definitions)
# 4. Hot-reloads when files change
#
# Credential sources:
#   - env:VAR_NAME     - Environment variable
#   - keychain:name    - macOS Keychain entry
#   - oauth:provider   - OAuth token from vault
#
# Auto-generate from OpenAPI:
#   mcp-gateway convert openapi --input api.yaml --output capabilities/
