Skip to main content
Glama

HomeAssistant MCP

#!/usr/bin/env node /** * MCP Server - Stdio Transport Mode * * This is the entry point for running the MCP server via NPX in stdio mode. * It automatically configures the server to use JSON-RPC 2.0 over stdin/stdout. */ // Set environment variables for stdio transport process.env.USE_STDIO_TRANSPORT = 'true'; // Import and run the MCP server from the compiled output try { // First make sure required directories exist const fs = require('fs'); const path = require('path'); // Ensure logs directory exists const logsDir = path.join(process.cwd(), 'logs'); if (!fs.existsSync(logsDir)) { console.error('Creating logs directory...'); fs.mkdirSync(logsDir, { recursive: true }); } // Get the entry module path const entryPath = require.resolve('../dist/index.js'); // Print initial message to stderr console.error('Starting MCP server in stdio transport mode...'); console.error('Logs will be written to the logs/ directory'); console.error('Communication will use JSON-RPC 2.0 format via stdin/stdout'); // Run the server require(entryPath); } catch (error) { console.error('Failed to start MCP server:', error.message); console.error('If this is your first run, you may need to build the project first:'); console.error(' npm run build'); process.exit(1); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jango-blockchained/advanced-homeassistant-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server