loading…
Search for a command to run...
loading…
Enables control of MentraOS smart glasses through tools for managing text displays, audio output, and input transcriptions. It integrates with Mentra Cloud to f
Enables control of MentraOS smart glasses through tools for managing text displays, audio output, and input transcriptions. It integrates with Mentra Cloud to facilitate seamless interaction with smart glass hardware using natural language commands.
A Model Context Protocol (MCP) server for controlling MentraOS smart glasses. Built with Bun, Mentra SDK, and MCP SDK.
MCP Client (Claude/Cursor)
⬇️ JSON-RPC (HTTP)
[MCP Server]
⬇️ Mentra SDK
Mentra Cloud
⬇️
Smart Glasses
This server uses a secure token-based authentication system.
http://localhost:3000/webviewhttps://your-app.onrender.com/webviewAdd the server to your MCP configuration file (usually ~/.config/github-copilot/mcp.json or via the VS Code command "MCP: Manage MCP Servers").
{
"mcpServers": {
"mentra-glasses": {
"type": "sse",
"url": "mcp url here",
"headers": {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
}
}
Note: Replace the URL and Token with your actual values.
Edit your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"mentra-glass": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sse-client"],
"env": {
"MCP_SSE_URL": "http://localhost:3000/mcp",
"MCP_SSE_HEADERS": "{\"Authorization\": \"Bearer YOUR_ACCESS_TOKEN\"}"
}
}
}
}
mentra-glassSSEhttps://your-app.onrender.com/mcp?token=YOUR_ACCESS_TOKEN
(Note: Cursor may not support custom headers yet, so we support passing the token via query parameter as a fallback)# Start the server
bun run src/index.ts
# Watch mode
bun run dev
The server will start on http://localhost:3000.
/mcp: MCP JSON-RPC endpoint/health: Health check/webview: Auth & Settings# Build & Run
docker compose up --build -d
glasses_display_text, glasses_clear_displayglasses_speakglasses_get_transcriptions, glasses_get_eventsglasses_statussrc/config: Environment configurationsrc/services: Core logic (Mentra SDK, Session Management)src/tools: MCP Tool definitionssrc/index.ts: Entry pointBest for indie devs. Uses Supabase for the database (since Render's free tier wipes local files) and Render for hosting.
SUPABASE_SETUP.md to create your Supabase project and get credentials.SUPABASE_URL: Your Supabase URL.SUPABASE_SERVICE_KEY: Your Supabase Service Role Key.MENTRAOS_API_KEY: Your Mentra API Key.PACKAGE_NAME: com.yourname.glassmcp.PORT: 3000.Allows you to keep using the local SQLite database by attaching a persistent volume.
flyctl.fly launch.fly volumes create mcp_data.fly.toml to mount the volume to /app/mcp.sqlite.Run standard Docker Compose on any server (DigitalOcean, Hetzner, Oracle Cloud).
docker compose up -d
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"mentra-glass-mcp-server": {
"command": "npx",
"args": []
}
}
}