Skip to content

trillboards/dooh-agent-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOOH Agent Example

Complete working examples of building a DOOH (Digital Out-of-Home) advertising agent using Trillboards APIs.

Install the MCP Server

The Trillboards DOOH MCP server is available through multiple registries:

Registry Link
Smithery smithery.ai/servers/trillboards/dooh-advertising
MCP Registry registry.modelcontextprotocol.io
Direct (Streamable HTTP) https://api.trillboards.com/mcp

Claude Desktop / Cursor / Windsurf

Add to your MCP config:

{
  "mcpServers": {
    "trillboards-dooh": {
      "url": "https://api.trillboards.com/mcp"
    }
  }
}

Smithery CLI

npx @smithery/cli install trillboards/dooh-advertising

Quick Start

npm install

# Demo mode — no API key needed
node mcp-agent.js --demo

# Full flow with API key
export TRILLBOARDS_API_KEY=trb_partner_xxxxx
node mcp-agent.js

Two Integration Paths

MCP (Model Context Protocol) — Recommended for AI Agents

node mcp-agent.js

Connects to the Trillboards MCP server at https://api.trillboards.com/mcp/ and uses structured tool calling for pricing discovery, inventory browsing, audience analysis, and billing.

REST API — Direct HTTP

node rest-agent.js

Same flow using standard HTTPS requests. Useful as a fallback or for non-MCP environments.

Agent Lifecycle

┌─────────────────┐
│  1. Get Pricing  │  No auth needed
│  get_pricing     │  → pricing, free tiers, billing URLs
└────────┬────────┘
         │
┌────────▼────────┐
│  2. Register     │  No auth needed
│  agent/register  │  → API key, sandbox screens
└────────┬────────┘
         │
┌────────▼─────────────┐
│  3. Use Free Tier     │  API key auth
│  discover_inventory   │  → screens, audience data
│  get_live_audience    │
│  get_audience_forecast│
└────────┬─────────────┘
         │  Free tier exhausted → 402
┌────────▼────────┐
│  4. Set Up       │  API key auth
│  Billing         │  setup_billing → active billing
│                  │  purchase_credits → volume discounts
└────────┬────────┘
         │
┌────────▼────────┐
│  5. Pay-Per-Use  │  Metered usage, monthly invoicing
│  Full API Access │
└─────────────────┘

Available MCP Tools

Tool Auth Description
get_pricing No Machine-readable pricing for all products
discover_inventory Yes Find available ad slots and screens
get_live_audience Yes Real-time audience data for a screen
get_audience_forecast Yes Predict audience for a screen/time
get_usage_summary Yes Current billing period usage
get_billing_status Yes Billing setup status and credit balance
setup_billing Yes Attach Stripe payment method
purchase_credits Yes Buy credits at volume discounts

Full tool list →

Getting an API Key

Option A: Self-service registration (recommended for agents)

curl -X POST https://api.trillboards.com/v1/partner/agent/register \
  -H "Content-Type: application/json" \
  -d '{"agent_type":"developer","name":"My Agent","email":"you@example.com"}'

Option B: Via MCP — The agent can register itself using the register_partner tool.

Billing

Trillboards uses usage-based pricing with generous free tiers:

  • Data API: 10,000 free calls/month
  • Proof-of-Play: 50,000 free proofs/month

When free tier is exhausted, API returns 402 Payment Required with pricing details and billing setup URL.

Resources

License

MIT

About

Complete example: build a DOOH advertising agent using Trillboards MCP server and REST APIs. Free tier, 38 tools, real-time audience signals.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors