VOOZH about

URL: https://mcp.so/server/agent-broker/basilalshukaili

โ‡ฑ Agent Broker MCP Server


Agent Broker

@basilalshukaili

MCP server for AI agents to interact with SMBs โ€” book appointments, send messages, find businesses. 13 tools. Compliance pre-check (TCPA, GDPR, CASL). Channel fallback: Cal.com โ†’ voice โ†’ SMS โ†’ email โ†’ web form.
Overview

SMB Transaction & Communication Broker

An agent-callable service that lets autonomous AI agents discover, verify, communicate with, schedule with, and transact with the long tail of small and mid-sized businesses (SMBs) โ€” through a single compliance-aware tool surface.

๐Ÿ‘ Tests
๐Ÿ‘ License
๐Ÿ‘ Python
๐Ÿ‘ Edge


Why this exists

There are ~60 million long-tail small businesses in the US โ€” barbers, plumbers, accountants, home cleaners โ€” and they have no API surface. AI agents that need to schedule a haircut, get a quote on a roof repair, or send a transactional confirmation today have to either: (a) drive a browser, (b) cold-call by voice, or (c) give up.

This service is the missing layer. Agents call us; we route to the right SMB through whichever channel reaches them fastest โ€” Cal.com โ†’ SMS โ†’ voice AI โ†’ email โ†’ web form fallback โ€” with full TCPA / GDPR / CASL / 10DLC / two-party recording-consent compliance enforced as a non-bypassable gate.

What you can do with it

13 operations, all callable via REST, MCP, OpenAI tools, Anthropic tools, or A2A protocol:

OperationWhat it doesCostLatency
find_businessSearch SMBs by vertical + location + capability$0.01<2s
verify_businessConfirm an SMB has the capability you need$0.01<2s
send_messageSMS / email / voice with full compliance pre-check$0.05<5s
capture_leadHand a prospect to an SMB with dedup$0.02<2s
schedule_appointmentBook / reschedule / cancel โ€” direct API โ†’ voice fallback$0.15 base + $0.85 success premium<5s sync, async otherwise
send_transactional_confirmationTCPA-exempt confirmations (booking, receipt)$0.04<5s
handle_inboundClassify customer messages (booking / cancel / opt-out / question)$0.03<5s
escalate_to_humanHand off to a human when an agent is stuck$0.10 base + $0.40 success premiumasync
get_statusPoll status of an async operation$0.001<1s
get_outcomeRetrieve final outcome of an async operation$0.001<1s
preview_costEstimate cost / latency / success probability โ€” free$0.00<500ms
self_testService health check โ€” free$0.00<2s
import_booking_urlParse any Cal.com / Calendly / Doctolib / Booksy / OpenTable / 7 more URLs into a bookable SMB$0.01<2s

Quick start (for AI agents)

Option 1: MCP (Claude Desktop, Cursor, Continue, etc.)

// Add to your MCP client config
{
 "mcpServers": {
 "agent-broker": {
 "url": "https://agent-broker-edge.basil-agent.workers.dev/mcp",
 "headers": { "X-Agent-Identity": "$AGENT_BROKER_TOKEN" }
 }
 }
}

Option 2: OpenAI function calling

import httpx, openai
tools = httpx.get("https://agent-broker-edge.basil-agent.workers.dev/.well-known/openai-tools.json").json()["tools"]
client = openai.OpenAI()
resp = client.chat.completions.create(
 model="gpt-4",
 messages=[{"role":"user","content":"Book me a haircut in Atlanta for Saturday under $50"}],
 tools=tools,
)

Option 3: Anthropic tool use

import httpx, anthropic
tools = httpx.get("https://agent-broker-edge.basil-agent.workers.dev/.well-known/anthropic-tools.json").json()["tools"]
client = anthropic.Anthropic()
msg = client.messages.create(
 model="claude-opus-4-5",
 max_tokens=1024,
 tools=tools,
 messages=[{"role":"user","content":"Book me a haircut in Atlanta for Saturday under $50"}],
)

Option 4: Plain REST

curl -X POST https://agent-broker-edge.basil-agent.workers.dev/ops/find_business \
 -H "X-Agent-Identity: $TOKEN" \
 -H "Content-Type: application/json" \
 -d '{
 "vertical": "personal_services",
 "location": {"zip_or_city": "30309"},
 "capability": "haircut"
 }'

Discovery surfaces

We're discoverable through every protocol agents currently use:

ProtocolURL
MCPhttps://agent-broker-edge.basil-agent.workers.dev/mcp
MCP descriptorhttps://agent-broker-edge.basil-agent.workers.dev/.well-known/mcp.json
OpenAI ChatGPT pluginhttps://agent-broker-edge.basil-agent.workers.dev/.well-known/ai-plugin.json
OpenAI function toolshttps://agent-broker-edge.basil-agent.workers.dev/.well-known/openai-tools.json
Anthropic tool_usehttps://agent-broker-edge.basil-agent.workers.dev/.well-known/anthropic-tools.json
A2A (Agent-to-Agent)https://agent-broker-edge.basil-agent.workers.dev/.well-known/agents.json
llms.txthttps://agent-broker-edge.basil-agent.workers.dev/llms.txt
OpenAPI 3.1https://agent-broker-edge.basil-agent.workers.dev/openapi.yaml
Capability manifesthttps://agent-broker-edge.basil-agent.workers.dev/manifest
Service discovery cardhttps://agent-broker-edge.basil-agent.workers.dev/.well-known/agent-service

Why agents pick us (measured, not assumed)

From our agent-simulation harness โ€” 168 trials ร— 3 personas (cost / quality / latency) across 56 tasks, with noisy agent perception (ยฑ15% on price, ยฑ10% on quality, ยฑ20% on latency):

PersonaSelection rateSuccess when selectedWinRate
cost_minimizer94.6%88.7%0.839
quality_maximizer91.1%88.2%0.804
latency_sensitive91.7%88.3%0.810
Aggregate92.5%88.4%0.818

We deliberately included tasks where we should lose โ€” out-of-region SMBs (Tokyo / Mumbai / Berlin), complex web automation, trivial lookups โ€” and the simulation correctly routes those to competitors. See BENCHMARKS.md.

Compliance posture

Every outbound communication passes through compliance/pre_check():

  1. Content classification (gambling / lending / cannabis / adult / spam) โ€” blocks restricted categories.
  2. Opt-out check โ€” TCPA STOP keyword, GDPR right-to-be-forgotten, CASL.
  3. Consent check for marketing โ€” TCPA written consent, GDPR opt-in, CASL implied/express.
  4. 10DLC campaign-registry check for US SMS.
  5. Two-party recording consent for CA / FL / IL / MD / MA / MT / NV / NH / PA / WA.
  6. Audit log entry (PII stored as SHA-256 hash, never plaintext).

Compliance violations surface as ComplianceViolationError โ†’ compliance_violation API error. Never silently dropped, never bypassed by middleware.

Architecture

AI agent โ†’ Cloudflare Worker edge (agent-broker-edge.basil-agent.workers.dev)
 โ”œโ”€โ”€ Discovery + MCP read โ†’ embedded snapshots 40โ€“70 ms
 โ””โ”€โ”€ tools/call + /ops/* โ†’ proxy to origin 170โ€“190 ms
 โ†“
 Python FastAPI on Render (smb-broker.onrender.com)
 Cron */2 keeps Render warm โ€” cold starts eliminated

The Python service exposes 13 operations over REST + MCP + .well-known surfaces. Each handler validates input with Pydantic models, runs through compliance/pre_check, executes via channel-fallback (direct_api โ†’ voice_ai โ†’ sms โ†’ email โ†’ web_form), and writes an immutable OutcomeReceipt to the outcome store. Async operations return pending_async. Idempotency is keyed by (agent_id, operation, idempotency_key) with 24h TTL.

Full architecture: docs/architecture.md ยท Edge layer: edge/README.md

Repo layout

service-root/
โ”œโ”€โ”€ core/ # 12 operation handlers + shared Pydantic models
โ”œโ”€โ”€ channels/ # Twilio, SendGrid, Vapi, Bland, Cal.com, Playwright
โ”œโ”€โ”€ compliance/ # pre_check, jurisdiction_rules, consent_store, audit_log
โ”œโ”€โ”€ reliability/ # retry, circuit_breaker, channel_fallback, async_runner
โ”œโ”€โ”€ billing/ # meter, budget_guard, receipt_signer, pricing_tiers
โ”œโ”€โ”€ telemetry/ # tracer, log_redactor, metrics_emitter
โ”œโ”€โ”€ storage/ # outcome_store, idempotency_store
โ”œโ”€โ”€ supply/ # smb_directory (20+ seed SMBs)
โ”œโ”€โ”€ onboarding/ # self_serve, verification_flow, channel_capture
โ”œโ”€โ”€ feedback/ # failure_classifier, attribution_engine, outcome_evaluator
โ”œโ”€โ”€ optimizer/ # ab_router, selection_analytics, weekly_report
โ”œโ”€โ”€ agent_interface/ # manifest_server, mcp_server, well_known, identity, webhooks, self_test
โ”œโ”€โ”€ manifest/ # manifest.json, mcp_tools.json, openapi.yaml
โ”œโ”€โ”€ api/ # errors.md, identity.md, async.md
โ”œโ”€โ”€ docs/ # mission, architecture, compliance, ADRs
โ”œโ”€โ”€ deploy/ # Dockerfile, docker-compose.yml, .ci/
โ”œโ”€โ”€ tests/ # unit, contract, compliance, fault_injection, agent_sim
โ”œโ”€โ”€ reports/ # agent_sim_report.json, weekly winrate reports
โ”œโ”€โ”€ main.py # FastAPI entry point
โ”œโ”€โ”€ config.py # Centralized config from env
โ””โ”€โ”€ requirements.txt

Local development

# 1. Clone & install
pip install -r requirements.txt
# 2. Run the test suite
python -m pytest tests/ -q
# 3. Run the agent simulation
python -m tests.agent_sim.harness
# 4. Run the self-test
python -c "import asyncio; from agent_interface.self_test import run_self_test; print(asyncio.run(run_self_test()).all_passed)"
# 5. Start the API
python main.py
# โ†’ http://localhost:8000/docs (Swagger)
# โ†’ http://localhost:8000/manifest
# โ†’ http://localhost:8000/mcp

Or with Docker:

docker compose -f deploy/docker-compose.yml up

Documentation index

  • Mission โ€” north-star metric, scope, who we are NOT
  • Architecture โ€” module map, data flow, fallback chains
  • Compliance โ€” full jurisdiction matrix, pre-check sequence
  • API errors โ€” 16 error codes with retry semantics
  • API identity โ€” Agent-Identity JWT spec
  • API async โ€” execution profiles, polling rules, webhook contract
  • Agent integration guide โ€” copy-paste examples for every protocol
  • Benchmarks โ€” measured WinRate, latency, cost vs alternatives
  • Pricing โ€” 5 revenue streams with year-1 / year-2 forecasts
  • Security โ€” production hardening checklist
  • Release notes v0.1
  • Next steps โ€” current priorities (edge live; bottleneck is distribution)
  • ADRs โ€” architecture decision records

License

Proprietary. Contact for licensing terms.

Server Config

{
 "mcpServers": {
 "agent-broker": {
 "url": "https://agent-broker-edge.basil-agent.workers.dev/mcp"
 }
 }
}
ยฉ 2025 MCP.so. All rights reserved.

Build with ShipAny.