Labsco
Tomobobo710 logo

SimpleChatJS

โ˜… 3

from Tomobobo710

A lightweight AI chat application with MCP support, built with pure JavaScript and Node.js.

๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

SimpleChatJS

An Electron desktop AI chat application with MCP (Model Context Protocol) support.

image

Tech Stack

  • Frontend: Vanilla JS, HTML, CSS (no frameworks)
  • Backend: Node.js + Express
  • Desktop: Electron
  • Database: SQLite (better-sqlite3)
  • MCP: @modelcontextprotocol/sdk

Features

  • Multiple persistent chat sessions with SQLite storage
  • Real-time streaming responses from AI providers
  • Model Context Protocol (MCP) integration for tool execution
  • Chat branching and turn-based history
  • Multimodal messages (images, documents)
  • Debug panels with API request/response inspection
  • Settings profiles for different AI providers
  • Anthropic thinking mode and Google Gemini thinking support

Architecture

src/js/
โ”œโ”€โ”€ app/          # Core logic (message sending, API calls, settings)
โ”œโ”€โ”€ chat/         # Chat modes and history management
โ”œโ”€โ”€ tools/        # MCP server management and tool handling
โ”œโ”€โ”€ render/       # Message rendering and streaming
โ””โ”€โ”€ ui/           # Settings, debug panels, context menus

backend/
โ”œโ”€โ”€ server.js           # Express server (runs inside Electron)
โ”œโ”€โ”€ config/             # Database initialization
โ”œโ”€โ”€ routes/             # API endpoints
โ”œโ”€โ”€ services/           # Chat, MCP, settings, tool events
โ””โ”€โ”€ utils/              # Logging

API Compatibility

Works with any OpenAI-compatible API:

  • Ollama - Local AI models
  • OpenAI API - GPT models
  • Anthropic - Claude (via proxy or direct)
  • Google Gemini - Gemini models
  • LM Studio / vLLM - Local inference servers

CI/CD

Pushes to main trigger automated builds via GitHub Actions:

  • Build job: Runs on Windows, Linux, and macOS in parallel. Produces distributable packages (.zip, .AppImage, .dmg).
  • Release job: Triggers only when the version in package.json differs from the latest git tag. Creates a draft GitHub Release with all platform builds attached.

Development

  • Edit files in src/js/ or backend/
  • Reload the app (Ctrl+R) for frontend changes
  • Restart the app for backend changes