Get the FREE Ultimate OpenClaw Setup Guide →

safie-api

MCP server that enables AI Agents to use images and events from Safie camera devices

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio safiepublic-safie-api-mcp-server uv run --with git+https://git@github.com/SafiePublic/safie-api-mcp-server.git safie-api-mcp-server \
  --env API_KEY="" \
  --env ACCESS_TOKEN="******"

How to use

This MCP server enables you to interact with the Safie API through the MCP (Model Context Protocol) interface. It exposes a set of tools that let you list devices, fetch device images and media, retrieve location data, obtain the latest thumbnails, and read standard events from Safie devices. With the provided MCP endpoints, you can integrate Safie device data into your context graphs and automation workflows. To access the server, configure an MCP client or orchestration layer to connect to the server name (for example, Safie API) and call the available tools by name (list_devices, get_device_image, list_device_media, get_device_location, get_device_thumbnail, list_device_standard_events).

Note: This implementation is a preview and only a subset of features is validated. You must provide one of the required credentials—ACCESS_TOKEN or API_KEY—via environment variables. If both are provided, ACCESS_TOKEN takes precedence.

How to install

Prerequisites:

  • Python 3.10+ (for uv usage) or Docker (for container usage)
  • Internet access to fetch the MCP server components

Option A: Using uv (Python)

  1. Ensure Python 3.10+ is installed and accessible from your shell.

  2. Install uv if not already available (depends on your setup):

    • You can install uv via pipx or your preferred package manager. Example (may vary by system):
    pipx install uv
    
  3. Run the MCP server using uv (credentials provided via environment variables):

    uv run --with git+https://git@github.com/SafiePublic/safie-api-mcp-server.git safie-api-mcp-server
    
  4. Alternatively, pass environment variables when launching to inject tokens:

    ACCESS_TOKEN=YOUR_TOKEN ./run-script-or-uv-command
    

Option B: Using Docker

  1. Ensure Docker is installed and running.

  2. Build the Docker image (from the project root where the Dockerfile exists):

    docker build -t safie-api-mcp-server .
    
  3. Run the container, providing credentials via environment variables:

    docker run -i --rm -e ACCESS_TOKEN=YOUR_TOKEN -e API_KEY=YOUR_API_KEY safie-api-mcp-server
    
  4. The server will start and expose MCP endpoints to be consumed by your MCP client or orchestration layer.

Additional notes

Environment variables:

  • ACCESS_TOKEN (preferred): Safie OAuth2 access token
  • API_KEY: Safie API key (used if ACCESS_TOKEN is not provided) If both are set, ACCESS_TOKEN is used by default.

Common issues:

  • Token invalid or expired: reissue a valid ACCESS_TOKEN or API_KEY.
  • Network connectivity problems: ensure outbound access to Safie APIs is allowed.
  • Correct server name in your MCP client: use the exact label shown in the mcp_config (e.g., Safie API).

Configuration tips:

  • Always provide at least one credential via env; the server will fail to fetch data without valid credentials.
  • When using Docker, you may want to mount a local config or set a .env file that injects ACCESS_TOKEN and API_KEY at runtime.

Related MCP Servers

Sponsor this space

Reach thousands of developers