ghome
MCP server from smithery-ai/ghome-mcp-server
claude mcp add --transport stdio smithery-ai-ghome-mcp-server node server.js \ --env NODE_ENV="production" \ --env CONFIG_PATH="config.json"
How to use
This MCP server provides a Google Home integration to manage and monitor Google Home smart plugs via the Smart Home API. It exposes capabilities to discover devices, query their current states, and execute on/off commands. Specifically, you can list all available plugs, turn a plug on or off, and fetch the real-time state of a specific plug. The server handles OAuth 2.0 authentication with the Smart Home API, maintains automatic state refresh, and translates between Google’s Smart Home intents (SYNC, QUERY, EXECUTE) and your local device control logic.
To interact with the server, you would typically go through the Smart Home Action configuration in your Google Cloud project. Once linked, the SYNC intent will return all available smart plugs and their capabilities. The QUERY intent will provide current states for devices, and the EXECUTE intent will apply on/off commands. Use the provided tool descriptions to understand the shape of requests and responses and to integrate with your front-end or home automation workflows. The server also exposes error handling for common issues such as missing devices, invalid commands, or API problems, so you can respond gracefully in your integration.
How to install
Prerequisites:
- Node.js 18 or higher
- pnpm or npm (as used in the project)
- A Google Cloud project with Smart Home API enabled and OAuth 2.0 credentials configured
Installation steps:
-
Clone the repository: git clone https://github.com/your-org/ghome-mcp-server.git cd ghome-mcp-server
-
Install dependencies (using pnpm as in the project): pnpm install
-
Create and configure config.json:
- Copy example config to config.json: cp config.json.example config.json
- Fill in OAuth client credentials and any required endpoints in config.json
-
Build the server (if a build step exists): pnpm build
-
Start the server: pnpm start
If you prefer npm scripts instead of pnpm, install dependencies with npm install and run npm run build / npm start if the project supports it.
Additional notes
Tips and notes:
- Ensure your Google Cloud project has the Smart Home API enabled and that OAuth 2.0 credentials are correctly configured in config.json.
- The server uses OAuth 2.0 for authentication; keep your tokens and secrets secure and rotate them as needed.
- If you encounter CONFIG_ERROR, verify config.json structure and required fields (OAuth client details, endpoints).
- The server logs API calls and error details to help with debugging; check logs for troubleshooting.
- If you update device definitions or capabilities, re-run the SYNC intent to refresh Google Home's understanding of available devices.