Skip to content

MCP

Homecast provides an MCP endpoint that AI assistants use to read and control smart home devices.

Endpoint: https://api.homecast.cloud/mcp

Transport: Streamable HTTP (GET, POST, DELETE)

Authentication

MCP supports two authentication methods:

MethodSetupBest for
OAuth 2.1Auto-discovered via /.well-known/oauth-authorization-serverMCP clients with OAuth support (Claude Desktop, etc.)
Access TokenAuthorization: Bearer hc_... headerClients without OAuth

See the Authentication reference for details on both.

Tools

get_state

Read the current state of all accessible devices. Returns a hierarchical view of homes, rooms, and accessories.

ParameterTypeRequiredDescription
filter_by_homestringNoFilter to a specific home
filter_by_roomstringNoFilter to a specific room
filter_by_typestringNoFilter by device type (e.g., lightbulb)
filter_by_namestringNoFilter by device name

Annotations: Read-only tool. Does not modify device state.

set_state

Control one or more devices by setting characteristic values.

ParameterTypeRequiredDescription
updatesarrayYesList of device updates

Each update object:

FieldTypeRequiredDescription
homestringYesHome name
roomstringYesRoom name
accessorystringYesAccessory name
onbooleanNoPower state
brightnessintegerNoBrightness 0–100
hueintegerNoColor hue 0–360
saturationintegerNoColor saturation 0–100
color_tempintegerNoColor temperature (mireds)
activebooleanNoActive state
heat_targetfloatNoHeating target temperature
cool_targetfloatNoCooling target temperature
hvac_modestringNooff, heat, cool, auto
lock_targetintegerNo1 (lock), 0 (unlock)
alarm_targetintegerNoSecurity alarm state
speedintegerNoFan speed 0–100
volumeintegerNoSpeaker volume 0–100
mutebooleanNoSpeaker mute
targetintegerNoPosition 0–100

Annotations: Mutating tool. Requires mcp:write scope or control home permission.

run_scene

Execute a HomeKit scene by name.

ParameterTypeRequiredDescription
homestringYesHome name
namestringYesScene name

Annotations: Mutating tool. Requires mcp:write scope or control home permission.

OAuth scopes

ScopePermissions
mcp:readget_state only
mcp:writeget_state, set_state, run_scene
mcp:adminFull access including management

Client configuration

json
{
  "mcpServers": {
    "homecast": {
      "type": "url",
      "url": "https://api.homecast.cloud/mcp"
    }
  }
}

The client discovers OAuth endpoints automatically and prompts for authorization.

With access token

json
{
  "mcpServers": {
    "homecast": {
      "type": "url",
      "url": "https://api.homecast.cloud/mcp",
      "headers": {
        "Authorization": "Bearer hc_your_token_here"
      }
    }
  }
}

For a step-by-step setup guide, see Connect an AI Assistant.