We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Coolver/home-assistant-vibecode-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
"""
Ingress Panel for HA Cursor Agent
Renders configuration panel using Jinja2 template
"""
from pathlib import Path
from jinja2 import Template
def generate_ingress_html(api_key: str, agent_version: str) -> str:
"""
Generate HTML for Ingress Panel using Jinja2 template
Args:
api_key: Agent API key
agent_version: Current agent version
Returns:
Rendered HTML string
"""
# Cursor JSON config for user to copy
cursor_json_config = f'''{{
"mcpServers": {{
"home-assistant": {{
"command": "npx",
"args": ["-y", "@coolver/home-assistant-mcp@latest"],
"env": {{
"HA_AGENT_URL": "http://homeassistant.local:8099",
"HA_AGENT_KEY": "{api_key}"
}}
}}
}}
}}'''
# VS Code + Copilot JSON config (uses mcp.json)
vscode_json_config = f'''{{
"servers": {{
"home-assistant": {{
"command": "npx",
"args": ["-y", "@coolver/home-assistant-mcp@latest"],
"env": {{
"HA_AGENT_URL": "http://homeassistant.local:8099",
"HA_AGENT_KEY": "{api_key}"
}}
}}
}}
}}'''
# VS Code + Codex TOML config (uses ~/.codex/config.toml)
vscode_codex_toml_config = f'''[mcp_servers.home-assistant]
command = "npx"
args = ["-y", "@coolver/home-assistant-mcp@latest"]
env = {{
"HA_AGENT_URL" = "http://homeassistant.local:8099",
"HA_AGENT_KEY" = "{api_key}"
}}'''
# Claude Code JSON config (same format as Cursor, but can be in ~/.claude.json or .mcp.json)
claude_json_config = f'''{{
"mcpServers": {{
"home-assistant": {{
"command": "npx",
"args": ["-y", "@coolver/home-assistant-mcp@latest"],
"env": {{
"HA_AGENT_URL": "http://homeassistant.local:8099",
"HA_AGENT_KEY": "{api_key}"
}}
}}
}}
}}'''
# Load Jinja2 template
template_path = Path(__file__).parent / 'templates' / 'ingress_panel.html'
template_content = template_path.read_text(encoding='utf-8')
template = Template(template_content)
# Render template with context
html = template.render(
api_key=api_key,
agent_version=agent_version,
cursor_json_config=cursor_json_config,
claude_json_config=claude_json_config,
vscode_json_config=vscode_json_config,
vscode_codex_toml_config=vscode_codex_toml_config
)
return html