{"id":47823870,"url":"https://github.com/emingenc/smart_glass_mcp","last_synced_at":"2026-04-03T19:19:23.619Z","repository":{"id":338910506,"uuid":"1127595028","full_name":"emingenc/smart_glass_mcp","owner":"emingenc","description":"smart glasses MCP that any AI can use smart glass which has MCP client","archived":false,"fork":false,"pushed_at":"2026-02-17T04:08:11.000Z","size":104,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-17T08:46:00.951Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emingenc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-04T07:52:27.000Z","updated_at":"2026-02-17T02:52:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/emingenc/smart_glass_mcp","commit_stats":null,"previous_names":["emingenc/smart_glass_mcp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/emingenc/smart_glass_mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emingenc%2Fsmart_glass_mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emingenc%2Fsmart_glass_mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emingenc%2Fsmart_glass_mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emingenc%2Fsmart_glass_mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emingenc","download_url":"https://codeload.github.com/emingenc/smart_glass_mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emingenc%2Fsmart_glass_mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31372202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-03T19:19:23.096Z","updated_at":"2026-04-03T19:19:23.608Z","avatar_url":"https://github.com/emingenc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mentra Glass MCP Server\n\nA Model Context Protocol (MCP) server for controlling MentraOS smart glasses.\nBuilt with **Bun**, **Mentra SDK**, and **MCP SDK**.\n\n## Features\n\n- **MCP Support**: Exposes tools to control glasses (Display, Audio, Input) via JSON-RPC.\n- **Multi-User**: Supports multiple users via Bearer token authentication (email).\n- **Mentra Integration**: Connects to Mentra Cloud as an AppServer.\n- **Docker Ready**: Includes Dockerfile and Compose setup.\n\n## Architecture\n\n```\nMCP Client (Claude/Cursor) \n       ⬇️ JSON-RPC (HTTP)\n   [MCP Server]\n       ⬇️ Mentra SDK\n   Mentra Cloud\n       ⬇️\n   Smart Glasses\n```\n\n## Prerequisites\n\n- [Bun](https://bun.sh) (v1.0+)\n- Mentra Developer Account \u0026 API Key\n\n## Authentication\n\nThis server uses a secure token-based authentication system.\n\n1.  **Start the Server** (Locally or Deployed).\n2.  **Open the Webview**:\n    *   Local: `http://localhost:3000/webview`\n    *   Deployed: `https://your-app.onrender.com/webview`\n3.  **Login**: Sign in with your Mentra account.\n4.  **Get Token**: Copy the **Access Token** displayed on the screen.\n\n## Connecting to Clients\n\n### 1. GitHub Copilot (VS Code)\n\nAdd the server to your MCP configuration file (usually `~/.config/github-copilot/mcp.json` or via the VS Code command \"MCP: Manage MCP Servers\").\n\n```json\n{\n  \"mcpServers\": {\n    \"mentra-glasses\": {\n  \"type\": \"sse\",\n  \"url\": \"mcp url here\",\n  \"headers\": {\n    \"Authorization\": \"Bearer YOUR_ACCESS_TOKEN\"\n  }\n  }\n}\n```\n*Note: Replace the URL and Token with your actual values.*\n\n### 2. Claude Desktop\n\nEdit your configuration file:\n- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"mentra-glass\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol/server-sse-client\"],\n      \"env\": {\n        \"MCP_SSE_URL\": \"http://localhost:3000/mcp\",\n        \"MCP_SSE_HEADERS\": \"{\\\"Authorization\\\": \\\"Bearer YOUR_ACCESS_TOKEN\\\"}\"\n      }\n    }\n  }\n}\n```\n\n### 3. Cursor\n\n1.  Go to **Settings** \u003e **Features** \u003e **MCP**.\n2.  Click **+ Add New MCP Server**.\n3.  **Name**: `mentra-glass`\n4.  **Type**: `SSE`\n5.  **URL**: `https://your-app.onrender.com/mcp?token=YOUR_ACCESS_TOKEN`\n    *(Note: Cursor may not support custom headers yet, so we support passing the token via query parameter as a fallback)*\n\n## Running Locally\n\n```bash\n# Start the server\nbun run src/index.ts\n\n# Watch mode\nbun run dev\n```\n\nThe server will start on `http://localhost:3000`.\n- `/mcp`: MCP JSON-RPC endpoint\n- `/health`: Health check\n- `/webview`: Auth \u0026 Settings\n\n## Running with Docker\n\n```bash\n# Build \u0026 Run\ndocker compose up --build -d\n```\n\n## Available Tools\n\n- **Display**: `glasses_display_text`, `glasses_clear_display`\n- **Audio**: `glasses_speak`\n- **Input**: `glasses_get_transcriptions`, `glasses_get_events`\n- **System**: `glasses_status`\n\n## Project Structure\n\n- `src/config`: Environment configuration\n- `src/services`: Core logic (Mentra SDK, Session Management)\n- `src/tools`: MCP Tool definitions\n- `src/index.ts`: Entry point\n\n## Deployment\n\n### Option 1: Render + Supabase (Recommended for Free Tier)\nBest for indie devs. Uses Supabase for the database (since Render's free tier wipes local files) and Render for hosting.\n\n1.  **Database**: Follow `SUPABASE_SETUP.md` to create your Supabase project and get credentials.\n2.  **Hosting**:\n    *   Sign up at [render.com](https://render.com).\n    *   Create a new **Web Service**.\n    *   Connect your GitHub repository.\n    *   **Runtime**: Docker.\n    *   **Environment Variables**:\n        *   `SUPABASE_URL`: Your Supabase URL.\n        *   `SUPABASE_SERVICE_KEY`: Your Supabase Service Role Key.\n        *   `MENTRAOS_API_KEY`: Your Mentra API Key.\n        *   `PACKAGE_NAME`: `com.yourname.glassmcp`.\n        *   `PORT`: `3000`.\n\n### Option 2: Fly.io (Best for SQLite)\nAllows you to keep using the local SQLite database by attaching a persistent volume.\n\n1.  Install `flyctl`.\n2.  Run `fly launch`.\n3.  Create a volume: `fly volumes create mcp_data`.\n4.  Update `fly.toml` to mount the volume to `/app/mcp.sqlite`.\n\n### Option 3: Self-Hosted (VPS)\nRun standard Docker Compose on any server (DigitalOcean, Hetzner, Oracle Cloud).\n\n```bash\ndocker compose up -d\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femingenc%2Fsmart_glass_mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femingenc%2Fsmart_glass_mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femingenc%2Fsmart_glass_mcp/lists"}