Log in or create an account to get your API key and connect your AI assistant.

What is MCP?

MCP (Model Context Protocol) is an open standard that lets AI assistants use external services. qtrl.me runs an MCP server, so an assistant such as Claude can list your hubs and devices, read sensors, control switches, dimmers and blinds, fetch electricity prices, create and change automations and build dashboards, all through plain conversation. The assistant only sees what your account owns, and the same limits as on the web apply.

Available tools

The table lists exactly the tools the MCP server offers right now. The same tools are available as functions for ChatGPT and Gemini.

Hubs
Tool Description
list_hubs List your hubs with connection status.
get_hub_status Detailed status of one hub: connection, signal strength, firmware, uptime.
reboot_hub Reboot a connected hub.
hub_control Combined hub tool: list, status or reboot in one call.
Devices
Tool Description
list_devices List the devices on a hub with their channels and current values.
get_device_state Read a device's current values (temperature, state, level …).
set_device_state Control a channel: on/off, dimmer level, blinds up/down.
device_control Combined device tool: list, read or control in one call.
Electricity prices
Tool Description
get_electricity_price Current electricity price for SE1–SE4 in SEK/kWh, the next hour's price and the day's ranking (1 = cheapest hour).
Automations
Tool Description
list_automations List your automations (schedules, simple automations, thermostats and flows) with state, last run and the plan's limits.
get_automation Get one automation as a full flow (nodes and edges) plus its latest runs.
save_automation Create or replace an automation. Validated like the web editor: limits, ownership, required parameters.
simulate_automation Dry-run a flow against live data without saving or sending anything: errors, each condition's true/false and what the actions would do.
manage_automation Enable, disable or delete an automation.
get_automation_catalog Everything needed to build an automation: node types with parameters, your devices and channels, price areas, places, existing flows and the plan's limits.
Dashboards
Tool Description
list_dashboards List your dashboards (tabs) with widget counts, which one is default and the plan's limits.
get_dashboard Get a dashboard's layout and the channels that can be placed on it.
save_dashboard_layout Replace a dashboard's whole layout, validated like the web editor.
manage_dashboard Create, rename, delete or set as default a dashboard.

Setup

Choose your AI platform below.

The examples below use the placeholder YOUR_API_TOKEN_HERE. Log in to see your real keys.
Claude Code (recommended, easiest)

Claude Code connects directly to the MCP server; no bridge needed.

API endpoints:

  • https://qtrl.me/mcp/sse - MCP over SSE (Claude Code)
  • https://qtrl.me/mcp - MCP over Streamable HTTP (the bridge and your own clients)

Quick test:

Test with curl
curl -X POST https://qtrl.me/mcp \
  -H "Authorization: Bearer YOUR_API_TOKEN_HERE" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

The reply lists the tools in the table above. 401 means the key is wrong.

Step 1: Install Claude Code
npm install -g @anthropic-ai/claude-code
# or
curl -fsSL https://claude.ai/install.sh | sh
Step 2: Add qtrl.me as an MCP server
Command
claude mcp add --transport sse qtrlme https://qtrl.me/mcp/sse \
  --header "Authorization: Bearer YOUR_API_TOKEN_HERE"
Step 3: Start talking

Done. Start Claude and ask about your devices:

claude
Then type for example: "List my hubs"
Claude Desktop (requires a bridge)

Claude Desktop only talks to local programs (stdio), so a small bridge forwards the calls to qtrl.me.

API endpoints:

  • https://qtrl.me/mcp - MCP over Streamable HTTP (the bridge and your own clients)

Quick test:

Test with curl
curl -X POST https://qtrl.me/mcp \
  -H "Authorization: Bearer YOUR_API_TOKEN_HERE" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

The reply lists the tools in the table above. 401 means the key is wrong.

Step 1: Download the bridge

Save the bridge somewhere permanent:

Download qtrlme-bridge.js

Save as e.g. C:\qtrlme\qtrlme-bridge.js (or wherever you prefer).

Step 2: Configure Claude Desktop

Edit the Claude Desktop configuration file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "qtrlme": {
      "command": "node",
      "args": [
        "C:\\qtrlme\\qtrlme-bridge.js",
        "https://qtrl.me/mcp",
        "YOUR_API_TOKEN_HERE"
      ]
    }
  }
}
Note: Change the bridge path to where you saved it. On macOS/Linux use forward slashes: /Users/yourname/qtrlme-bridge.js
Step 3: Restart Claude Desktop

Quit Claude Desktop completely and start it again so the configuration is loaded.

ChatGPT / OpenAI

API endpoints:

  • GET https://qtrl.me/api/openai/functions - list the available functions
  • POST https://qtrl.me/api/openai/functions/execute - execute a function

Quick test:

Test with curl
curl https://qtrl.me/api/openai/functions \
  -H "Authorization: Bearer YOUR_API_TOKEN_HERE"

Python example:

import openai
import requests

# Fetch QtrlMe functions
response = requests.get("https://qtrl.me/api/openai/functions",
    headers={"Authorization": "Bearer YOUR_TOKEN"})
functions = response.json()["functions"]

# Use with ChatGPT
client = openai.OpenAI(api_key="your_openai_key")
response = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "List my RF-HUBs"}],
    functions=functions
)

Node.js example:

const OpenAI = require('openai');
const axios = require('axios');

const client = new OpenAI({ apiKey: 'your_openai_key' });

// Fetch QtrlMe functions
const { data } = await axios.get('https://qtrl.me/api/openai/functions', {
  headers: { Authorization: 'Bearer YOUR_TOKEN' }
});

// Use with ChatGPT
const response = await client.chat.completions.create({
  model: 'gpt-4',
  messages: [{ role: 'user', content: 'List my RF-HUBs' }],
  functions: data.functions
});

// Handle function call
if (response.choices[0].message.function_call) {
  const { name, arguments: args } = response.choices[0].message.function_call;

  const result = await axios.post('https://qtrl.me/api/openai/functions/execute',
    { name, arguments: args },
    { headers: { Authorization: 'Bearer YOUR_TOKEN' }}
  );

  console.log(result.data.content);
}
Authentication: All requests require your API key as a Bearer token in the Authorization header.
Google Gemini

API endpoints:

  • GET https://qtrl.me/api/gemini/functions - list the available functions
  • POST https://qtrl.me/api/gemini/functions/execute - execute a function

Quick test:

Test with curl
curl https://qtrl.me/api/gemini/functions \
  -H "Authorization: Bearer YOUR_API_TOKEN_HERE"

Python example:

import google.generativeai as genai
import requests

# Fetch QtrlMe functions
response = requests.get("https://qtrl.me/api/gemini/functions",
    headers={"Authorization": "Bearer YOUR_TOKEN"})
functions = response.json()["functionDeclarations"]

# Use with Gemini
genai.configure(api_key="your_gemini_key")
model = genai.GenerativeModel(
    model_name="gemini-pro",
    tools=[{"function_declarations": functions}]
)

chat = model.start_chat()
response = chat.send_message("List my RF-HUBs")

Node.js example:

const { GoogleGenerativeAI } = require('@google/generative-ai');
const axios = require('axios');

const genAI = new GoogleGenerativeAI('your_gemini_key');

// Fetch QtrlMe functions
const { data } = await axios.get('https://qtrl.me/api/gemini/functions', {
  headers: { Authorization: 'Bearer YOUR_TOKEN' }
});

// Use with Gemini
const model = genAI.getGenerativeModel({
  model: 'gemini-pro',
  tools: [{ functionDeclarations: data.functionDeclarations }]
});

const chat = model.startChat();
const result = await chat.sendMessage('List my RF-HUBs');

// Handle function call
const call = result.response.functionCalls()?.[0];
if (call) {
  const executeResult = await axios.post(
    'https://qtrl.me/api/gemini/functions/execute',
    { name: call.name, args: call.args },
    { headers: { Authorization: 'Bearer YOUR_TOKEN' }}
  );

  console.log(executeResult.data.response);
}
Authentication: All requests require your API key as a Bearer token in the Authorization header.

Things you can say

Once connected, you can ask for things like:

  • "Show me the temperature from all my sensors"
  • "Turn on the living room light"
  • "What is the electricity price in SE3 right now, and when is it cheapest tonight?"
  • "List my hubs and their status"
  • "Lower the bedroom blinds"
  • "Create an automation that runs the water heater during the three cheapest hours of the night"
  • "Put the outdoor temperature and the electricity price at the top of my dashboard"

Your API key


Log in to see and use your API keys.

Log in

MCP endpoints