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
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.
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 ChatGPT and 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.
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.
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 and detectors on or off, move PTZ cameras to presets, and other state changes from the API.
- 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. On the cloud endpoint, viewing and control are separate permissions that you grant on the sign-in page, and usage is rate limited to protect the relay.
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."
Ready-made workflows
The server also offers prompt templates that assistants with prompt support (Claude Desktop, Claude Code, 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.
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.