Homebox MCP Server

Homebox MCP Server

Enables AI assistants to manage inventory items, locations, and labels in a self-hosted Homebox instance using natural language, with support for flexible URL configurations.

Category
访问服务器

README

Homebox MCP Server

npm version npm downloads License: MIT Work in Progress

alt text

A Model Context Protocol (MCP) server for interacting with Homebox, a self-hosted inventory management system.

Source Project: Homebox | Documentation

Overview

This MCP server enables AI assistants (like Claude or LM Studio) to interact with your Homebox instance using natural language. You can manage your inventory, create items, update locations, search for items, and more.

Want to use this with local AI? Check out our Local AI Stack Example for detailed setup instructions using LM Studio + Qwen 3 8B or other local LLMs with function calling support.

Features

  • Item Management

    • List all inventory items with filtering and pagination
    • Get detailed information about specific items
    • Create new inventory items
    • Update existing items (including parent-child relationships)
    • Delete items
    • Search items by query
    • Parent-child item relationships (e.g., items stored inside other items)
    • Automatic web links for all items and parent items
  • Location Management

    • List all storage locations
    • Create new locations (with support for nested/hierarchical locations)
    • Automatic web links for all locations
  • Label Management

    • List all labels/tags
    • Create new labels with custom colors
  • Flexible URL Configuration

    • Separate LAN and WAN URL support
    • Automatic URL generation for items, locations, and labels
    • Switch between local and public URLs based on your network context
    • All API calls use efficient LAN access, web links adapt to your needs

Prerequisites

  • Node.js 18+ or later
  • A running Homebox instance
  • Either a Homebox API key (recommended) OR username and password

Installation

Option 1: Install from npm (Recommended)

The easiest way to get started is to install the package directly from npm:

npm install -g homebox-mcp

Note: This is currently a proof-of-concept/work in progress. Features may change and improvements are ongoing.

Updating

To update to the latest version from npm:

Linux/macOS:

./update.sh

Windows:

update.bat

Or manually:

npm update -g homebox-mcp

Option 2: Install from Source

  1. Clone this repository:
git clone https://github.com/danielrosehill/Homebox-MCP-1125.git
cd Homebox-MCP-1125
  1. Install dependencies:
npm install
  1. Build the server:
npm run build

Configuration

The MCP server supports flexible URL configuration for both LAN and WAN access:

Environment Variables

  • HOMEBOX_LOCAL_URL - LAN URL for your Homebox instance (e.g., http://10.0.0.4:7745)
  • HOMEBOX_WAN_URL - (Optional) WAN/public URL for external access (e.g., https://homebox.yourdomain.com)
  • USE_LAN_API - (Optional) Use LAN for API calls (default: true). Set to false to use WAN for API
  • LAN_LINKS - (Optional) Use LAN for display links (default: false). Set to true to force LAN links

Authentication (choose one):

  • HOMEBOX_API_KEY - (Recommended) Persistent API key from Homebox. If provided, username/password are ignored.
  • HOMEBOX_USERNAME - Your Homebox username (email) - only needed if not using API key
  • HOMEBOX_PASSWORD - Your Homebox password - only needed if not using API key

Note: If both HOMEBOX_API_KEY and username/password are provided, the API key takes precedence. API keys are recommended as they don't require token refresh and provide more reliable authentication.

URL Selection Logic:

For API calls:

  • By default, uses LAN (USE_LAN_API=true) for faster performance
  • Set USE_LAN_API=false to use WAN for API calls

For web links:

  • By default, uses WAN if available (LAN_LINKS=false)
  • If WAN URL is not set, falls back to LAN
  • Set LAN_LINKS=true to force LAN links even when WAN is available

How It Works:

  • API calls default to LAN for speed (configurable with USE_LAN_API)
  • Web links default to WAN for shareability (configurable with LAN_LINKS)
  • This gives you full control over which URL is used for each purpose

Note: When using username/password authentication, the MCP server automatically handles login and token refresh. When using an API key, no token refresh is needed.

Screenshots For POC

LM Studio

Asset search:

alt text

Env variable configuration:

alt text

Env variables for LAN and WAN instance URLs:

alt text

MCP tools (LM Studio, Qwen 3)

alt text

Retrieve asset URL from asset ID:

alt text


Streamlit

alt text

alt text


Claude Code

Configure by adding array with env variables to .mcp.json (note the trailing dot)

alt text

alt text

alt text


MCP Configuration

Using npm Package (Recommended)

With API Key (Recommended)

{
  "mcpServers": {
    "homebox": {
      "command": "npx",
      "args": ["homebox-mcp"],
      "env": {
        "HOMEBOX_LOCAL_URL": "http://10.0.0.4:7745",
        "HOMEBOX_API_KEY": "your_api_key_here"
      }
    }
  }
}

With Username/Password (LAN Only)

{
  "mcpServers": {
    "homebox": {
      "command": "npx",
      "args": ["homebox-mcp"],
      "env": {
        "HOMEBOX_LOCAL_URL": "http://10.0.0.4:7745",
        "HOMEBOX_USERNAME": "your_email@example.com",
        "HOMEBOX_PASSWORD": "your_password"
      }
    }
  }
}

Alternative: Using Global Install

If you installed globally with npm install -g homebox-mcp:

{
  "mcpServers": {
    "homebox": {
      "command": "homebox-mcp",
      "env": {
        "HOMEBOX_LOCAL_URL": "http://10.0.0.4:7745",
        "HOMEBOX_API_KEY": "your_api_key_here"
      }
    }
  }
}

Or with username/password:

{
  "mcpServers": {
    "homebox": {
      "command": "homebox-mcp",
      "env": {
        "HOMEBOX_LOCAL_URL": "http://10.0.0.4:7745",
        "HOMEBOX_USERNAME": "your_email@example.com",
        "HOMEBOX_PASSWORD": "your_password"
      }
    }
  }
}

Using Source Installation

If you cloned the repository and built from source:

{
  "mcpServers": {
    "homebox": {
      "command": "node",
      "args": ["/path/to/Homebox-MCP-1125/dist/index.js"],
      "env": {
        "HOMEBOX_LOCAL_URL": "http://10.0.0.4:7745",
        "HOMEBOX_USERNAME": "your_email@example.com",
        "HOMEBOX_PASSWORD": "your_password"
      }
    }
  }
}

WAN Links (automatic when WAN URL is provided)

Given that Homebox is a home inventory system, using the LAN for API calls is preferred where available. Many folks also use WAN URLs to bind to stickers/NFC tags so that they can be read when not on the LAN.

For that reason, env parameters for both WAN and LAN URLs are provided, along with booleans for the preferred URL construction pattern for asset links.

This provides flexibility and accommodates users who want LAN for API but WAN for link presentation:

Using npx (Recommended)

{
  "mcpServers": {
    "homebox": {
      "command": "npx",
      "args": ["homebox-mcp"],
      "env": {
        "HOMEBOX_LOCAL_URL": "http://10.0.0.4:7745",
        "HOMEBOX_WAN_URL": "https://homebox.yourdomain.com",
        "HOMEBOX_USERNAME": "your_email@example.com",
        "HOMEBOX_PASSWORD": "your_password"
      }
    }
  }
}

Force LAN Links (even with WAN URL configured)

{
  "mcpServers": {
    "homebox": {
      "command": "npx",
      "args": ["homebox-mcp"],
      "env": {
        "HOMEBOX_LOCAL_URL": "http://10.0.0.4:7745",
        "HOMEBOX_WAN_URL": "https://homebox.yourdomain.com",
        "LAN_LINKS": "true",
        "HOMEBOX_USERNAME": "your_email@example.com",
        "HOMEBOX_PASSWORD": "your_password"
      }
    }
  }
}

Use WAN for API (not recommended - slower)

{
  "mcpServers": {
    "homebox": {
      "command": "npx",
      "args": ["homebox-mcp"],
      "env": {
        "HOMEBOX_LOCAL_URL": "http://10.0.0.4:7745",
        "HOMEBOX_WAN_URL": "https://homebox.yourdomain.com",
        "USE_LAN_API": "false",
        "HOMEBOX_USERNAME": "your_email@example.com",
        "HOMEBOX_PASSWORD": "your_password"
      }
    }
  }
}

For LM Studio

  1. Open LM Studio
  2. Go to Settings → MCP Servers
  3. Add a new server with the following configuration:
    • Name: Homebox
    • Command: npx (or homebox-mcp if globally installed)
    • Args: homebox-mcp (if using npx; leave empty if using global install)
    • Environment Variables:
      • HOMEBOX_LOCAL_URL: http://10.0.0.4:7745
      • HOMEBOX_WAN_URL: https://homebox.yourdomain.com (optional, leave empty for LAN-only)
      • USE_LAN_API: true (optional, default: true - use LAN for API calls)
      • LAN_LINKS: false (optional, default: false - use WAN for links when available)
      • Authentication (choose one):
        • HOMEBOX_API_KEY: your_api_key_here (recommended)
        • OR both HOMEBOX_USERNAME and HOMEBOX_PASSWORD

For Other MCP Clients

Use the following configuration as a reference:

{
  "mcpServers": {
    "homebox": {
      "command": "npx",
      "args": ["homebox-mcp"],
      "env": {
        "HOMEBOX_LOCAL_URL": "http://10.0.0.4:7745",
        "HOMEBOX_WAN_URL": "https://homebox.yourdomain.com",
        "HOMEBOX_API_KEY": "your_api_key_here"
      }
    }
  }
}

Note: When both HOMEBOX_LOCAL_URL and HOMEBOX_WAN_URL are provided, the server automatically uses WAN URLs for web links. Set LAN_LINKS=true to force LAN links instead.

Usage Examples

Once configured, you can interact with your Homebox inventory using natural language:

Listing Items

"Show me all my inventory items" "List items in my garage location"

Getting Item Links

"Get the link for asset 003-168" "Get the link for asset 5451" "What's the link to my Thai cookbook?" "Get me the link for the bag of cables"

The server automatically uses Homebox's # prefix for asset ID searches, so queries like "5451" or "003-539" will find exact asset ID matches.

The server will return a direct clickable link like:

 DIRECT LINK: http://10.0.0.4:7745/item/cd8dee2f-9f5b-4f10-a05b-c952c1deafc5

Searching

"Find all items related to networking" "Search for items with 'laptop' in the name"

Creating Items

"Create a new item called 'Dell Monitor' in my office location" "Add a new inventory item: Samsung SSD 1TB, model 870 EVO, serial number ABC123" "Create a new item called 'USB Cable' inside the electronics box" (requires parent item ID)

Updating Items

"Update the quantity of item [ID] to 5" "Change the location of my laptop to the office"

Parent-Child Item Relationships

"Set the parent of [item ID] to [parent item ID]" "Move this item into that box" (requires item IDs) "Remove the parent from [item ID]" "Take this item out of its container"

Custom Fields

"Add a text field called 'ISBN' with value '978-0-123456-78-9' to item [ID]" "Add a number field called 'Weight' with value 2.5 to item [ID]" "Add a boolean field called 'Fragile' with value true to item [ID]" "Remove the field 'ISBN' from item [ID]"

Managing Locations

"List all my storage locations" "Create a new location called 'Workshop' under 'Garage'"

Managing Labels

"Show me all my labels" "Create a new label called 'Electronics' with color #0000FF"

Local AI Setup

Example config:

Available Tools

Items

  • list_items - List inventory items with optional filtering
  • get_item - Get detailed information about a specific item
  • get_item_link - Get direct link to an item by asset ID, name, or description (recommended for getting links!)
  • create_item - Create a new inventory item
  • update_item - Update an existing item
  • delete_item - Delete an item
  • search_items - Search for items using a query string
  • set_item_parent - Set or change the parent item for an item (creates parent-child relationship)
  • remove_item_parent - Remove the parent relationship from an item
  • add_item_field - Add or update a custom field on an item (supports text, number, boolean, time types)
  • remove_item_field - Remove a custom field from an item

Locations

  • list_locations - List all storage locations
  • create_location - Create a new location

Labels

  • list_labels - List all labels/tags
  • create_label - Create a new label

Development

Running in Development Mode

npm run dev

Building

npm run build

Running the Built Version

npm start

Example:

When you search for "003-168":
- The MCP server finds the item with assetId "003-168"
- Homebox returns both the assetId AND the UUID
- The URL is built using the UUID: http://10.0.0.4:7745/item/cd8dee2f-9f5b-4f10-a05b-c952c1deafc5

Database Schema: For detailed database schema information and ERD diagrams, see the docs/db-schema/ directory which includes both PDF and PNG exports of the full schema and items-specific schema.

License

MIT

Author

Daniel Rosehill

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选