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:
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 | enterpriseEnvironment Variables
All config values can be overridden with environment variables.
Server
| Variable | Default | Required | Description |
|---|---|---|---|
SERVER_HTTP_PORT | 8080 | — | HTTP 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
| Variable | Default | Required | Description |
|---|---|---|---|
DB_HOST | "localhost" | — | PostgreSQL host |
DB_PORT | 5432 | — | PostgreSQL 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
| Variable | Default | Required | Description |
|---|---|---|---|
REDIS_ADDR | "localhost:6379" | — | Redis connection address |
REDIS_PASSWORD | "" | — | Redis auth password |
REDIS_DB | 0 | — | Redis database index |
NATS
| Variable | Default | Required | Description |
|---|---|---|---|
NATS_URL | "nats://localhost:4222" | — | NATS connection URL |
Meta Cloud API
| Variable | Default | Required | Description |
|---|---|---|---|
META_API_URL | "https://graph.facebook.com" | — | Meta Graph API base URL |
META_ACCESS_TOKEN | — | REQUIRED | Meta API OAuth token (system user) |
META_PHONE_NUMBER_ID | — | REQUIRED | WhatsApp Business Phone Number ID |
META_WABA_ID | — | REQUIRED | WhatsApp Business Account ID |
META_WEBHOOK_VERIFY_TOKEN | — | REQUIRED | Meta webhook verification passphrase |
Application
| Variable | Default | Required | Description |
|---|---|---|---|
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)
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-tokenProduction (Pro)
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.
- 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
| Tier | Price | WABAs | Messages | Features |
|---|---|---|---|---|
| OSS | Free | 1 | 200/day | Compliance engine, basic messaging, read-only intelligence |
| Pro | $89/mo | Up to 5 | Unlimited | Full MCP tool suite, campaign management, scheduling, dashboard |
| Enterprise | $499/mo | Unlimited | Unlimited | Dedicated infrastructure, SSO, custom policies, SLA |
Campaign operations (schedule_campaign, cancel_campaign, pause_campaign) are gated behind the Pro tier.