hikvision-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hikvision-mcpcheck camera health and stream profiles for example_camera"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
hikvision-mcp
Alpha software for local, trusted deployments. Test against your exact camera model and firmware before enabling writes.
A local, capability-aware MCP server for safely inspecting and configuring Hikvision cameras. The current release implements the PRD's first end-to-end vertical slice:
TOML configuration and environment-variable secrets;
per-camera and per-tool permission enforcement;
async ISAPI with digest authentication, safe XML parsing, and bounded event streaming;
camera identity and capability probing;
warning-light read and partial configuration updates using the camera's JSON schema;
read-only intrusion regions, targets, arming schedules, and event linkage;
read-only motion, tamper, line-crossing, intrusion, region entrance/exit, and scene-change rules with zones, schedules, targets, and linkage;
camera health, stream profiles, image/day-night settings, storage status, audible-alarm configuration, and two-way-audio capability reads;
bounded live alert monitoring with semantic event type and active/inactive state;
mandatory proposal/apply approval fallback;
conflict detection, verified read-back, SQLite audit/change history, and rollback;
stdio and localhost Streamable HTTP MCP transports.
The warning-light, field-detection, and alert-stream adapters have sanitized fixture coverage for DS-2CD2346G2-ISU/SL firmware V5.7.14 and V5.7.19. The expanded read surface has sanitized V5.7.19 fixture coverage. Hardware writes still require explicit approval and should be opt-in until a PUT/read-back cycle has been validated on the target. Firmware differences belong in adapter subclasses, never MCP handlers.
Compatibility
Surface | V5.7.14 fixtures | V5.7.19 fixtures | V5.7.19 reference hardware |
Warning light, intrusion, alert stream | Yes | Yes | Read-only verified |
Health, streams, image, storage, audio | — | Yes | Read-only verified |
General detection rules | — | Yes | Seven advertised rule types read |
The reference hardware is a DS-2CD2346G2-ISU/SL. Other Hikvision devices are handled through capability probing, automatic or configured channel selection, and model/firmware adapter registration; they are not claimed as tested until sanitized fixtures or hardware evidence are added.
Related MCP server: Hikvision CCTV MCP
Install
uv sync --extra dev
Copy-Item config.example.toml config.toml
$env:HIKVISION_CAMERA_USERNAME = "service-account"
$env:HIKVISION_CAMERA_PASSWORD = "..."On Linux or macOS, use cp and export for the equivalent file copy and environment values.
Keep config.toml local and never commit credentials. Validate and run:
uv run hikvision-mcp config validate --config config.toml
uv run hikvision-mcp serve --transport stdio --config config.toml
uv run hikvision-mcp serve --transport streamable-http --config config.tomlThe HTTP MCP endpoint is http://127.0.0.1:8000/mcp by default.
Safe mutation flow
The example configuration is read-only. Deliberately raise both the server and camera policy ceilings to Level 3 before using this flow.
Call
get_capabilities(camera="example_camera").Call
get_warning_light.Call
configure_warning_light; this only creates a proposal.Obtain explicit human approval.
Call
apply_change(proposal_id=..., approved=true).The server checks for conflicts, writes once, reads back, verifies, and audits.
Use
rollback_changeto create a separately approved rollback proposal.
Read-only diagnostics
get_detection_rules(camera="example_camera")reads detector types advertised by the camera. Passkindsto probe specific types. Each result reports support independently and preserves readable configuration if schedule or linkage sub-resources are unavailable.get_camera_health,get_stream_profiles,get_image_settings, andget_storage_statusexpose operational state without allowing networking, accounts, firmware, or reset actions.get_audio_alarmandget_two_way_audiodescribe audible deterrence and talk-channel configuration. They do not play audio, open a talk session, or change camera state.get_intrusion_detection(camera="example_camera")returns field-detection enablement, regions, polygons, targets, sensitivity, arming schedule, and linkage methods.monitor_events(camera="example_camera", duration_seconds=15)watches the alert stream for a bounded period. Useevent_types=["fielddetection"]to filter exact camera event names.get_warning_light(camera="example_camera")returns duration, frequency, and schedule. The reference V5.7.19 firmware does not advertise brightness or a standalone enabled flag.
Quality checks
uv run ruff check .
uv run mypy
uv run pytestSee CONFIGURATION.md, SECURITY.md, and DEVELOPMENT.md.
Project status and support
This project is not affiliated with or endorsed by Hikvision. Hikvision and ISAPI are used
only to identify compatible products and protocols. Hardware and firmware behavior varies;
unsupported or unknown features return unsupported_capability rather than being guessed.
Bug reports and contributions are welcome. Read CONTRIBUTING.md before submitting camera payloads or changes, and use SECURITY.md for vulnerabilities.
Licensed under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
An authenticated remote MCP server for user-owned devices and one-shot capability invocation.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Guarded MCP server for agent-readable business truth, provenance, readiness, and discovery.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables control of Hikvision industrial cameras via MCP, including enumeration, image capture, parameter adjustment, and firmware upgrade.-
- FlicenseNot gradedqualityBmaintenanceMCP server for managing Hikvision NVRs and IP cameras via ISAPI, providing tools for device info, camera channels, user management, and configuration changes with safety confirmations.-
- AlicenseNot gradedqualityAmaintenanceEnables secure, auditable access to Home Assistant through MCP, with a read-only observer profile and an operator profile for controlled mutations.2MIT
- AlicenseNot gradedqualityAmaintenanceA safety-oriented Model Context Protocol (MCP) server for inspecting, controlling, diagnosing, and selectively administering a Home Assistant instance.MIT