- Google Home MCP Server
Google Home MCP Server
Content
Google Home MCP Server
An MCP server implementation for controlling Google Home smart plugs through the Smart Home API.
Features
- List all available smart plugs and their states
- Control smart plugs (turn on/off)
- Get real-time state of specific smart plugs
- Automatic device state refresh
- OAuth2 authentication with Smart Home API
Prerequisites
- Google Cloud Project with Smart Home API enabled
- Actions on Google Smart Home Action project
- OAuth 2.0 Client credentials for Smart Home Action
- Node.js 18 or higher
- Access to Google Home smart plugs
Setup
-
Create a Smart Home Action:
- Go to Actions on Google Console
- Create a new project
- Choose "Smart Home" as the project type
- Configure Account Linking:
- OAuth Client ID
- OAuth Client Secret
- Authorization URL
- Token URL
-
Set up OAuth 2.0:
- Configure your OAuth server endpoints
- Set up user authentication flow
- Implement token generation/validation
-
Install dependencies:
pnpm install
-
Configure the server:
- Copy
config.json.exampletoconfig.json - Fill in your:
- OAuth Client ID
- OAuth Client Secret
- Copy
-
Build the server:
pnpm build
- Start the server:
pnpm start
Available Tools
1. List Smart Plugs
{
name: "list_smart_plugs",
description: "List all available smart plugs and their current states",
response: Array<{
id: string;
name: string;
state: {
on: boolean;
online: boolean;
}
}>
}
2. Control Smart Plug
{
name: "control_smart_plug",
description: "Turn a smart plug on or off",
parameters: {
deviceId: string; // Device ID from list_smart_plugs
state: boolean; // true for on, false for off
},
response: {
success: boolean;
device: {
id: string;
name: string;
state: {
on: boolean;
online: boolean;
}
}
}
}
3. Get Smart Plug State
{
name: "get_smart_plug_state",
description: "Get the current state of a specific smart plug",
parameters: {
deviceId: string; // Device ID from list_smart_plugs
},
response: {
id: string;
name: string;
state: {
on: boolean;
online: boolean;
}
}
}
API Details
The server implements the Smart Home API intents:
-
SYNC Intent
- Called when users link their account
- Reports available devices and capabilities
- Handles device discovery
-
QUERY Intent
- Reports current state of devices
- Handles state queries from Google Assistant
- Returns online/offline status
-
EXECUTE Intent
- Handles device control commands
- Executes on/off operations
- Reports command success/failure
Error Handling
The server implements comprehensive error handling with specific error codes:
CONFIG_ERROR: Configuration loading or validation errorsAPI_ERROR: Errors from Smart Home APIDEVICE_NOT_FOUND: Device ID not found in available devicesCOMMAND_ERROR: Error executing device command
Each error includes:
- Error message
- Error code
- Detailed error information when available
Security
- OAuth 2.0 authentication flow
- Secure token handling
- Request validation
- Command authorization
- HTTPS communication
- Input sanitization
Development
- Start in development mode:
pnpm dev
- Run tests:
pnpm test
- Debug logs:
- All API calls are logged
- Error details are captured
- Device state changes are tracked
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
MIT
ghome-mcp-server
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
DeepChatYour AI Partner on Desktop
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
Tavily Mcp
Amap Maps高德地图官方 MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
ChatWiseThe second fastest AI chatbot™
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Serper MCP ServerA Serper MCP Server
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.