Compare commits

...

4 Commits

Author SHA1 Message Date
jango-blockchained
38ee5368d1 docs: update acronym
- Rename MCP acronym in documentation and package files
- Update site name, package description, and documentation references
- Ensure consistent terminology across project files
2025-02-04 17:19:58 +01:00
jango-blockchained
b0ad1cf0ad docs: add comprehensive documentation for MCP project
- Create comprehensive documentation structure using MkDocs
- Add markdown files for API reference, architecture, getting started, and troubleshooting
- Configure GitHub Pages deployment workflow
- Include custom Jekyll and MkDocs configurations
- Add custom styling and layout for documentation site
2025-02-04 17:14:39 +01:00
jango-blockchained
d6bb83685d chore: upgrade GitHub Actions Docker workflow dependencies
- Update GitHub Actions workflow to use latest versions of checkout, login, metadata, and build-push actions
- Bump action versions from v2/v3/v4 to v3/v4/v5 for improved compatibility and features
2025-02-04 15:11:36 +01:00
jango-blockchained
54112c9059 chore: manage bun.lockb in Docker and project configuration
- Update .dockerignore to exclude bun.lockb
- Modify .gitignore to track bun.lockb
- Update Dockerfile to remove bun.lockb copy step
- Add bun.lockb binary lockfile to the repository
2025-02-04 15:08:15 +01:00
24 changed files with 413 additions and 10 deletions

View File

@@ -73,6 +73,7 @@ temp/
.cloud/
*.db
*.db-*
bun.lockb
.cursor/
.cursor*
.cursorconfig

View File

@@ -20,7 +20,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for version detection
@@ -41,7 +41,7 @@ jobs:
body: ${{ steps.tag_version.outputs.changelog }}
- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
@@ -49,7 +49,7 @@ jobs:
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
@@ -57,7 +57,7 @@ jobs:
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
push: true

32
.github/workflows/docs-deploy.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Deploy Documentation
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'mkdocs.yml'
permissions:
contents: write
jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
pip install mkdocs-material
pip install mkdocs
- name: Deploy documentation
run: mkdocs gh-deploy --force

11
.gitignore vendored
View File

@@ -65,7 +65,6 @@ home-assistant_v2.db-*
package-lock.json
yarn.lock
pnpm-lock.yaml
bun.lockb
coverage/*
coverage/
@@ -79,3 +78,13 @@ coverage/
.bun/
.cursorconfig
bun.lockb
# MkDocs
site/
.site/
# Python
__pycache__/
*.py[cod]
*$py.class

View File

@@ -5,7 +5,7 @@ FROM oven/bun:1.0.25
WORKDIR /app
# Copy package files
COPY package.json bun.lockb ./
COPY package.json ./
# Install dependencies
RUN bun install

View File

@@ -218,3 +218,13 @@ A: Absolutely! We welcome contributions from the community. See the [Contributin
## License
This project is licensed under the MIT License. See [LICENSE](LICENSE) for the full license text.
## Documentation
Full documentation is available at: https://yourusername.github.io/your-repo-name/
## Quick Start
## Installation
## Usage

BIN
bun.lockb Executable file

Binary file not shown.

13
docs/Gemfile Normal file
View File

@@ -0,0 +1,13 @@
source "https://rubygems.org"
gem "github-pages", group: :jekyll_plugins
gem "jekyll-theme-minimal"
gem "jekyll-relative-links"
gem "jekyll-seo-tag"
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1"
gem "tzinfo-data"
end

View File

@@ -1,6 +1,6 @@
# Home Assistant MCP Documentation
Welcome to the Home Assistant MCP (Master Control Program) documentation. This documentation provides comprehensive information about setting up, configuring, and using the Home Assistant MCP.
Welcome to the Home Assistant MCP (Model Context Protocol) documentation. This documentation provides comprehensive information about setting up, configuring, and using the Home Assistant MCP.
## Table of Contents

26
docs/_config.yml Normal file
View File

@@ -0,0 +1,26 @@
title: Model Context Protocol (MCP)
description: A bridge between Home Assistant and Language Learning Models
theme: jekyll-theme-minimal
markdown: kramdown
plugins:
- jekyll-relative-links
- jekyll-seo-tag
# Enable relative links
relative_links:
enabled: true
collections: true
# Navigation structure
header_pages:
- index.md
- getting-started.md
- api.md
- contributing.md
# Exclude files from processing
exclude:
- Gemfile
- Gemfile.lock
- node_modules
- vendor

View File

@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="{{ site.lang | default: " en-US" }}">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% seo %}
<link rel="stylesheet" href="{{ " /assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
</head>
<body>
<div class="wrapper">
<header>
<h1><a href="{{ " /" | absolute_url }}">{{ site.title | default: site.github.repository_name }}</a></h1>
{% if site.logo %}
<img src="{{site.logo | relative_url}}" alt="Logo" />
{% endif %}
<p>{{ site.description | default: site.github.project_tagline }}</p>
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub <small>{{
site.github.repository_nwo }}</small></a></p>
<nav class="main-nav">
<h3>Documentation</h3>
<ul>
<li><a href="{{ '/getting-started' | relative_url }}">Getting Started</a></li>
<li><a href="{{ '/api' | relative_url }}">API Reference</a></li>
<li><a href="{{ '/sse-api' | relative_url }}">SSE API</a></li>
<li><a href="{{ '/architecture' | relative_url }}">Architecture</a></li>
<li><a href="{{ '/contributing' | relative_url }}">Contributing</a></li>
<li><a href="{{ '/troubleshooting' | relative_url }}">Troubleshooting</a></li>
</ul>
</nav>
</header>
<section>
{{ content }}
</section>
<footer>
{% if site.github.is_project_page %}
<p>This project is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p>
{% endif %}
<p><small>Hosted on GitHub Pages &mdash; Theme by <a
href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="{{ " /assets/js/scale.fix.js" | relative_url }}"></script>
</body>
</html>

View File

@@ -0,0 +1,54 @@
@import "{{ site.theme }}";
// Custom styles
.main-nav {
margin-top: 20px;
ul {
list-style: none;
padding: 0;
margin: 0;
}
li {
margin-bottom: 8px;
}
a {
color: #267CB9;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
h1,
h2,
h3 {
color: #333;
}
code {
background-color: #f8f8f8;
border: 1px solid #ddd;
border-radius: 3px;
padding: 2px 5px;
}
pre {
background-color: #f8f8f8;
border: 1px solid #ddd;
border-radius: 3px;
padding: 10px;
overflow-x: auto;
}
.wrapper {
max-width: 960px;
}
section {
max-width: 700px;
}

View File

@@ -1,6 +1,6 @@
# Getting Started with Home Assistant MCP
This guide will help you get started with the Home Assistant MCP (Master Control Program).
This guide will help you get started with the Home Assistant MCP (Model Context Protocol).
## Prerequisites

View File

@@ -0,0 +1,5 @@
# Configuration
## Basic Configuration
## Advanced Settings

View File

@@ -0,0 +1,124 @@
# Installation Guide
## Prerequisites
### System Requirements
- **Operating System:** Linux, macOS, or Windows (Docker recommended)
- **Runtime:** Bun v1.0.26 or higher
- **Home Assistant:** v2023.11 or higher
- **Minimum Hardware:**
- 2 CPU cores
- 2GB RAM
- 10GB free disk space
### Software Dependencies
- Bun runtime
- Docker (optional, recommended for deployment)
- Git
- Node.js (for some development tasks)
## Installation Methods
### 1. Basic Setup
#### Install Bun
```bash
curl -fsSL https://bun.sh/install | bash
```
#### Clone Repository
```bash
git clone https://github.com/jango-blockchained/homeassistant-mcp.git
cd homeassistant-mcp
```
#### Install Dependencies
```bash
bun install
```
#### Configure Environment
1. Copy environment template
```bash
cp .env.example .env
```
2. Edit `.env` file with your Home Assistant configuration
- Set `HASS_HOST`
- Configure authentication tokens
- Adjust other settings as needed
#### Build and Start
```bash
bun run build
bun start
```
### 2. Docker Setup (Recommended)
#### Prerequisites
- Docker
- Docker Compose
#### Deployment Steps
```bash
# Clone repository
git clone https://github.com/jango-blockchained/homeassistant-mcp.git
cd homeassistant-mcp
# Configure environment
cp .env.example .env
# Edit .env file with your settings
# Deploy with Docker Compose
docker compose up -d
```
### 3. Home Assistant Add-on (Coming Soon)
We're working on a direct Home Assistant add-on for even easier installation.
## Verification
### Check Installation
- Web Interface: [http://localhost:3000](http://localhost:3000)
- Logs: `docker compose logs` or check `logs/` directory
### Troubleshooting
- Ensure all environment variables are correctly set
- Check network connectivity to Home Assistant
- Verify authentication tokens
## Updating
### Basic Setup
```bash
git pull
bun install
bun run build
bun start
```
### Docker
```bash
git pull
docker compose up -d --build
```
## Uninstallation
### Basic Setup
```bash
cd homeassistant-mcp
bun stop # Stop the application
rm -rf node_modules dist
```
### Docker
```bash
docker compose down
docker rmi homeassistant-mcp # Remove image
```
## Next Steps
- [Configuration Guide](configuration.md)
- [Usage Instructions](../usage.md)
- [Troubleshooting](../troubleshooting.md)

46
docs/index.md Normal file
View File

@@ -0,0 +1,46 @@
---
layout: default
title: Home
nav_order: 1
---
# Model Context Protocol (MCP) Server
## Overview
The Model Context Protocol (MCP) Server is a cutting-edge bridge between Home Assistant and Language Learning Models (LLMs), designed to revolutionize smart home automation and control.
## Key Features
### 🏠 Smart Home Integration
- Natural language control of smart devices
- Real-time device state monitoring
- Advanced automation capabilities
### 🤖 LLM Powered Interactions
- Intuitive voice and text-based commands
- Context-aware device management
- Intelligent automation suggestions
### 🔒 Security & Performance
- Token-based authentication
- High-performance Bun runtime
- Secure, real-time communication protocols
## Documentation
- [Getting Started](getting-started.md) - Installation and basic setup
- [API Reference](api.md) - Complete API documentation
- [SSE API](sse-api.md) - Server-Sent Events API documentation
- [Architecture](architecture.md) - System architecture and design
- [Contributing](contributing.md) - How to contribute to the project
- [Troubleshooting](troubleshooting.md) - Common issues and solutions
## Community and Support
- [GitHub Issues](https://github.com/jango-blockchained/homeassistant-mcp/issues) - Report bugs and request features
- [GitHub Discussions](https://github.com/jango-blockchained/homeassistant-mcp/discussions) - Ask questions and share ideas
## License
Licensed under the MIT License. See [LICENSE](https://github.com/jango-blockchained/homeassistant-mcp/blob/main/LICENSE) for details.

View File

@@ -1,6 +1,6 @@
# Troubleshooting Guide
This guide helps you diagnose and fix common issues with the Home Assistant MCP.
This guide helps you diagnose and fix common issues with the Home Assistant Model Context Protocol (MCP).
## Common Issues

5
docs/usage.md Normal file
View File

@@ -0,0 +1,5 @@
# Usage Guide
## Basic Usage
## Advanced Features

26
mkdocs.yml Normal file
View File

@@ -0,0 +1,26 @@
site_name: Home Assistant Model Context Protocol (MCP)
site_url: https://yourusername.github.io/your-repo-name/
repo_url: https://github.com/yourusername/your-repo-name
theme:
name: material
features:
- navigation.tabs
- navigation.sections
- toc.integrate
- search.suggest
- search.highlight
markdown_extensions:
- pymdownx.highlight
- pymdownx.superfences
- admonition
- pymdownx.details
nav:
- Home: index.md
- Getting Started:
- Installation: getting-started/installation.md
- Configuration: getting-started/configuration.md
- Usage: usage.md
- Contributing: contributing.md

View File

@@ -1,7 +1,7 @@
{
"name": "homeassistant-mcp",
"version": "1.0.0",
"description": "Home Assistant Master Control Program",
"description": "Home Assistant Model Context Protocol",
"main": "dist/index.js",
"type": "module",
"scripts": {