Smart Appliance MCP
Enables discovery and control of smart appliances (TVs, media devices) on the local network through natural language, supporting providers like Roku, Google TV, and Home Assistant.
README
Smart Appliance MCP
An MCP server that lets any MCP-capable LLM client discover and control smart appliances on the local network.
The important design choice is adapter-driven routing:
discover_devicesscans with every registered adapter.- Each discovered device stores its
provider. - Later calls use only
deviceId; the server looks up the device and routes the command to the adapter found during discovery.
That keeps client prompts simple. The LLM client does not need to know whether a TV is Roku, Home Assistant, Samsung, LG, Matter, or something else.
Tools
discover_devices: finds appliances and remembers them for this server session.diagnose_discovery: explains discovery state and likely network blockers without asking users to edit technical config.list_known_devices: returns devices already found.get_device_controls: shows available capabilities for one device.discover_apps: probes app launch targets exposed by a discovered media device.search_apps: searches discovered apps by name, package id, category hints, and launchability.pair_device: starts one-time consumer pairing when a provider requires it.complete_pairing: completes pairing with the code shown on the appliance.list_pairings: lists locally stored pairings.remove_pairing: removes a locally stored pairing.control_device: performs actions such as volume, navigation, power, search, and app launch.search_content: searches installed apps or native content providers when supported.suggest_content: returns adapter-aware viewing suggestions.record_watch_event: remembers watched, liked, dismissed, or started content.list_watch_history: shows the recent local watch history used by recommendations.recommend_content: ranks what to watch next by category, freshness, app, watch history, and app launchability.get_device_state: returns state when an adapter supports it.
Included Adapters
roku: discovers Roku TVs and Roku streaming devices over SSDP and controls them through Roku ECP.smart_appliance_companion: discovers the optional TV-side companion app over mDNS and uses it for installed app listing and package launch.google_tv_remote: discovers Google TV / Android TV devices through mDNS Google Cast signals and DIAL/SSDP, then models the normal remote-style pairing flow.home_assistant: optional broad appliance bridge for TVs, lights, switches, thermostats, and more.google_tv: optional ADB fallback for development/testing only. Enable withENABLE_ADB_ADAPTER=true.
Quick Start
npm install
npm run build
npm start
For local development:
npm run dev
Client Configuration
Build the project, then add a server entry like this to your MCP client:
{
"mcpServers": {
"smart-appliance": {
"command": "node",
"args": ["/absolute/path/to/smart-appliance-mcp/dist/index.js"]
}
}
}
If you use Home Assistant, include:
{
"env": {
"HOME_ASSISTANT_URL": "http://homeassistant.local:8123",
"HOME_ASSISTANT_TOKEN": "your-long-lived-access-token"
}
}
For Google TV / Android TV, use the consumer pairing flow. The server discovers the TV through local-network signals such as mDNS _googlecast._tcp.local and DIAL/SSDP, then carries the address internally on the discovered device record.
The intended user flow is:
Discover my smart appliances.
Pair my living room TV.
Complete pairing with code 123456.
Turn the TV volume up.
Discovered Google TV devices use provider: "google_tv_remote". Pairing state is stored locally and routed through the same adapter registry as every other provider.
The Google TV remote adapter includes local discovery, consumer pairing, live remote controls, app launch probing, and adapter-routed command execution. The ADB adapter and GOOGLE_TV_REMOTE_DEVICES override remain available only as opt-in development diagnostics, not normal user setup.
App discovery is intentionally adapter-driven too. On Google TV, discover_apps probes launch surfaces the TV exposes locally, such as DIAL /apps/<name> endpoints. If the TV does not expose an installed app list through the consumer remote or DIAL interfaces, the server reports that clearly instead of pretending a guessed package name or browser URL is a discovered app launch path.
For the best Google TV experience, install the optional companion app from companion/google-tv. The companion runs on the TV, advertises _smart-appliance._tcp.local, lists installed Leanback launcher apps with Android PackageManager, and launches apps locally by package name. This is the normal-user path for apps like Crunchyroll that do not expose DIAL launch endpoints.
Recommendations
The recommendation layer is local-first and adapter-aware:
- Adapter watch history is used first when the discovered device can provide it.
record_watch_eventstores lightweight local fallback history, including app, title, categories, progress, and status.recommend_contentmerges TV-sourced history, local fallback history, a provided content catalog, and starter rows.- Results are scored for freshness, category overlap with recent viewing, app availability, launchability, and seen/dismissed state.
- The response separates fresh
recommendationsfromalreadyWatchedanddismissedmatches. - Each recommendation includes
userSummary/userReasonsfor clean user-facing answers, plus detailed fields for internal planning. - Actionable recommendation rows include artwork and actions:
artwork.thumbnailUrl,posterUrl, andbackdropUrlfor images.actions.previewfor trailers or preview clips when a catalog suppliespreviewUrl/trailerUrl.actions.primaryas the one-click watch action, expressed as an MCP tool call payload.
chatCardsandformat_recommendation_cardsrender the same results for chat clients:- Images are included only when the catalog supplies title-specific artwork.
- Preview links use normal web URLs.
- Watch/search links use
mcp://action?...URLs that describe the MCP tool call for the host client to confirm and execute.
If the current adapter cannot provide TV watch history, list_watch_history, recommend_content, and format_recommendation_cards return an optional companionPrompt. Google TV's consumer remote protocol does not expose private per-app streaming history, so exact content history requires a provider integration or an optional TV-side companion source.
Provider catalogs change constantly, so production clients should pass fresh catalog rows into recommend_content from a provider integration, search connector, or user-owned media source. The MCP does not claim live Netflix/Crunchyroll catalogs unless an adapter or connector supplies them.
Frontend Watch Queue
Run a local UI for actionable recommendations:
npm run ui
Open http://localhost:5177. The UI renders MCP recommendation output as cards with artwork, preview, one-click watch actions, filtering, search, and an already-watched panel. Use the {} button to paste a recommend_content response from any LLM client.
For chat-native cards, call format_recommendation_cards with the same inputs as recommend_content. It returns cards plus Markdown, using links instead of buttons. By default, links point at the local UI action endpoint, so keep npm run ui running:
[Watch on TV](http://127.0.0.1:5177/api/actions/run?payload=...)
Use linkMode: "mcp_scheme" if a host client supports mcp://action?... links directly.
Example Tool Flow
First ask the client:
Discover my smart appliances.
Then:
Turn the living room TV volume up.
The MCP server handles the routing internally:
const device = registry.getDevice(deviceId);
const adapter = registry.adapterFor(device);
await adapter.control(device, request);
Adding a New Adapter
Create a class that implements SmartApplianceAdapter:
export class SamsungTizenAdapter implements SmartApplianceAdapter {
readonly id = "samsung_tizen";
readonly label = "Samsung Tizen TV";
async discover(options: DiscoveryOptions): Promise<SmartDevice[]> {
return [];
}
async control(device: SmartDevice, request: ControlRequest) {
return { ok: true };
}
}
Then register it in src/index.ts:
registry.register(new SamsungTizenAdapter());
Discovery remains the source of truth. Once a Samsung TV is discovered with provider: "samsung_tizen", all future commands for that deviceId route to the Samsung adapter automatically.
Notes
- Local-network discovery depends on your network allowing multicast/SSDP.
- Some TV ecosystems require pairing before control; those adapters should expose a pairing flow as an MCP tool or resource.
- Content recommendations are adapter-aware but can be made stronger by combining device capabilities with the host LLM client's taste/profile context.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。