使用说明
homebox-mcp
MCP (Model Context Protocol) server for Homebox home inventory management.
Provides 50+ tools covering the full Homebox API: items, locations, tags, maintenance, attachments, templates, statistics, groups, notifiers, and more.
Setup
Environment Variables
| Variable | Required | Description |
|---|---|---|
HOMEBOX_URL |
Yes | Your Homebox instance URL (e.g., https://homebox.example.com) |
HOMEBOX_USERNAME |
Yes* | Homebox username/email |
HOMEBOX_PASSWORD |
Yes* | Homebox password |
HOMEBOX_TOKEN |
No | Pre-authenticated bearer token (alternative to username/password) |
* Required unless HOMEBOX_TOKEN is provided.
Claude Code
Add to ~/.claude/settings.json:
{
"mcpServers": {
"homebox": {
"command": "node",
"args": ["/path/to/homebox-mcp/dist/index.js"],
"env": {
"HOMEBOX_URL": "https://homebox.example.com",
"HOMEBOX_USERNAME": "your-email",
"HOMEBOX_PASSWORD": "your-password"
}
}
}
}
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"homebox": {
"command": "node",
"args": ["/path/to/homebox-mcp/dist/index.js"],
"env": {
"HOMEBOX_URL": "https://homebox.example.com",
"HOMEBOX_USERNAME": "your-email",
"HOMEBOX_PASSWORD": "your-password"
}
}
}
}
Build
npm install
npm run build
Smoke test
Type-checking cannot catch Homebox API drift — only a real request can. npm run smoke
runs read-only GETs against the configured instance and exits non-zero on the first
mismatch. It never mutates inventory data.
HOMEBOX_URL=... HOMEBOX_USERNAME=... HOMEBOX_PASSWORD=... npm run smoke
Run it after any Homebox upgrade.
API compatibility
Requires Homebox with the merged entities API (upstream PR #1414, post-v0.26.2).
That release collapsed /api/v1/items and /api/v1/locations into /api/v1/entities:
a location is an entity whose entity type has isLocation=true, and an item's location
is simply its parent entity. This server's tool names are unchanged, but it will not
work against older Homebox versions that still serve /items and /locations.
Notes that follow from the merge:
get_custom_field_valuesnow requires afieldargument (the endpoint 422s without it).create_locationresolves the group's location entity type first; creating an entity without an explicitentityTypeIdyields an item, not a location.update_item/update_locationread the current entity and merge, becausePUT /entities/{id}is a full replace.create_item_from_templaterequireslocationId(sent as the entity'sparentId).
Response size
Responses are tuned to keep token usage down:
- JSON is serialized compactly (no pretty-printing).
get_item/batch_get_itemstakeincludeto return only the sections you need (fields,tags,attachments,location,purchase,warranty,sold,notes,details). Basics — id, name, quantity, archived, insured, assetId, timestamps — are always returned. Thelocationsection carries the item's parent entity.- Attachments are compressed to
{id, title, type, primary}. - Mutations (
create_item,update_item,patch_item,batch_update_items) return{id, name, updatedAt}; passverbose: truefor the full entity.
Tools
Items
list_items- Query items with filtering and paginationget_item- Get item details, optionally narrowed withincludecreate_item- Create a new itemupdate_item- Full item update (all fields)patch_item- Partial update (location, quantity, tags)patch_fields- Update only custom fieldsbatch_get_items- Get up to 50 items in one callbatch_update_items- Update up to 50 items in one calldelete_item- Delete an itemduplicate_item- Duplicate an itemget_item_path- Get item's location pathget_item_by_asset_id- Look up by asset IDget_custom_field_names- List custom field namesget_custom_field_values- List values for one custom field (requiresfield)import_items- Import from CSVexport_items- Export to CSV
Locations
list_locations- List all locationsget_location- Get location detailsget_location_tree- Hierarchical location treecreate_location- Create a locationupdate_location- Update a locationdelete_location- Delete a locationlist_entity_types- List entity types (isLocationdecides location vs item)
Tags
list_tags,get_tag,create_tag,update_tag,delete_tag
Maintenance
list_maintenance- List entries (all or per-item)create_maintenance_entry,update_maintenance_entry,delete_maintenance_entry
Attachments
get_attachment,upload_attachment,update_attachment,delete_attachment
Templates
list_templates,get_template,create_template,update_template,delete_template,create_item_from_template
Statistics
get_statistics- Overall inventory statsget_statistics_by_location,get_statistics_by_tag,get_purchase_price_statistics
Groups
get_group,update_group,list_group_members,add_group_member,remove_group_member,list_group_invitations,create_group_invitation
Notifiers
list_notifiers,create_notifier,update_notifier,delete_notifier,test_notifier
Actions
ensure_asset_ids,ensure_import_refs,create_missing_thumbnails,set_primary_photos,zero_item_time_fields,wipe_inventory
Users
get_user_self,update_user_self,change_password
Misc
get_status,get_currencies,search_barcode,export_bill_of_materials