hikvision-mcp

hikvision-mcp

Enables safely inspecting and configuring Hikvision cameras via a local MCP server, with permission enforcement, read-only diagnostics, and supervised mutation flows.

Category
Visit Server

README

hikvision-mcp

[!IMPORTANT] 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.

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.toml

The 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.

  1. Call get_capabilities(camera="example_camera").
  2. Call get_warning_light.
  3. Call configure_warning_light; this only creates a proposal.
  4. Obtain explicit human approval.
  5. Call apply_change(proposal_id=..., approved=true).
  6. The server checks for conflicts, writes once, reads back, verifies, and audits.
  7. Use rollback_change to create a separately approved rollback proposal.

Read-only diagnostics

  • get_detection_rules(camera="example_camera") reads detector types advertised by the camera. Pass kinds to 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, and get_storage_status expose operational state without allowing networking, accounts, firmware, or reset actions.

  • get_audio_alarm and get_two_way_audio describe 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. Use event_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 pytest

See 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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured