Configuration

Configuration

Environment variables, config file, and business policy seed reference.

This document lists all configuration options for the Meta Business MCP platform. All config values can be overridden with environment variables.

Config File (config.yaml)

Place config.yaml in the project root for local development:

config.yaml
server:
  http_port: 8080
  mcp_name: "meta-business-mcp"
  mcp_version: "1.0.0"
 
database:
  host: "localhost"
  port: 5432
  user: "postgres"
  password: "password"
  dbname: "meta_mcp"
  sslmode: "disable"
 
redis:
  addr: "localhost:6379"
 
nats:
  url: "nats://localhost:4222"
 
meta:
  api_url: "http://localhost:8081"   # Use mock server for offline dev
  phone_number_id: "mock-phone-id"
  waba_id: "mock-waba-id"
  access_token: "mock-access-token"
  webhook_verify_token: "mock-verify-token"
 
policies_path: "policies.yaml"
tier: "oss"                          # oss | pro | enterprise

Environment Variables

All config values can be overridden with environment variables.

Server

VariableDefaultRequiredDescription
SERVER_HTTP_PORT8080HTTP server port
SERVER_MCP_NAME"meta-business-mcp"MCP server identifier
SERVER_MCP_VERSION"1.0.0"MCP server version string
TIER"oss"Feature tier: oss, pro, or enterprise
SCHEDULER_POLL_INTERVAL"30s"Scheduler polling interval for scheduled messages/campaigns

Database

VariableDefaultRequiredDescription
DB_HOST"localhost"PostgreSQL host
DB_PORT5432PostgreSQL port
DB_USER"postgres"PostgreSQL username
DB_PASSWORD"password"PostgreSQL password
DB_NAME"meta_mcp"PostgreSQL database name
DB_SSLMODE"disable"disable, require, or verify-ca

Redis

VariableDefaultRequiredDescription
REDIS_ADDR"localhost:6379"Redis connection address
REDIS_PASSWORD""Redis auth password
REDIS_DB0Redis database index

NATS

VariableDefaultRequiredDescription
NATS_URL"nats://localhost:4222"NATS connection URL

Meta Cloud API

VariableDefaultRequiredDescription
META_API_URL"https://graph.facebook.com"Meta Graph API base URL
META_ACCESS_TOKENREQUIREDMeta API OAuth token (system user)
META_PHONE_NUMBER_IDREQUIREDWhatsApp Business Phone Number ID
META_WABA_IDREQUIREDWhatsApp Business Account ID
META_WEBHOOK_VERIFY_TOKENREQUIREDMeta webhook verification passphrase

Application

VariableDefaultRequiredDescription
POLICIES_PATH"policies.yaml"Path to the business policy seed YAML file
⚠️

For local development, the mock server at http://localhost:8081 is used by default — no real Meta API keys are required.

Quick Config Examples

Local Development (OSS)

.env.local
SERVER_HTTP_PORT=8080
TIER=oss
DB_HOST=localhost
DB_PASSWORD=password
REDIS_ADDR=localhost:6379
NATS_URL=nats://localhost:4222
META_API_URL=http://localhost:8081
META_ACCESS_TOKEN=mock-token
META_PHONE_NUMBER_ID=mock-phone-id
META_WABA_ID=mock-waba-id
META_WEBHOOK_VERIFY_TOKEN=mock-verify-token

Production (Pro)

.env.production
SERVER_HTTP_PORT=8080
TIER=pro
DB_HOST=postgres.prod.internal
DB_PASSWORD=<secure-password>
DB_SSLMODE=require
REDIS_ADDR=redis.prod.internal:6379
REDIS_PASSWORD=<redis-password>
NATS_URL=nats://nats.prod.internal:4222
META_API_URL=https://graph.facebook.com
META_ACCESS_TOKEN=EAAG...your-token...
META_PHONE_NUMBER_ID=106555123456789
META_WABA_ID=204555123456789
META_WEBHOOK_VERIFY_TOKEN=<webhook-secret>

Business Policies (policies.yaml)

Business policies are seeded from policies.yaml on startup and stored in the policies table. The seed script is idempotent (ON CONFLICT DO UPDATE), so restarting the app is sufficient to apply changes.

policies.yaml
- id: "no_marketing_after_8pm"
  name: "No marketing after 8pm"
  type: "time_restriction"
  channel: "whatsapp"
  message_type: "marketing"
  is_enabled: true
  rules:
    deny_after: "20:00"
    timezone: "Asia/Jakarta"

Feature Tiers

TierPriceWABAsMessagesFeatures
OSSFree1200/dayCompliance engine, basic messaging, read-only intelligence
Pro$89/moUp to 5UnlimitedFull MCP tool suite, campaign management, scheduling, dashboard
Enterprise$499/moUnlimitedUnlimitedDedicated infrastructure, SSO, custom policies, SLA

Campaign operations (schedule_campaign, cancel_campaign, pause_campaign) are gated behind the Pro tier.