1. Wiki
  2. MindTab
  3. Grammar Server

MindTab: Grammar Server

A lightweight proxy that sits in front of a LanguageTool instance and adds the CORS headers that browser extensions need. Point the MindTab extension at it to get free, self-hosted grammar and spelling checks inside the Writing Assistant panel.

GitHub →

Español Français Deutsch Português

How it works

Browser extension
    │  POST /v2/check
    ▼
MindTab proxy  (Node.js / Express, port 3000)
    │  forwards request
    ▼
LanguageTool   (Java, port 8010 inside Docker)
    │  returns matches[]
    ▲
MindTab proxy  (adds CORS headers)
    ▲
Browser extension  (renders suggestions in panel)

Quick start: Docker (recommended)

Requires Docker with the Compose plugin.

git clone https://github.com/AetherAssembly/MindTab.git
cd path/to/MindTab/server/
docker compose up

The proxy will be available at http://localhost:3000. LanguageTool starts on a private network port and is not exposed to your host machine.

To run in the background:

docker compose up -d
docker compose logs -f   # stream logs
docker compose down      # stop

Manual setup

Requirements: Node.js 18+, a running LanguageTool instance.

1. Run LanguageTool

The easiest way without Docker:

# Download from https://languagetool.org/download/
java -cp languagetool-server.jar org.languagetool.server.HTTPServer \
  --port 8081 --allow-origin '*'

Or use the Docker image on its own:

docker run -d -p 8081:8010 erikvl87/languagetool

2. Configure the proxy

cd server
cp .env.example .env
# Edit .env if your LanguageTool is on a different port
npm install
npm start

Environment variables

VariableDefaultDescription
PORT3000Port the proxy listens on
LANGUAGETOOL_URLhttp://localhost:8081Address of your LanguageTool instance
CORS_ORIGIN*Allowed request origins (* or a specific URL)

API

GET /health

Returns 200 when the proxy is running. Use this to verify the server is reachable before configuring the extension.

{ "ok": true, "upstream": "http://localhost:8081" }

POST /v2/check

Forwards to LanguageTool's /v2/check endpoint. Accepts application/x-www-form-urlencoded:

FieldExampleDescription
text"This are a test."Text to check (max 5000 chars sent by the extension)
language"en-US"BCP 47 language code

Returns LanguageTool's JSON response with a matches array.

Connect the extension

  1. Start the server (either method above).
  2. Open the MindTab popup → click Settings.
  3. Paste http://localhost:3000 (or your server's address) into Grammar Server URL.
  4. Click Save.
  5. Type 15+ words in any text field; grammar suggestions will appear in the Writing Assistant panel.

Deploying on a home server or Raspberry Pi

The Docker Compose approach works on any Linux machine. To make it reachable from other devices on your network, expose the proxy port in your router or set PORT to something memorable. Then use your machine's local IP (e.g. http://192.168.1.50:3000) as the Grammar Server URL in the extension.

Last updated: 2026-05-19 AetherAssembly/MindTab → License: MIT