Skip to main content
Glama

elv2mcp

Universal MCP adapter for Extra Low Voltage (ELV) systems β€” connect Hikvision, Dahua, and other security devices to AI agents via the Model Context Protocol.

Python 3.10+ License: MIT MCP


🎯 What is elv2mcp?

elv2mcp is a Model Context Protocol (MCP) server that bridges the gap between AI agents (Claude, GPT, Cursor, etc.) and physical security systems.

Today, thousands of ELV systems β€” cameras, NVRs, access control, alarms β€” sit isolated from modern AI workflows. They speak proprietary protocols (ISAPI, CGI, SDK) that LLMs cannot understand. elv2mcp translates these into typed, safe, auditable MCP tools that any AI agent can call.

Think of it as a "USB-C for physical security" β€” one adapter, many vendors, safe by default.


Related MCP server: Webcam MCP

✨ Features

  • Multi-vendor support β€” Hikvision (ISAPI), Dahua (CGI API), with a pluggable architecture for adding more (Bosch, Bolid, Axis, etc.)

  • Read-only by default β€” snapshots, device info, and channel lists work out of the box. Write operations (PTZ, reboot) require explicit opt-in.

  • Typed tools β€” AI agents call elv_get_snapshot(device_name, channel) instead of guessing raw HTTP requests.

  • Digest authentication β€” native support for Hikvision and Dahua auth schemes.

  • Secure credentials β€” never hardcoded. Loaded from environment variables or a .env file.

  • FastMCP-powered β€” built on FastMCP, with automatic schema validation and stdio transport.


πŸš€ Quick Start

1. Install

pip install fastmcp httpx

Or clone and install locally:

git clone https://github.com/AMPVIP/elv2mcp.git
cd elv2mcp
pip install -e .

2. Configure your devices

Set the ELV2MCP_DEVICES environment variable with a JSON map:

export ELV2MCP_DEVICES='{
  "cam1": {
    "ip": "192.168.1.100",
    "username": "admin",
    "password": "yourpass",
    "vendor": "hikvision",
    "port": 80
  },
  "cam2": {
    "ip": "192.168.1.101",
    "username": "admin",
    "password": "yourpass",
    "vendor": "dahua"
  }
}'

3. Run the server

python server.py

The server runs on stdio and waits for MCP client connections.


πŸ”Œ Connect to Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "elv2mcp": {
      "command": "/path/to/python",
      "args": ["/path/to/elv2mcp/server.py"],
      "env": {
        "ELV2MCP_DEVICES": "{\"cam1\": {\"ip\": \"192.168.1.100\", \"username\": \"admin\", \"password\": \"yourpass\", \"vendor\": \"hikvision\"}}"
      }
    }
  }
}

Restart Claude Desktop β€” the elv_* tools will appear in the interface.


πŸ› οΈ Available Tools

Tool

Description

Hikvision

Dahua

elv_list_devices

List all configured devices

βœ…

βœ…

elv_get_device_info

Get model, serial, firmware

βœ…

βœ…

elv_get_snapshot

Capture JPEG from a channel

βœ…

βœ…

elv_list_channels

Enumerate video channels

βœ…

⚠️ MVP stub

Example prompts for AI agents

Once connected, you can ask Claude:

  • "List all my cameras and tell me which ones are online."

  • "Take a snapshot from cam1 and describe what you see."

  • "What firmware version is running on cam2?"


πŸ” Security

elv2mcp is designed with a paranoid-by-default philosophy:

  • Read-only by default β€” all write operations (PTZ, reboot, config changes) are disabled unless allow_write: true is set per device.

  • No hardcoded credentials β€” use environment variables or a .env file (never commit it).

  • Digest auth β€” supports the auth schemes used by Hikvision and Dahua.

  • Audit-ready β€” every tool call can be logged (coming soon).

  • Network isolation β€” the server only talks to devices you explicitly configure.

⚠️ Never expose this server to the public internet. Run it on a trusted LAN or VPN.


🧩 Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   AI Agent      │◄─────►│   elv2mcp       │◄─────►│  Hikvision      β”‚
β”‚ (Claude, GPT)   β”‚  MCP  β”‚   FastMCP       β”‚ HTTP  β”‚  Dahua          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                  β”‚
                                  β”œβ”€β”€ HikvisionProvider (ISAPI)
                                  β”œβ”€β”€ DahuaProvider (CGI API)
                                  └── [Future: Bosch, Bolid, Axis]

The provider pattern makes it trivial to add new vendors β€” implement get_device_info, get_snapshot, and list_channels for the new protocol.


πŸ—ΊοΈ Roadmap

  • Hikvision ISAPI support (device info, snapshot, channels)

  • Dahua CGI API support (device info, snapshot)

  • PTZ control (Hikvision + Dahua) β€” behind allow_write flag

  • Event stream / motion detection (Hikvision alertStream)

  • Bosch BVMS provider

  • Bolid provider

  • Mock server for testing without real hardware

  • Audit logging (JSON lines)

  • MCP Registry publication


🀝 Contributing

Contributions are welcome β€” especially new vendor providers. To add a vendor:

  1. Create providers/your_vendor.py with a class implementing get_device_info, get_snapshot, list_channels.

  2. Register it in server.py's dispatch logic.

  3. Add tests and documentation.


πŸ“„ License

MIT License β€” see LICENSE for details.



πŸ‘€ Author

Andrey Pavlushov β€” Low Current Engineer with 20+ years of experience in ELV systems, networking, and security.


Built with the belief that the physical world deserves first-class AI tooling.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that provides LLM agents with direct access to webcam hardware for capturing high-resolution photos and recording video sequences. It enables autonomous agents to monitor environments and interact with the physical world through standard Model Context Protocol tools.
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables interaction with local camera devices to capture and process images. It allows LLMs to access video devices with configurable settings such as resolution, orientation, and image format.
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables AI agents to discover, monitor, and control industrial hardware like ESP32 machine controllers and inspection cameras through a standardized MCP interface.
    5
    MIT