safie-api
MCP server that enables AI Agents to use images and events from Safie camera devices
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)
-
Ensure Python 3.10+ is installed and accessible from your shell.
-
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 -
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 -
Alternatively, pass environment variables when launching to inject tokens:
ACCESS_TOKEN=YOUR_TOKEN ./run-script-or-uv-command
Option B: Using Docker
-
Ensure Docker is installed and running.
-
Build the Docker image (from the project root where the Dockerfile exists):
docker build -t safie-api-mcp-server . -
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 -
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
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP