Integrations: AI Assistants

Connect an AI Assistant

Agent DVR can be used directly from AI assistants such as Claude, ChatGPT, Cursor and VS Code Copilot. Ask in plain language - "what alerts did I have last night?", "show me what happened on the driveway camera this morning", "disable the cameras in the garage" - and the assistant answers from your live cameras, recordings and alert log, including images.

This works through the Model Context Protocol (MCP), the open standard assistants use to connect to external tools. Agent DVR provides an MCP server in two places, and you connect your assistant to whichever suits you:

  • Built into Agent DVR (Local Endpoint): served by your own server on your local network. No account or subscription needed. For assistants running on the same computer or LAN.
  • Through iSpyConnect.com (Cloud Endpoint): reaches your servers over the same remote access the web portal and mobile apps use, from anywhere, with no port forwarding. Needs an iSpyConnect subscription. This is the one to use for claude.ai, ChatGPT and phones.

Both expose the same set of tools. Requires Agent DVR 8.0.3 or later.

Local Endpoint

Every Agent DVR server serves MCP at /mcp on its local web server, so if you open the Agent DVR UI at http://localhost:8090 the endpoint is http://localhost:8090/mcp (use your server's address and port from another computer on the LAN, for example http://192.168.1.10:8090/mcp). It is on by default and can be turned off with AI Assistant (MCP) Endpoint in Server Settings - Local Server.

Access follows exactly the same rules as the rest of the local API: from your own network no login is needed, unless Protect API is enabled, in which case the assistant must send the username and password of an admin user (most MCP clients let you add an Authorization header). Connections from outside your network additionally require a license, the same as port-forwarded access to the UI.

Claude Code

claude mcp add --transport http agentdvr http://localhost:8090/mcp

Gemini CLI

gemini mcp add -s user --transport http agentdvr http://localhost:8090/mcp

Then type /mcp inside Gemini CLI to confirm the tools loaded. The -s user part stores the server in your user settings so it is available from any folder.

Cursor

Add to .cursor/mcp.json (or via Settings - MCP):

{ "mcpServers": { "agentdvr": { "url": "http://localhost:8090/mcp" } } }

VS Code (Copilot)

Add to .vscode/mcp.json:

{ "servers": { "agentdvr": { "type": "http", "url": "http://localhost:8090/mcp" } } }

Claude Desktop

The Claude desktop app cannot call a server on your own computer directly, so it uses a small extension that does it for you. Download AgentDVR.mcpb, then in Claude Desktop open Settings - Extensions and drag the file onto the page. It installs enabled and connects to http://localhost:8090/mcp; click Configure only if your server is on another computer or has Protect API enabled. Claude asks for permission the first time each tool is used - choose "Always allow" to stop the prompts.

Claude Desktop shows a red warning for every extension that was not installed from Anthropic's own directory. It is expected for this file; the extension only talks to the address you give it.

Other assistants

Any client that supports MCP over HTTP ("Streamable HTTP") can use the same URL. Look for "MCP servers", "connectors" or "tools" in the assistant's settings.

The Claude web app and mobile apps, and ChatGPT, cannot reach a server on your own network at all; they use the Cloud Endpoint.

Cloud Endpoint

With an iSpyConnect subscription, your servers are also reachable at:

https://www.ispyconnect.com/mcp

Add that URL as a custom connector or MCP server in your assistant (for example Settings - Connectors in claude.ai and the Claude apps, or the equivalent in Cursor). The assistant opens an iSpyConnect sign-in page; sign in, choose whether to allow control as well as viewing, and click Allow. Nothing else needs configuring: every Agent DVR server connected to your account with remote access enabled is available, and the assistant will ask which one you mean if you have more than one.

In ChatGPT (Plus or Pro) the steps are: Settings - Security and login - turn on Developer mode; then Settings - Plugins - Browse plugins - Add. Name it Agent DVR, enter the URL above, choose OAuth and leave the client ID and secret empty, then sign in and click Allow. If the plugin page says "No app actions available yet", click Refresh on that page.

From a command-line assistant such as Gemini CLI or Claude Code the sign-in is a two-step: add the server, then authorise it and the browser opens on the same page.

gemini mcp add -s user --transport http agentdvr-cloud https://www.ispyconnect.com/mcp
gemini
/mcp auth agentdvr-cloud

Requests travel over the same relay the web portal uses, so no port forwarding is needed and your server is never exposed to the internet. Access stops when your subscription lapses, and each assistant's access can be removed from the assistant's own connector settings at any time.

Your server must be running and connected to iSpyConnect (the padlock icon in the local UI shows the remote connection state). Block External Access in Server Settings blocks this endpoint too.

ChatGPT: uses every tool, including snapshots and recordings, but does not show the prompt templates. Ask for a workflow by name instead ("run the morning_briefing workflow") and the assistant fetches the steps itself. Turning on Describe Alerts in the camera's Alerts settings (needs an AI provider under Server Settings - AI) gives every assistant a written description per alert as well, useful for cameras that alert without recording.

What the Assistant Can Do

Assistants see a small set of purpose-built tools rather than the raw API, so answers stay quick and cheap:

  • Viewing: list your servers and devices (with location and health), get an activity summary (recordings and alerts per camera per hour, with what was detected), list recordings in a time window, see a whole window at a glance as a grid of frames, see a camera across a day as a timeline of frames, sample frames from one recording, take a live snapshot of a camera, read the alert log, and get a link to open a recording in the web UI.
  • Control: arm and disarm the server, apply profiles, enable or disable devices, change recording modes, switch alerts, detectors, object detection, face recognition and number plate recognition on or off, add objects to the list a camera looks for, put devices in groups, move PTZ cameras to presets, and other state changes from the API.
  • Rules: set up a rule in plain language - "tell me if a red car turns up in the next 6 hours", "alert me if Dave is at the door between 2 and 4 on Tuesday". The assistant picks the detector event (object, face, plate, sound, motion) and, only for details a detector cannot see such as colour or make, adds a question for the vision AI whose answer confirms the match. The rule is stored as ordinary actions on the camera, marked as assistant-made with the sentence you used, and expires by itself; you can delete it there at any time. See Assistant Rules and the Rule Examples. Needs Agent DVR 8.0.7 or later.
  • Everything else: a catalogue of further read and control commands the assistant can call when no dedicated tool fits (system statistics, a device's full status, PTZ presets and so on).

The assistant cannot delete recordings or photos, change device or server configuration, add or remove devices, or restart the server: those commands are deliberately not offered, whichever endpoint is used. Rules are the one thing it can create, and every one is listed in Server Settings - Assistant Rules. On the cloud endpoint, viewing, control and rules are separate permissions that you grant on the sign-in page, and usage is rate limited to protect the relay. A rule that asks the vision AI a question costs one AI call each time its trigger fires (capped per hour); the assistant will say so when it sets one up.

Example prompts

  • "Has anyone been to the front door in the last 24 hours? Show me."
  • "What birds visited the feeder this morning?"
  • "How busy was the driveway today, and when?"
  • "Show me the back garden across the day. When did it start raining?"
  • "What alerts did I have yesterday, and were any of them people?"
  • "Who's at the front door right now?"
  • "Which cameras are offline?"
  • "We're heading out - arm everything with the Away profile."
  • "Disable all cameras in the home location."
  • "Send me a link to the clip of the courier."
  • "Tell me if anyone comes to the front door in the next 6 hours."
  • "Alert me if a red car turns up on the driveway today."
  • "Let me know the first time Dave is at the door on Tuesday between 2 and 4."
  • "Email me if the back gate camera goes offline this week."
  • "When anyone walks into the car park this morning, tell them the office is round the back."
  • "If someone is at the side gate tonight, play a dog barking and record the garden camera too."
  • "If the bins aren't out by the kerb on Sunday at 6pm, email [email protected]."
  • "Weekdays 9 to 5, tell me if a delivery van stops outside the shop."
  • "Tell me if someone is carrying a parcel at the front door today."
  • "Take a photo of the garden every day at noon."
  • "Put the driveway, garden and gate cameras in a group called Outside."
  • "Tell me whenever there is a person on any of the Outside cameras between 11pm and 6am."
  • "Arm the system at 10pm every night, and tell me when it is disarmed."
  • "Which cameras can spot dogs? Who do you recognize? Can the door camera talk?"
  • "What have you set up for me, and is each one working right now?"
  • "Make the driveway one email me instead."
  • "What rules have you set up? Pause the driveway one and delete the rest."

Ready-made workflows

The server also offers prompt templates that assistants with prompt support (Claude Desktop, Claude Code, Gemini CLI, Cursor and others) show as slash commands or in a menu. Each one runs a complete multi-step workflow and reports the result:

  • morning_briefing - what the cameras saw since last evening: activity, alerts, notable people, vehicles and animals, and camera health.
  • door_report - who came to a door camera, with times, what each visitor did and a link to each clip.
  • wildlife_report - which animals and birds a camera caught, identified as closely as the footage allows.
  • camera_health - every server and camera checked for offline, disabled, errors and cameras that have gone quiet.
  • day_in_review - a camera across a whole day as a timeline of frames, with a narrative of how the scene changed.
  • set_up_a_rule - set up a rule from a sentence: checks what your cameras can do, shows you what the rule will do, then creates it when you say yes.

Assistant Rules

With the rules permission an assistant can set up a rule for you from a sentence: "tell me if anyone comes to the front door in the next 6 hours". Agent DVR turns it into ordinary actions on the camera, so it runs on your server like a rule you made by hand. No assistant is involved once the rule exists.

  • Where it goes: the camera's Actions list, marked Assistant rule with the date it ends and, for rules that fire a limited number of times, how often it has fired. Hover over the mark to see the sentence it came from. Edit or delete it there like any other action, or ask the assistant to list, pause or delete its rules. Every rule on the server is also listed in one place, Server Settings - Assistant Rules, with the sentence it came from, what it covers, whether it is active, waiting, paused or finished, and a delete button. Rules for a group of cameras or for the system itself appear only there. Users who do not have permission to change server settings can see the list but not delete from it.
  • What it can watch for: anything the camera already detects - motion, objects (person, car, dog and so on), recognized faces, number plates, sounds, or the camera going offline. You can ask questions too: "which cameras can spot dogs?", "who do you recognize?", "can the door camera talk?".
  • What it can do when it happens: tell you by push notification, email or SMS; say a message out loud through the camera ("when someone walks into the car park, tell them the office is round the back") or play a sound through it (a dog barking); record on another camera; move a PTZ camera to a preset; call a URL (a webhook, a smart plug); tag the recording; apply a profile. Speaking and playing sounds need a camera with talk set up, speech and SMS need a connected account, and email needs messaging enabled on the camera - the assistant checks these and tells you which cameras qualify.
  • More than one camera, or the system itself: name a group, a location or "all the cameras" and you get one rule that follows it - "tell me whenever there is a person on any of the Outside cameras overnight" also covers a camera you add to the Outside group next month. Cameras in the group that cannot detect what you asked for are simply not a source, and the assistant tells you how many can. If the group does not exist yet, an assistant with the control permission can make it: "put the driveway, garden and gate cameras in a group called Outside" (needs Agent DVR 8.0.7 or later). Groups are the same ones you set on a device's General tab, and they also decide which devices a restricted user account can see, so a camera you put in a group is hidden from restricted users whose account does not include that group. A rule can also belong to the server rather than a camera: "arm the system at 10pm every night", "apply the Night profile at sunset on weekdays", "tell me when the system is disarmed". System rules run on their own timetable, so no camera's schedule switch affects them; they cannot look at a picture or speak through a camera.
  • When: for the next few hours, until a date and time, in a weekly window ("Tuesdays between 2 and 4"), on one day, or every so often ("take a photo of the garden every hour", "check that the gate is shut every 15 minutes" - within a time window if you like). Times can follow the sun: "after dark", "from sunset to sunrise", "half an hour before sunrise" are worked out again every day from the coordinates of the camera's location (a location with no latitude and longitude set gets 6am and 6pm). "Tell me when..." notifies you once and the rule then pauses itself; say "every time" or "whenever" if you want to be told each time it happens. Every time means every visit, not every second someone stands there: a rule waits a minute before it can notify again (half a minute for rules that speak, play a sound or record), and you can ask for longer ("no more than once an hour"). With a repeating window ("weekdays 9 to 5, tell me if a van stops outside") once means once each day the window opens. Ask "what have you set up, and is it working?" to see each rule and whether it is active, waiting for its window, paused or finished. "Make that one email me instead" changes a rule. A rule with a time limit removes itself when the time passes.
  • Details a detector cannot see: for color, make, clothing and similar ("a red car") the rule asks your AI provider (Server Settings - AI Settings) a yes or no question about the picture each time the detector fires, and only acts when the answer is yes. The same works for things no detector knows at all ("a kangaroo in the garden"), using motion as the trigger. It can also look at a set time: "if the bins aren't out on Sunday at 8pm, text Max" checks the camera every Sunday at 8pm and only messages when the answer is no. If the AI cannot tell (dark, view blocked) nothing is sent, so pick a time when the camera can see. That is one AI call per trigger, limited to 30 an hour per rule by default, and the assistant tells you when a rule works this way. If no AI provider is set up the assistant says so and how to add one (Google Gemini has a free tier) - it cannot do that step for you, because it is an API key - and offers the rule without the question: every car rather than red cars, which it can look through with you afterwards. Fine detail, such as the exact model of a car or color at night when the camera has switched to its black and white night-vision picture, is not reliable.
  • Why a rule is refused: Agent DVR will not create a rule that could never work, and says everything that is wrong in one go. If no face is enrolled under the name you gave, if the camera you want to speak through has no talk channel, if object detection is off on that camera, if what you asked for is not in its Find list, or if you asked for a time window on a camera whose schedule is switched off, the assistant is told exactly what needs changing. With the control permission it can make the change for you and try again: switch the detector or the schedule on, or add the object to the camera's Find list ("dog" on a camera that only looks for people and cars). It can only add objects the camera's AI model knows. For anything else it uses a broader object and asks your AI provider to check the detail. Sounds are the exception: add those to the microphone's list yourself.
  • Not supported yet: counting ("the second time today"), things that have not happened ("no delivery by 6pm"), and sequences across cameras.

Needs Agent DVR 8.0.7 or later. On the cloud endpoint, rules are a separate permission on the sign-in page, so an assistant that was connected before will ask you to approve access again.

Rule Examples

Common things people want from their cameras, as the sentence to say to a connected assistant, what Agent DVR sets up, and what it needs. All of these are Assistant Rules: they run on your server and carry on with no assistant connected. Needs Agent DVR 8.0.7 or later and the rules permission.

  • Get an alert when a car of a particular color arrives. Say: "Tell me if a red car turns up on the driveway in the next 6 hours." The camera's object detection triggers on every car, your AI provider is asked whether the car is red, and you get one push notification the first time the answer is yes. The rule removes itself after 6 hours. Needs object detection switched on with "car" in the camera's Find list (the assistant can do both with the control permission) and an AI provider in Server Settings - AI Settings.
  • Know when a particular person arrives. Say: "Let me know the first time Dave is at the door on Tuesday between 2 and 4." Face recognition triggers on the name and you are told once. Needs face recognition switched on for the camera and a face enrolled under that name - the rule is refused, with the names that are enrolled, if there is no Dave.
  • Find out whether something has been done by a set time. Say: "If the bins aren't out by the kerb on Sunday at 6pm, text me." Every Sunday at 6pm the camera's picture is sent to your AI provider with a yes or no question, and you get the message only when the answer is no. If the AI cannot tell (too dark, view blocked) nothing is sent, so pick a time when the camera can see. Needs an AI provider, and a connected account for SMS.
  • Watch for deliveries during opening hours. Say: "Weekdays 9 to 5, tell me if a delivery van stops outside the shop." Once each day the window opens, not once for all time. Say "every time" if you want each one. Needs the camera's schedule switched on.
  • Spot something no detector knows. Say: "Tell me if there is a kangaroo in the garden today." or "Tell me if someone is carrying a parcel at the front door." Motion or a person triggers the rule and the AI provider answers the question about the picture. One AI call per trigger, limited to 30 an hour for each rule.
  • Speak to whoever turns up. Say: "When anyone walks into the car park this morning, tell them the office is round the back." The message is spoken through the camera's speaker by text to speech. Needs a camera with talk set up and a connected account.
  • Scare off a night-time visitor. Say: "If someone is at the side gate tonight, play a dog barking and record the garden camera too." Plays a sound file through the camera and starts another camera recording, at most once every 30 seconds. Needs a camera with talk set up.
  • Cover all the outside cameras overnight. Say: "Put the driveway, garden and gate cameras in a group called Outside." then "Tell me whenever there is a person on any of the Outside cameras from sunset to sunrise." One rule follows the group, including cameras you add later, and sunset is worked out every day from the location's coordinates. At most one notification a minute from each camera.
  • Hear about a camera that stops working. Say: "Email me if the back gate camera goes offline this week." Needs messaging enabled on the camera.
  • Arm and disarm on a timetable, and know when it changes. Say: "Arm the system at 10pm every night, and tell me when it is disarmed." These are rules of the server itself, so no camera's schedule affects them.
  • Record a daily photo. Say: "Take a photo of the garden every day at noon."

To see or change what has been set up, ask "what rules have you set up, and is each one working?", "make the driveway one email me instead", "pause the van rule", or open Server Settings - Assistant Rules. If a request cannot work the assistant says why and what to change; see Assistant Rules for the limits.

Troubleshooting

  • The assistant cannot connect to the local endpoint: check the URL in a browser - http://localhost:8090/mcp should answer (an error message is fine; "connection refused" is not). Make sure the port matches Server Settings - Local Server and that the endpoint is enabled there.
  • 401 Unauthorized: Protect API is enabled, so the assistant must send an admin user's credentials, or you are connecting from outside your network.
  • 403 Forbidden: connecting from outside your network without a license. Use the Cloud Endpoint instead.
  • 404 Not Found: the endpoint is switched off in Server Settings, or the server is older than 8.0.3.
  • The cloud endpoint says the server is offline: the server is not connected to iSpyConnect. Check the padlock icon in the local UI and that Block External Access is off.
  • Seeing what the assistant is doing: set Logging to Debug in Server Settings and open the logs from the server menu. On the local endpoint every request and tool call is logged with an "MCP" prefix, including the arguments and how long it took. Through the cloud endpoint the tools run on iSpyConnect.com and the server only sees the individual commands they send, logged with a "RelayApi" prefix.