SimpleChatJS MCP Server

Eine leichte KI-Chat-Anwendung mit MCP-Unterstützung, erstellt mit reinem JavaScript und Node.js.

Dokumentation

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

Quick Start

Prerequisites

  • Node.js
  • An AI API (Ollama, OpenAI, or any OpenAI-compatible endpoint)

Installation

npm install
npm run dev

Build

npm run build

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