Integrations & MCP

Everything AI Insights & People shows in its UI — the timeline, profiles, check-ins, and report snapshots — is available programmatically through MCP (Model Context Protocol) via seven insights_* tools. The preferred way to consume them is your facility's AI Agent appliance, which speaks MCP natively and can both answer questions conversationally and run automations against the data.

The general MCP mechanics — the two ways in, phk_… keys, scoping — are covered in CCTV Integrations & MCP. This page goes deeper on the insights tools themselves.

Access requirements

Every insights_* tool enforces two layers, mirroring the UI:

  1. Module access — the calling account needs the CCTV module through its roles.
  2. Feature enablement — the target facility must have the People feature enabled; otherwise the tool returns the same "People feature is not enabled for this facility" error as the APIs.

Facility scoping applies as everywhere else: you can only query facilities your account can access.

The seven tools

The programmatic People timeline"the primary 'who was in the facility' view". Searches detection visit blocks by date range, person, name, match type (identified / unsure), membership status, and camera group. This is the workhorse: attendance questions, after-hours checks, and incident investigation all start here.

Searches registered people — the programmatic People list — by name, membership status (active, expired, on hold), and attributes, with facet counts. Use it to resolve "who is Alex?" into a person ID before drilling into activity.

insights_person_get

One person's full profile, enriched with their membership data — the programmatic profile panel.

insights_person_activity

A person's detection history over a date range — their visit log, per visit and per camera. Pairs naturally with insights_person_get: profile for context, activity for the history.

insights_checkins

Facility check-in history from the member-management integration — the swipe records that power visit-assisted matching and Self Learning. Useful on its own ("how many check-ins yesterday?") and as the ground truth to compare camera data against.

insights_match_unidentified

Correlates unidentified detections with check-in records by timestamp to suggest identity matches — a lightweight, on-demand version of the Self Learning correlation, and it also surfaces suspected duplicate profile groups. Good for "who might this unsure visitor be?" questions from an agent.

insights_report_snapshots

The daily report snapshots: KPIs and per-camera counts (detections, tracks, unique people, identified/unsure splits, check-in coverage, demographics) for a date range. The right tool for dashboards and digests — it reads precomputed aggregates rather than raw detections.

Patterns that work well

  • Attendance Q&A"Who was in the facility at 6 this morning?", "When was Alex Nguyen last in?"insights_timeline_search / insights_person_activity, answered conversationally by the AI Agent.
  • Tailgating follow-up — a scheduled automation cross-referencing insights_timeline_search against insights_checkins: anyone detected repeatedly with no matching swipe gets a daily summary to the manager.
  • Expired-member outreach — expired members still visiting (timeline search by membership status) piped into a follow-up list; the human conversation stays human, the detection is automated.
  • Weekly operations digestinsights_report_snapshots summarised into team chat: visits, peak hours, unsure %, access violations.
  • Identification hygieneinsights_match_unidentified run weekly to propose likely identities and duplicate merges, keeping the Self Learning queue short.

Because the same MCP surface carries the rest of Performance Hub (door control, device management, member data), people-data automations can span modules: "when an expired member is detected, check whether their door access also worked, and if so flag the access card" is one AI Agent automation.

What the tools don't expose

  • Video — live streams and playback are served to browsers, not over MCP; see CCTV Integrations & MCP.
  • Face imagery and biometric references — the tools return metadata and profile data, not the face collections.
  • Write operations on people — identify, merge, blacklist, and delete are UI workflows with human confirmation, by design.

Guest share tokens have no access to any people data — see Security & privacy.