# Apilio — how to use (mcp.ai)

Connect your Apilio account and use 8 tools for internet of things straight from your AI agent. Connect with your own API key. Apilio is a home automation platform that enables users to connect and control smart devices from various brands, offering flexible automation through complex conditions, time constraints, and integrations with services like IFTTT and Tuya.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_apilio?ms=1787295960000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `apilio_get_boolean_variables`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/apilio`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/apilio/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/apilio/get/boolean/variables` — Tool to fetch all boolean variables. Use when you need the full list of boolean variables and their current states.
- `POST https://api.mcp.ai/api/apilio/get/conditions` — Retrieves all conditions from your Apilio account. Conditions are logic rules that evaluate to true or false based on variable values. Use this to list all available conditions, get their UUIDs for us
- `POST https://api.mcp.ai/api/apilio/get/logicblocks` — Retrieves all logicblocks for the authenticated Apilio user. Logicblocks are the core automation logic units in Apilio that combine conditions and actions. Use this tool to list all available logicblo
- `POST https://api.mcp.ai/api/apilio/get/numeric/variables` — Retrieves all numeric variables from your Apilio account with their current values and metadata. Numeric variables in Apilio store numerical values (integers or decimals) that can be used in condition
- `POST https://api.mcp.ai/api/apilio/get/string/variables` — Tool to fetch all string variables. Use after authenticating the Apilio API.
- `POST https://api.mcp.ai/api/apilio/list/time/conditions` — Tool to fetch all time conditions of a user. Time conditions are conditions based on time, such as sunset/sunrise times, specific hours, or cron expressions. Use when you need to retrieve all time con
- `POST https://api.mcp.ai/api/apilio/list/tuya/conditions` — Tool to retrieve all Tuya conditions from your Apilio account. Use when you need to list all Tuya-based conditions (conditions based on Tuya/Smart Life device states), get their UUIDs for use in other
- `POST https://api.mcp.ai/api/apilio/list/variable/conditions` — Tool to retrieve all variable conditions from your Apilio account. Variable conditions are conditions based on the value of variables. Use when you need to list all available variable conditions, get 

## Example prompts
- "What can I do in Apilio?"
- "Show me a summary of my Apilio account"

## More
- Page: https://mcp.ai/apilio
- Agent spec (llms.txt): https://mcp.ai/apilio/llms.txt
- Postman collection: https://mcp.ai/apilio/postman.json
