Lifx API MCP Server (Furey)

MCPAI代理

提供方 未标注

AI代理 HTTP · 远程 未标注 社区 / 第三方
查看接入方式

全面解析Lifx Api MCP ServerMCP Server的核心功能、安装配置和实用案例。作为顶级Model Context Protocol服务器,Lifx Api MCP Server能让AI助手访问实时数据、执行操作,为您提供更智能的工作体验和自动化解决方案。

一句话选型结论

按资料字段整理

Lifx API MCP Server (Furey) 属于AI代理类 MCP 服务器,HTTP · 远程,鉴权方式未标注,有可直接复制的远程端点配置。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类AI代理 传输方式HTTP · 远程 鉴权未标注 部署方式远程部署
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

AI代理
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

安装与配置

HTTP · 远程 未标注
连远程 HTTPS 端点,通常为 Streamable HTTP
npx -y lifx-api-mcp-server@latest\

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    确认你的客户端支持远程端点,并拿到服务地址。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
给代理接外部能力

让代理在任务中途调用搜索、数据库等真实工具。

多步任务编排

把一串操作拆成步骤,由代理按顺序执行。

自动化重复流程

把固定流程交给代理跑,减少手工操作。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。

先想清楚的地方

  • 远程端点依赖网络与服务方可用性,注意密钥与调用额度。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Lifx API MCP Server (Furey)当前 未标注 HTTP · 远程 远程部署 有 2026-05-17
Filesystem 560c4363 13 未标注 本地部署 无 2026-05-17
Server Everything (everything) 11 stdio · 本地进程 本地部署 有 2026-05-17
Time 7365cb6d 2 SSE · 服务端推送 远程部署 有 2026-05-18
Everything Claude Code 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Openmemory 557e1585 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

AI代理
字段来自项目仓库与公开索引,中文说明由本站标注
提供方未标注上游标注的维护方 未标注
分类AI代理本站按上游分类展示
连接方式HTTP · 远程连远程 HTTPS 端点,通常为 Streamable HTTP
鉴权方式未标注远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · Node.js本地安装时用到的包标识与运行时
部署类型远程部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

17.1 KB
来自项目仓库与上游目录的原文,未做删改

LIFX API MCP Server

LIFX API MCP Server is a local Model Context Protocol (MCP) server providing access to LIFX devices using natural language via LLMs to perform actions like listing lights, setting states, activating scenes, and triggering effects through the LIFX HTTP API. Includes contextual resources and helpful prompts.

Contents

  • Quick Start
  • Features
  • Installation
  • Configuration
  • Client Setup
  • Data Protection
  • Tutorial
  • Dockerfile
  • Disclaimer
  • Support

Quick Start

  1. Get a LIFX API Token:
    • Go to your LIFX Cloud settings page.
    • Generate a new personal access token. Keep this token secure!
  2. Install LIFX MCP Server: (Choose one method)
    • NPX (Recommended):console npx -y lifx-api-mcp-server@latest
    • Docker:console docker run --rm -i --network=host --pull=always furey/lifx-api-mcp-server
  3. Configure API Token:
    • Crucial Step: Set your token via one of these methods (priority order):
      1. Config File (Recommended): Edit ~/.lifx-api-mcp-server.jsonc (generate with npx -y lifx-api-mcp-server@latest config:create) and add your token to the apiToken field.
      2. Environment Variable: Set CONFIG_API_TOKEN=YOUR_LIFX_API_TOKEN.
      3. Command Line Argument (Least Recommended): Pass the token when running the server (e.g., npx ... YOUR_TOKEN).
  4. Set up MCP Client:
    • Configure your client (e.g., Claude Desktop, MCP Inspector) to launch the server without the token argument if using config/env.
  5. Control Your Lights:
    • Start interacting with your LIFX devices using natural language (see Tutorial). Use resources like @lix-api:lifx://lights and prompts like @lix-api:effect-creator.

Features

Tools

  • list-lights: Gets lights belonging to the account, filterable by selector.
  • set-state: Sets the state (power, color, brightness, etc.) of selected lights.
  • set-states: Sets multiple states across multiple selectors in one request.
  • state-delta: Changes state properties (brightness, hue, saturation, kelvin, infrared) by a relative amount.
  • toggle-power: Toggles the power state of selected lights.
  • breathe-effect: Performs a breathe (fade) effect.
  • pulse-effect: Performs a pulse (flash) effect.
  • move-effect: Performs a move effect on linear devices (LIFX Z strips).
  • morph-effect: Performs a morph effect on Tile devices.
  • flame-effect: Performs a flame effect on Tile devices.
  • clouds-effect: Performs a clouds effect on Tile devices (FW >= 4.8).
  • sunrise-effect: Performs a sunrise effect on Tile devices (FW >= 4.8).
  • sunset-effect: Performs a sunset effect on Tile devices (FW >= 4.8).
  • effects-off: Turns off any running effects.
  • list-scenes: Lists available scenes in the account.
  • activate-scene: Activates a specified scene by its UUID.
  • cycle: Cycles selected lights through a list of predefined states.
  • validate-color: Validates a color string and returns its components.
  • clean: Controls LIFX Clean devices.

Resources

  • lifx://lights: Provides a summary list of available lights (ID, Label, Power, Connected). Fetches live data.
  • lifx://light/{selector}/state: Provides the detailed current state for the light(s) matching the selector. Supports autocompletion for selectors. Fetches live data.
  • lifx://scenes: Provides a list of available scenes (Name, UUID). Fetches live data.

Prompts

  • effect-creator: Guides the user through creating effect parameters and generates the corresponding tool command.
  • troubleshooter: Helps diagnose basic connectivity issues for specific lights by checking their status (fetches live data).
  • selector-helper: Lists available identifiers (labels, groups, locations, IDs) from live data to help users construct accurate selectors.

Other Features

  • Config File: Customize settings via ~/.lifx-api-mcp-server.jsonc.
  • Environment Variables: Override config settings (e.g., CONFIG_API_TOKEN, CONFIG_LOG_LEVEL).
  • Component Disabling: Selectively disable tools, resources, or prompts via config.
  • Direct API Mapping: Tools generally correspond 1:1 with LIFX API endpoints.
  • Error Handling: Provides feedback based on LIFX API responses and HTTP status codes.
  • Selector Support: Uses LIFX selectors (all, id:, label:, etc.) for targeting lights.
  • Color Support: Accepts standard LIFX color strings.
  • Docker Support: Run easily within a Docker container.

Installation

LIFX MCP Server can be installed and run in several ways:

  • NPX (Easiest)
  • Docker Hub
  • Node.js from Source
  • Docker from Source

Installation: NPX

> [!NOTE]

> NPX requires Node.js (v18+) installed.```console

Ensure Node.js v18+ is installed

node --version

Run the server (token should ideally be set via config/env)

npx -y lifx-api-mcp-server@latest [YOUR_LIFX_API_TOKEN_IF_NEEDED]


### Installation: Docker Hub

> [!NOTE]

> Requires Docker installed.```console
# Ensure Docker is installed
docker --version

# Run the server (token should ideally be set via config/env)
# Mount config file (recommended):
docker run --rm -i --network=host \
  -v ~/.lifx-api-mcp-server.jsonc:/root/.lifx-api-mcp-server.jsonc:ro \
  --pull=always furey/lifx-api-mcp-server

# OR pass token via environment variable:
docker run --rm -i --network=host \
  -e CONFIG_API_TOKEN=YOUR_LIFX_API_TOKEN \
  --pull=always furey/lifx-api-mcp-server

# OR pass token as argument (least recommended):
docker run --rm -i --network=host \
  --pull=always furey/lifx-api-mcp-server YOUR_LIFX_API_TOKEN

(Replace furey/lifx-api-mcp-server with the actual Docker Hub image name if different)

Installation: Node.js from Source

> [!NOTE]

> Requires Node.js (v18+) and npm/yarn installed.

  1. Clone the repository (replace with actual URL if published):console git clone https://github.com/furey/lifx-api-mcp-server.git # Placeholder cd lifx-api-mcp-server
  2. Install dependencies:console npm install
  3. Run the server (token should ideally be set via config/env):console node lifx-api-mcp-server.js [YOUR_LIFX_API_TOKEN_IF_NEEDED]

Installation: Docker from Source

> [!NOTE]

> Requires Docker installed.

  1. Clone the repository:console git clone https://github.com/furey/lifx-api-mcp-server.git # Placeholder cd lifx-api-mcp-server
  2. Build the Docker image:console docker build -t lifx-mcp-server .
  3. Run the container (token should ideally be set via config/env):```console
    # Using mounted config file (recommended):
    docker run --rm -i --network=host \
    -v ~/.lifx-api-mcp-server.jsonc:/root/.lifx-api-mcp-server.jsonc:ro \
    lifx-mcp-server

    Using environment variable:

    docker run --rm -i --network=host \
    -e CONFIG_API_TOKEN=YOUR_LIFX_API_TOKEN \
    lifx-mcp-server

    Using argument (least recommended):

    docker run --rm -i --network=host \
    lifx-mcp-server YOUR_LIFX_API_TOKEN
    ```

Installation Verification

When the server starts successfully, you should see output like:```
[LIFX MCP] LIFX API MCP Server vX.Y.Z starting…
[LIFX MCP] Loading config file: /path/to/.lifx-api-mcp-server.jsonc (or 'No config file found')
[LIFX MCP] Initializing MCP server…
[LIFX MCP] Registering MCP resources…
[LIFX MCP] Total MCP resources registered: X
[LIFX MCP] Registering MCP prompts…
[LIFX MCP] Total MCP prompts registered: Y
[LIFX MCP] Registering MCP tools…
[LIFX MCP] Total MCP tools registered: Z
[LIFX MCP] Creating stdio transport…
[LIFX MCP] Connecting MCP server transport…
[LIFX MCP] LIFX API MCP Server running.


## Configuration

Customize the server's behavior via a config file or environment variables. The API token is the most critical setting.

### Configuration: API Token (Priority Order)

1.  **Config File (`apiToken` key):** Create/edit `~/.lifx-api-mcp-server.jsonc`. (Recommended)
2.  **Environment Variable (`CONFIG_API_TOKEN`):** Set `CONFIG_API_TOKEN=YOUR_TOKEN`.
3.  **Command Line Argument:** Pass token as the first argument when running the script. (Least Recommended)

### Configuration: Config File

Create a configuration file at `~/.lifx-api-mcp-server.jsonc` (or `.json`). Use `npx -y lifx-api-mcp-server@latest config:create` to generate it.

  Example configuration file (`~/.lifx-api-mcp-server.jsonc`)```jsonc
{
  // Your LIFX Personal Access Token (Required if not using ENV or CLI arg)
  // Get from: https://cloud.lifx.com/settings
  "apiToken": "YOUR_LIFX_API_TOKEN_HERE",

  // Log level: "info" (default) or "verbose" for more detailed logs including rate limits
  "logLevel": "info",

  // --- Optional: Disable specific components ---
  // Add component names here to disable them. Examples:
  // "disabled": {
  //   "tools": ["clean", "cycle"], // Disable specific tools
  //   "resources": ["scenes"],     // Disable the scenes resource
  //   "prompts": true              // Disable all prompts
  // },
  "disabled": {
    "tools": [],
    "resources": [],
    "prompts": []
  },

  // --- Optional: Enable only specific components ---
  // If an 'enabled' array is defined, ONLY those components of that type will be enabled,
  // overriding any 'disabled' settings for that type. Examples:
  // "enabled": {
  //    "tools": ["list-lights", "set-state"], // Only enable these two tools
  //    "resources": ["lights"]                // Only enable the lights resource
  // }
  "enabled": {
    "tools": null,
    "resources": null,
    "prompts": null
  }
}

Configuration: Config File Generation

You can generate a default configuration file automatically:```console

NPX Usage (recommended)

npx -y lifx-api-mcp-server@latest config:create

Node.js Usage (from source directory)

npm run config:create

Force overwrite existing file

npx -y lifx-api-mcp-server@latest config:create -- --force
npm run config:create -- --force

Specify custom path/filename (uses CONFIG_PATH env var)

CONFIG_PATH=/path/to/my-lifx-config.jsonc npm run config:create

This saves the example config content to `~/.lifx-api-mcp-server.jsonc` by default.

### Configuration: Environment Variable Overrides

Settings can be overridden using environment variables (take precedence over config file).

| Config Setting          | Environment Variable Override     | Example Value             |
| :---------------------- | :-------------------------------- | :------------------------ |
| `apiToken`              | `CONFIG_API_TOKEN`                | `c0ffee...`               |
| `logLevel`              | `CONFIG_LOG_LEVEL`                | `verbose`                 |
| `disabled.tools`        | `CONFIG_DISABLED_TOOLS`           | `clean,cycle` / `true`    |
| `enabled.tools`         | `CONFIG_ENABLED_TOOLS`            | `list-lights,set-state`   |
| `disabled.resources`    | `CONFIG_DISABLED_RESOURCES`       | `scenes` / `true`         |
| `enabled.resources`     | `CONFIG_ENABLED_RESOURCES`        | `lights,light-state`      |
| `disabled.prompts`      | `CONFIG_DISABLED_PROMPTS`         | `troubleshooter` / `true` |
| `enabled.prompts`       | `CONFIG_ENABLED_PROMPTS`          | `effect-creator`          |

**Example Usage:**```console
# Set token and log level via environment variables when using NPX
CONFIG_API_TOKEN=YOUR_TOKEN CONFIG_LOG_LEVEL=verbose npx -y lifx-api-mcp-server@latest

# Same example using Docker
docker run --rm -i --network=host \
  -e CONFIG_API_TOKEN=YOUR_TOKEN \
  -e CONFIG_LOG_LEVEL=verbose \
  --pull=always furey/lifx-api-mcp-server

Client Setup

Configure your MCP client (e.g., Claude Desktop, MCP Inspector) to launch the lifx-api-mcp-server. Important: If you've configured the API token via the config file or environment variable, do not pass it as an argument in the client setup.

Client Setup: Claude Desktop

  1. Install Claude Desktop.
  2. Locate or create claude_desktop_config.json:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  3. Add the server configuration (adjust paths as needed):```json
    {
    "mcpServers": {
    "lix-api": {
    // Use the full path to npx if it's not in your default PATH
    "command": "/path/to/your/npx", // Or node
    "args": [
    // NPX example: (NO TOKEN HERE if set in config/env)
    "-y",
    "lifx-api-mcp-server@latest"
        // Node.js from source example: (NO TOKEN HERE if set in config/env)
        // "/path/to/lifx-api-mcp-server/lifx-api-mcp-server.js"
      ],
      "env": {
         // Optional: Uncomment for verbose logging
         // "CONFIG_LOG_LEVEL": "verbose"
         // Optional: Set token via env if not using config file
         // "CONFIG_API_TOKEN": "YOUR_LIFX_API_TOKEN"
      }
    }
    

    }
    }
    ```
    4. Restart Claude Desktop.
    5. Start a chat and try interacting with your lights (e.g., "@lix-api list my lights").

Client Setup: MCP Inspector

MCP Inspector is useful for debugging.```console

Run MCP Inspector with the LIFX server (NO TOKEN HERE if set in config/env)

npx -y @modelcontextprotocol/inspector npx -y lifx-api-mcp-server@latest

Open the inspector in your browser (usually http://localhost:5173)


## Data Protection

*   **API Token Security:** Your LIFX API token grants control over your lights. **Keep it confidential.** Using the config file (`~/.lifx-api-mcp-server.jsonc` with appropriate file permissions) or environment variables is safer than passing the token as a command-line argument, especially in shared environments or logs.
*   **Data Flow:** When using a remote LLM (like via Claude Desktop), your prompts *to* the LLM and the *results* returned by this MCP server (light names, states, scene names) will be sent to the LLM provider. Be mindful of potentially sensitive information in your light/group/location/scene labels if privacy is a major concern.
*   **Local Execution:** This server runs locally on your machine. It communicates directly with the LIFX cloud API over HTTPS.

## Tutorial

Ensure the server is running and connected to your MCP client. Replace placeholders like `label:MyLamp` with your actual light/group/location labels or IDs.

1.  **Check Available Lights (Resource):**
    *   `@lix-api:lifx://lights`
    *   ➥ Uses `lights` resource

2.  **Get Specific Light State (Resource):**
    *   `@lix-api:lifx://light/label:Office Lamp/state`
    *   ➥ Uses `light-state` resource

3.  **Get Available Scenes (Resource):**
    *   `@lix-api:lifx://scenes`
    *   ➥ Uses `scenes` resource

4.  **Use Selector Helper (Prompt):**
    *   `@lix-api:selector-helper goal: "the lights in the kitchen"`
    *   ➥ Uses `selector-helper` prompt

5.  **Create an Effect (Prompt):**
    *   `@lix-api:effect-creator effect_type:breathe selector:all description:"a very slow fade to warm white"`
    *   ➥ Uses `effect-creator` prompt (follow instructions in response)

6.  **Troubleshoot a Light (Prompt):**
    *   `@lix-api:troubleshooter selector:"id:d073d5xxxxxx"`
    *   ➥ Uses `troubleshooter` prompt

7.  **List Your Lights (Tool):**
    *   _"list my lights"_ or _"list lights selector:all"_
    *   ➥ Uses `list-lights` tool

8.  **Turn a Light On (Tool):**
    *   _"turn on the lamp named Office Lamp"_ or _"set state selector:label:Office Lamp power:on"_
    *   ➥ Uses `set-state` tool

9.  **Set Color and Brightness (Tool):**
    *   _"set the Kitchen group lights to blue at 50% brightness over 3 seconds"_
    *   _"set state selector:group:Kitchen color:blue brightness:0.5 duration:3"_
    *   ➥ Uses `set-state` tool

10. **Toggle a Location (Tool):**
    *   _"toggle the lights in the Living Room"_ or _"toggle power selector:location:Living Room"_
    *   ➥ Uses `toggle-power` tool

11. **Increase Brightness (Tool):**
    *   _"make all lights 10% brighter"_ or _"state delta selector:all brightness:0.1"_
    *   ➥ Uses `state-delta` tool

12. **Activate a Scene (Requires Scene UUID from Resource/Tool):**
    *   _"activate scene with uuid abcdef12-3456-..."_
    *   _"activate scene scene_uuid:abcdef12-3456-..."_
    *   ➥ Uses `activate-scene` tool

## Dockerfile```dockerfile
FROM node:18-alpine

WORKDIR /app

# Copy package files
COPY package*.json ./

# Install dependencies cleanly
# Using --omit=dev because devDependencies are not needed in production
RUN npm ci --omit=dev --production --no-fund --no-audit

# Copy the rest of the application code
COPY . .

# Set the entrypoint
ENTRYPOINT ["node", "lifx-api-mcp-server.js"]

# Default command (can be overridden, e.g., with API token if not using config/env)
# CMD ["YOUR_DEFAULT_TOKEN_IF_NEEDED"]

Disclaimer

  • This software is provided "as is", without warranty of any kind. Use at your own risk.
  • The author is not affiliated with LIFX (LiFi Labs Inc.).
  • Ensure you understand the LIFX API rate limits (120 requests/minute per token) to avoid temporary blocks. Rate limit information is logged if logLevel is verbose.
  • This server was partially generated with AI assistance and may contain bugs.

Support

If you find this tool useful, consider supporting the developer (optional):

Buy Me a Coffee | GitHub Sponsorship

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
Lifx API MCP Server (Furey) 怎么安装?

在客户端按下面的安装命令接入:npx -y lifx-api-mcp-server@latest\。装完在客户端配置里引用同一个包或端点。

Lifx API MCP Server (Furey) 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

Lifx API MCP Server (Furey) 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Lifx API MCP Server (Furey) 需要 API Key 吗?

资料没有标注鉴权方式,是否需要密钥取决于服务本身,接入前按官方文档确认。

Lifx API MCP Server (Furey) 能提供哪些能力?

资料显示能力标签包括 智能家居、JavaScript、自然语言、HTTP。具体工具清单以官方文档为准。

Lifx API MCP Server (Furey) 需要什么运行环境?

运行时为 Node.js;属于远程端点,不需要在本地装运行时。

Lifx API MCP Server (Furey) 是本地还是远程?

它是远程端点,连服务地址即可。传输方式为HTTP · 远程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。