Blink Camera

io.github.AbhijatSaxena由 GitHub 帳號 AbhijatSaxena 發布v0.1.1更新於 Oct 25, 2026

Control an Amazon Blink camera and its pan/tilt mount: aim it, read its position, grab a frame.

已驗證STDIO僅桌面位置與生活媒體與設計

概覽

AI 產生的概覽

控制 Amazon Blink 攝影機及其平移/傾斜底座:查看指向、調整角度並擷取畫面。

可以做什麼
查詢攝影機目前指向角度、移動範圍、工作階段狀態與串流網址。將攝影機轉到指定絕對角度,或相對目前位置微調,並等待硬體回報到位。停止馬達、回到已儲存的首頁位置,或把目前角度設為首頁。執行 360 度環景掃描。擷取單張靜態畫面並以影像內容回傳。
適用情境
當你使用 Amazon Blink 攝影機(尤其是搭配可平移/傾斜底座)並想透過 AI 助理查看目前指向、調整角度或擷取單張畫面時適用。若需要把攝影機畫面當作網路攝影機使用,也可搭配本機串流連接 OBS。
執行需求
需在本機執行,使用 Python 3.10 以上,可透過 uvx 或 pip 安裝。需要 Blink 帳號,並以環境變數 BLINK_USERNAME 與 BLINK_PASSWORD 提供登入資訊;若帳號啟用兩步驟驗證,需以 BLINK_2FA_FILE 指定存放驗證碼的檔案。擷取畫面需 ffmpeg(可用 BLINK_FFMPEG 指定路徑),且需能連線至 Blink 雲端。
安裝前請注意
需要提供 Blink 帳號密碼(BLINK_USERNAME、BLINK_PASSWORD)與兩步驟驗證碼檔案(BLINK_2FA_FILE),登入權杖會快取於本機檔案(預設 ~/.blink-mcp/state.json)。工具會實際移動實體攝影機,包含儲存首頁位置與環景掃描;擷取畫面會取得攝影機目前所對準的影像,僅應在使用者要求時使用。每台攝影機同時僅允許一個即時工作階段,重複開啟會導致其中一方中斷。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Blink Camera,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

blink-camera-mcp

[ci] [pypi] [python]

[blink-camera-mcp]

An MCP server for Amazon Blink cameras, including the pan/tilt mount that Blink's own API gives you no way to move.

Install it with uvx blink-camera-mcp. It is listed in the official MCP Registry as io.github.AbhijatSaxena/blink-camera-mcp.

Give any MCP host — Claude Desktop, an IDE agent, your own client — the ability to see where a camera is pointing, aim it, and look through it.

camera_status       where it points, travel limits, session state, stream URLpan_tilt            aim at an absolute angle, wait until the hardware confirmspan_tilt_nudge      turn relative to where it points nowpan_tilt_stop       stop the motorspan_tilt_home       go to the saved home positionpan_tilt_set_home   save the current angle as homepan_tilt_overview   360° sweepsnapshot            one still frame, returned as image content

Why this exists

Blink cameras are cloud devices. There is no local API, no ONVIF, no UVC — video exists only as a short-lived session brokered by Blink's cloud, capped at 300 seconds. Two consequences:

  1. Anything that wants to use the camera has to hold that session open and refresh it.
  2. The pan/tilt mount is not a device you can talk to. It has no endpoint of its own: it is driven inside the camera's media session, and its position comes back on the same socket. A client that reads only the video and skips every other message never sees any of that traffic, which is why the mount has looked uncontrollable for years.

This server owns the session (or reuses one), frames it correctly, routes the accessory messages, and exposes the whole thing as MCP tools with closed-loop semantics.

Install

bash
pip install blink-camera-mcp          # or without installing: uvx blink-camera-mcp

The distribution is blink-camera-mcp; the command it installs is blink-mcp.

You need Python 3.10+, a Blink account, and ffmpeg on PATH for snapshot (set BLINK_FFMPEG if it lives somewhere unusual).

Configure

Credentials come from the environment, and only the first run needs them:

bash
export BLINK_USERNAME="[email protected]"export BLINK_PASSWORD="..."export BLINK_CAMERA_NAME="Front Door"      # optional; defaults to the only camera

The token is cached (token material only — a password is never written to disk), so later runs need no credentials. Cache location defaults to ~/.blink-mcp/state.json; override with BLINK_STATE_FILE.

If Blink asks for a 2FA code, the server will not prompt you and will not take the code from anywhere but a file:

bash
export BLINK_2FA_FILE=/path/to/code.txt

Write the newest code into that file; it is read once and deleted. This keeps a live credential out of chat logs, shell history and argument lists.

Add it to your MCP host

bash
blink-mcp --print-config
json
{  "mcpServers": {    "blink": {      "command": "uvx",      "args": ["blink-camera-mcp", "--stream-port", "9000"]    }  }}

Hosts that manage their own Python (Claude Desktop, VS Code, LM Studio, …) run uvx as above. If you installed it into a virtualenv instead, set command to that interpreter and args to ["-m", "blink_mcp", …].

Claude Desktop — one-click

Download blink-camera-mcp-0.1.1.mcpb from the releases page and open it. Claude Desktop prompts for your Blink email and password (kept in the OS keychain), and asks for the 2FA code file only if your account uses verification. The bundle carries no server code of its own — it depends on this package from PyPI, so it can never drift from the released version.

LM Studio, VS Code, Cursor, Cline and friends

They all read the same JSON as above. Paste it into the host's MCP config — LM Studio: mcp.json; VS Code: .vscode/mcp.json; Cursor: .cursor/mcp.json. Cline installs it from this README.

Hermes

Hermes' curated catalog is for remote, OAuth-authenticated servers, and this one has to run on a machine that can reach your camera — so add it as an ordinary stdio server in ~/.hermes/config.yaml:

yaml
mcp_servers:  blink:    command: "uvx"    args: ["blink-camera-mcp"]    env:      BLINK_USERNAME: "[email protected]"      BLINK_PASSWORD: "…"

Restart the session (or /reload-mcp) and the eight tools show up like any other.

Two ways to run it

Standalone (default) — the server owns the camera's live session and publishes the video to a local TCP port (tcp://127.0.0.1:<port>, or a fixed one with --stream-port 9000). Point OBS at it as a Media Source if you want the camera as a webcam as well.

Against a bridge — if something else already holds the session:

bash
blink-mcp --control-url http://127.0.0.1:9100 --stream-url tcp://127.0.0.1:9000

This matters because Blink allows one live session per camera: a viewer and a controller have to share it or take turns. Running two things that each insist on their own session means one of them loses.

What "closed-loop" means here

The mount reports its angle while it is moving. So pan_tilt does not sleep and hope: it sends the command and returns only when the hardware reports that its motors stopped at the requested angle — typically well under a second.

pan_tilt_nudge(+4)  -> settled=True moved=True elapsed=0.67s -> pan=117 tilt=-75pan_tilt_nudge(-4)  -> settled=True moved=True               -> pan=113 tilt=-75

Two deliberate behaviours, because a confident wrong answer is worse than a failure:

  • if the mount never confirms, the tool fails rather than returning the last angle it happened to know (a stale position dressed up as success would have an agent announce a move that never happened);
  • a command to the angle the camera already holds is a no-op reported as moved: false — success, not failure.

Privacy and safety

  • snapshot decodes a frame of whatever the camera is pointed at. The tool description says so, and tells the agent to use it only when the user asks. Nothing here captures anything on its own.
  • The server talks to Blink directly, and the token cache holds no password.
  • Any bridge control plane is loopback-only by design: it moves a physical camera.

How it was built

The accessory channel is undocumented. It was recovered from the official Android app — dex bytecode and the native library's symbol table — and then verified against hardware:

frame        [flag:1][id:4 big-endian][length:4 big-endian][payload]send         flag 0x14 INLINE_COMMAND, id = commandId             move=3 [0,0,0,0,<pan>,<tilt>,0]   stop=4  home=5  set_home=6  overview=7receive      flag 0x15 ACCESSORY_MESSAGE, id = message id             POSITION=2 / HOME_POSITION=3 [<counter>,<pan>,<tilt>,<status>]             ROSIE_LIMITS=4   PAN_OVERVIEW_COMPLETE=5   lights/siren = 0/1/6/7

status is 0x00 idle and 0x10 moving. Angles are single signed bytes.

The same protocol knowledge is being contributed upstream to blinkpy so every Blink integration benefits, not just this server. blink_mcp/immi.py is byte-identical to the module submitted there, and switches to the upstream copy automatically once it ships.

Standing on the shoulders of blinkpy, which implements the Blink cloud API and the IMMI transport.

Limitations

  • Verified on a Blink Mini with the pan/tilt mount. Other camera families use a different live transport (WebRTC with JSON-RPC commands rather than this binary channel) and are not supported yet.
  • One live session per camera, as above.
  • Blink caps a session at 300 s; the server rotates it around 270 s and consumers never notice.
  • snapshot needs ffmpeg; it decodes one frame from the stream rather than opening a second session.

Tests

bash
pytest                    # 68 offline tests: protocol bytes, closed-loop logic, tool layer,                          # a real stdio handshake, and a stub control plane

The suite is offline and needs no camera. For real hardware:

bash
python tests/live_smoke.py --state-file ~/.blink-mcp/state.json

which logs in, moves the camera out and back, and captures a frame.

License

MIT

來源:README.md,提交 2cd4964

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 26, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分