@hemingweb/wordnook-mcp 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.mcp.md ADDED
@@ -0,0 +1,151 @@
1
+ # @hemingweb/wordnook-mcp
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@hemingweb/wordnook-mcp.svg)](https://www.npmjs.com/package/@hemingweb/wordnook-mcp)
4
+ [![License: CC BY-SA 4.0](https://img.shields.io/badge/License-CC_BY--SA_4.0-lightgrey.svg)](https://creativecommons.org/licenses/by-sa/4.0/)
5
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org/)
6
+
7
+ The official **Model Context Protocol (MCP)** server for [WordNook](https://wordnook.app).
8
+
9
+ WordNook MCP provides **100% on-device, offline linguistic intelligence** for local LLMs, AI coding assistants, and agentic workflows (including Claude Desktop, Cursor, Ollama, Open WebUI, Antigravity, Zed, and Cline).
10
+
11
+ ---
12
+
13
+ ## 🔒 100% On-Device & Zero-Cloud Privacy
14
+
15
+ * **Zero Cloud Calls:** All lookups, typo corrections, morphological derivations, and thesaurus queries execute entirely on your local machine.
16
+ * **Zero Telemetry or Tracking:** Your prompts, text drafts, and dictionary queries are never transmitted over the internet or logged to any remote database.
17
+ * **Zero API Keys:** Works out-of-the-box with bundled offline datasets (`en-core`, `en-moby`, and `en-kaikki`).
18
+
19
+ ---
20
+
21
+ ## ⚡ Quick Start (Zero-Install via `npx`)
22
+
23
+ You do not need to clone any repository. Run WordNook MCP directly with `npx`:
24
+
25
+ ### 1. Claude Desktop
26
+ Add WordNook to your Claude Desktop configuration file:
27
+ * **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
28
+ * **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
29
+
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "wordnook": {
34
+ "command": "npx",
35
+ "args": ["-y", "@hemingweb/wordnook-mcp"]
36
+ }
37
+ }
38
+ }
39
+ ```
40
+
41
+ > **Tip:** To launch with the massive 380,000+ word Kaikki Wiktionary pack active by default, add `"--pack", "en-kaikki"` to `args`.
42
+
43
+ Restart Claude Desktop, and the hammer icon in the prompt input will reveal WordNook's tools.
44
+
45
+ ---
46
+
47
+ ### 2. Cursor, Antigravity, Zed & Cline
48
+ In your workspace or global MCP settings (`~/.cursor/mcp.json` or `.mcp.json`):
49
+
50
+ ```json
51
+ {
52
+ "mcpServers": {
53
+ "wordnook": {
54
+ "command": "npx",
55
+ "args": ["-y", "@hemingweb/wordnook-mcp"]
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ ---
62
+
63
+ ### 3. Open WebUI (Local HTTP/SSE Mode)
64
+ Open WebUI connects to MCP servers over Streamable HTTP (SSE):
65
+
66
+ 1. Start the server in your terminal:
67
+ ```bash
68
+ npx -y @hemingweb/wordnook-mcp --port 8001 --pack en-kaikki
69
+ ```
70
+ 2. In Open WebUI, navigate to: **Admin Panel $\rightarrow$ Settings $\rightarrow$ Tools $\rightarrow$ Add Tool**.
71
+ 3. Configure:
72
+ * **Type:** `MCP (Streamable HTTP)`
73
+ * **URL:** `http://localhost:8001/sse` (or `http://host.docker.internal:8001/sse` if running in Docker)
74
+
75
+ ---
76
+
77
+ ## 🛠️ Available MCP Tools
78
+
79
+ WordNook exposes 8 specialized linguistic tools:
80
+
81
+ | Tool | Parameters | Description |
82
+ |---|---|---|
83
+ | `lookup_word` | `word: string` (required)<br>`packId?: string`<br>`includeEtymology?: boolean` | Full definitions, phonetics (IPA), parts of speech, examples, etymology, and synonyms. Automatically resolves inflections (e.g. `"springing"` $\rightarrow$ `"spring"`). |
84
+ | `search_words` | `query: string` (required)<br>`limit?: number` (default 10)<br>`fuzzy?: boolean` (default true) | Instant prefix autocomplete and typo suggestions scored by Levenshtein edit distance. |
85
+ | `find_synonyms` | `word: string` (required)<br>`partOfSpeech?: string`<br>`limit?: number` (default 20) | Curated thesaurus synonyms and antonyms combining Wordset and Moby Thesaurus II (>2.5 million terms). |
86
+ | `lemmatize_word` | `word: string` (required) | Morphological analysis that strips inflectional affixes (`-ing`, `-ed`, `-s`, `-ies`, `-ly`, `-er`, `-est`) to find root lemmas. |
87
+ | `get_word_of_the_day` | `date?: string` (ISO format, optional) | Deterministic, offline calendar Word of the Day matching the exact wordnook.app daily selection. |
88
+ | `get_random_word` | `count?: number` (1-10, default 1)<br>`minDefinitions?: number` | Serendipitous curated vocabulary discovery for creative writing, learning, and test generation. |
89
+ | `list_packs` | None | Lists installed and available reference packs, indicating entry counts and the currently active pack. |
90
+ | `set_active_pack` | `packId: string` (required) | Dynamically switches the active dictionary pack (e.g. `"en-kaikki"` for 380k+ words, or `"en-core"` for the curated starter pack). |
91
+
92
+ ---
93
+
94
+ ## 📚 Bundled Reference Data Packs
95
+
96
+ WordNook MCP includes offline compressed datasets that load on demand:
97
+
98
+ * **English Core (`en-core`):** ~50,000 curated headwords derived from Wordset and WordNet 3.0 (fast, clean, primary definitions).
99
+ * **Moby Thesaurus II (`en-moby`):** Grady Ward's massive public domain thesaurus with over 2.5 million synonyms across 30,000 root word clusters.
100
+ * **Wiktionary (`en-kaikki`):** Complete Wiktionary extract via Kaikki.org with 379,894 English headwords, international loanwords, and deep etymologies.
101
+
102
+ ---
103
+
104
+ ## 💡 Contextual Resources (`wordnook://`)
105
+
106
+ Directly inspectable by AI agents:
107
+
108
+ * `wordnook://definitions/{word}`: Full markdown definition card for any English word.
109
+ * `wordnook://thesaurus/{word}`: Structured JSON synonym and antonym hierarchy.
110
+ * `wordnook://word-of-the-day`: Today's curated featured word and phonetics.
111
+ * `wordnook://stats`: Total loaded vocabulary count, active pack, and system health.
112
+
113
+ ---
114
+
115
+ ## 🎨 Curated Prompt Templates
116
+
117
+ * `vocabulary_enhancer`: Elevates draft prose to match a requested tone (`literary`, `academic`, or `plain`) while strictly preserving intended meaning.
118
+ * `etymology_and_nuance`: Analyzes subtle shades of meaning between near-synonyms using classical origins and example sentences.
119
+ * `word_puzzle_assistant`: Solves crossword clues, word games, and anagrams against verified dictionary entries.
120
+
121
+ ---
122
+
123
+ ## 💻 CLI Options & Flags
124
+
125
+ When running `npx -y @hemingweb/wordnook-mcp`:
126
+
127
+ ```text
128
+ Options:
129
+ --port, -p <number> Run in HTTP/SSE mode on specified port (e.g. for Open WebUI)
130
+ --pack <packId> Set default active pack on startup (e.g. "en-kaikki" or "en-core")
131
+ --data-dir <path> Path to directory containing custom data packs (*.json.gz)
132
+ --version, -v Show version
133
+ --help, -h Show help banner
134
+ ```
135
+
136
+ ---
137
+
138
+ ## 🔗 Links & Documentation
139
+
140
+ * **Live Web App:** [https://wordnook.app](https://wordnook.app)
141
+ * **Interactive User Manual:** [https://wordnook.app/manual](https://wordnook.app/manual)
142
+ * **Complete User Manual (Markdown):** [https://wordnook.app/docs/USER_MANUAL.md](https://wordnook.app/docs/USER_MANUAL.md)
143
+ * **MCP Technical Specification:** [https://wordnook.app/docs/MCP_SERVER_SPECIFICATION.md](https://wordnook.app/docs/MCP_SERVER_SPECIFICATION.md)
144
+ * **Architecture Specification:** [https://wordnook.app/docs/SPECIFICATION.md](https://wordnook.app/docs/SPECIFICATION.md)
145
+
146
+ ---
147
+
148
+ ## 📄 License & Attribution
149
+
150
+ * WordNook MCP is licensed under **[CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)**.
151
+ * Lexicographical data includes content from Wordset (CC-BY-SA 4.0), Kaikki.org Wiktionary (CC-BY-SA 4.0), and Moby Thesaurus II (Public Domain).
package/README.md CHANGED
@@ -1,97 +1,151 @@
1
- # WordNook
1
+ # @hemingweb/wordnook-mcp
2
2
 
3
- > A fast, private, offline-first English dictionary and reference web application (PWA).
3
+ [![npm version](https://img.shields.io/npm/v/@hemingweb/wordnook-mcp.svg)](https://www.npmjs.com/package/@hemingweb/wordnook-mcp)
4
+ [![License: CC BY-SA 4.0](https://img.shields.io/badge/License-CC_BY--SA_4.0-lightgrey.svg)](https://creativecommons.org/licenses/by-sa/4.0/)
5
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org/)
4
6
 
5
- WordNook is designed to run seamlessly across iOS, iPadOS, Android, and desktop browsers without requiring app store distribution or paid developer accounts. It operates completely client-side with zero tracking, zero server databases, and 100% offline functionality.
7
+ The official **Model Context Protocol (MCP)** server for [WordNook](https://wordnook.app).
8
+
9
+ WordNook MCP provides **100% on-device, offline linguistic intelligence** for local LLMs, AI coding assistants, and agentic workflows (including Claude Desktop, Cursor, Ollama, Open WebUI, Antigravity, Zed, and Cline).
6
10
 
7
11
  ---
8
12
 
9
- ## ✨ Features
13
+ ## 🔒 100% On-Device & Zero-Cloud Privacy
10
14
 
11
- - **⚡ Instant Autocomplete:** Sub-10ms prefix search as you type, powered by an in-memory prefix Trie.
12
- - **🔍 Typo Tolerance ("Did you mean...?"):** Intelligent fuzzy matching using Damerau-Levenshtein distance to suggest corrections for misspelled words.
13
- - **👆 Interactive Definitions:** Every word in definitions and example sentences is tappable to instantly look up its meaning.
14
- - **🔊 Native Pronunciation (TTS):** Offline text-to-speech powered by the browser's native Web Speech API (`window.speechSynthesis`) using high-quality operating system voices.
15
- - **⭐ On-Device Favorites & History:** Bookmark words and review search history. All data remains strictly on your device (`localStorage` / `IndexedDB`) with zero server tracking or privacy liability.
16
- - **💾 Backup & Restore:** Export your saved favorites to a JSON file or import them across devices.
17
- - **📅 Offline Word of the Day:** Deterministic date-based selection that works offline and ensures all users globally see the same word on the same day without a backend.
18
- - **🤖 Local AI & MCP Server:** Built-in Model Context Protocol server connecting WordNook's lexicon to Ollama, Claude Desktop, Cursor, and Antigravity over `stdio` with 100% on-device privacy.
19
- - **📱 PWA & Offline Support:** Installable directly to the home screen on iOS (Safari) and Android (Chrome). Works completely offline in Airplane mode via Service Worker caching.
20
- - **🤫 Notification by Exception:** Clean, typography-first interface that stays silent when ready and only displays status banners during initial download or setup.
15
+ * **Zero Cloud Calls:** All lookups, typo corrections, morphological derivations, and thesaurus queries execute entirely on your local machine.
16
+ * **Zero Telemetry or Tracking:** Your prompts, text drafts, and dictionary queries are never transmitted over the internet or logged to any remote database.
17
+ * **Zero API Keys:** Works out-of-the-box with bundled offline datasets (`en-core`, `en-moby`, and `en-kaikki`).
21
18
 
22
19
  ---
23
20
 
24
- ## 🏗️ Architecture Overview
21
+ ## ⚡ Quick Start (Zero-Install via `npx`)
25
22
 
26
- WordNook is built with a **modular "Envelope" architecture**:
27
- - **UI Shell:** React 19 + TypeScript + Vite with a typography-focused layout (Newsreader serif body + Inter sans UI).
28
- - **Search Engine:** In-memory Prefix Trie and Levenshtein fuzzy matcher scoped to the active language (~1–3 MB RAM footprint).
29
- - **Storage Layer:** Native IndexedDB for dictionary data packs with persistent storage requests (`navigator.storage.persist()`).
30
- - **Offline Cache:** Service Worker with Cache API for instant loading without an internet connection.
23
+ You do not need to clone any repository. Run WordNook MCP directly with `npx`:
31
24
 
32
- For complete architectural details, data pack schemas, and roadmap, see [docs/SPECIFICATION.md](docs/SPECIFICATION.md).
33
- For the end-user guide and feature walkthrough, see the [WordNook User Manual](docs/USER_MANUAL.md).
25
+ ### 1. Claude Desktop
26
+ Add WordNook to your Claude Desktop configuration file:
27
+ * **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
28
+ * **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
34
29
 
35
- ---
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "wordnook": {
34
+ "command": "npx",
35
+ "args": ["-y", "@hemingweb/wordnook-mcp"]
36
+ }
37
+ }
38
+ }
39
+ ```
36
40
 
37
- ## 🚀 Getting Started
41
+ > **Tip:** To launch with the massive 380,000+ word Kaikki Wiktionary pack active by default, add `"--pack", "en-kaikki"` to `args`.
38
42
 
39
- ### Prerequisites
40
- - [Node.js](https://nodejs.org/) (v18.0.0 or higher)
41
- - npm (v9.0.0 or higher)
43
+ Restart Claude Desktop, and the hammer icon in the prompt input will reveal WordNook's tools.
42
44
 
43
- ### Installation
44
- Clone the repository and install dependencies:
45
- ```bash
46
- git clone https://github.com/davidhemingway/wordnook.git
47
- cd wordnook
48
- npm install
49
- ```
45
+ ---
50
46
 
51
- ### Development Server
52
- Start the local Vite development server:
53
- ```bash
54
- npm run dev
47
+ ### 2. Cursor, Antigravity, Zed & Cline
48
+ In your workspace or global MCP settings (`~/.cursor/mcp.json` or `.mcp.json`):
49
+
50
+ ```json
51
+ {
52
+ "mcpServers": {
53
+ "wordnook": {
54
+ "command": "npx",
55
+ "args": ["-y", "@hemingweb/wordnook-mcp"]
56
+ }
57
+ }
58
+ }
55
59
  ```
56
- Open your browser and navigate to `http://localhost:3000`.
57
60
 
58
- ### Production Build
59
- Create an optimized production build:
60
- ```bash
61
- npm run build
62
- ```
63
- The output will be generated in the `dist/` directory.
64
-
65
- ### Running the MCP Server (Local AI & Ollama Integration)
66
- Start the Model Context Protocol server over `stdio`:
67
- ```bash
68
- npm run mcp
69
- # Or with options:
70
- node bin/wordnook-mcp.js --help
71
- ```
72
- For integration guides with **Ollama**, **Claude Desktop**, **Cursor**, and **Antigravity**, see the [MCP Server Specification](docs/MCP_SERVER_SPECIFICATION.md) and [User Manual](docs/USER_MANUAL.md).
61
+ ---
73
62
 
74
- ### Preview Production Build
75
- Preview the production build locally:
76
- ```bash
77
- npm run preview
78
- ```
63
+ ### 3. Open WebUI (Local HTTP/SSE Mode)
64
+ Open WebUI connects to MCP servers over Streamable HTTP (SSE):
65
+
66
+ 1. Start the server in your terminal:
67
+ ```bash
68
+ npx -y @hemingweb/wordnook-mcp --port 8001 --pack en-kaikki
69
+ ```
70
+ 2. In Open WebUI, navigate to: **Admin Panel $\rightarrow$ Settings $\rightarrow$ Tools $\rightarrow$ Add Tool**.
71
+ 3. Configure:
72
+ * **Type:** `MCP (Streamable HTTP)`
73
+ * **URL:** `http://localhost:8001/sse` (or `http://host.docker.internal:8001/sse` if running in Docker)
79
74
 
80
75
  ---
81
76
 
82
- ## 📲 Installing as a PWA
77
+ ## 🛠️ Available MCP Tools
83
78
 
84
- ### On iOS / iPadOS (Safari)
85
- 1. Open the hosted URL in Safari.
86
- 2. Tap the **Share** button (the square with an arrow pointing up).
87
- 3. Scroll down and tap **"Add to Home Screen"**.
88
- 4. Launch WordNook from your home screen for full-screen, offline use.
79
+ WordNook exposes 8 specialized linguistic tools:
89
80
 
90
- ### On Android (Chrome)
91
- 1. Open the hosted URL in Chrome.
92
- 2. Tap the menu (three dots) and select **"Install app"** or **"Add to Home screen"**.
81
+ | Tool | Parameters | Description |
82
+ |---|---|---|
83
+ | `lookup_word` | `word: string` (required)<br>`packId?: string`<br>`includeEtymology?: boolean` | Full definitions, phonetics (IPA), parts of speech, examples, etymology, and synonyms. Automatically resolves inflections (e.g. `"springing"` $\rightarrow$ `"spring"`). |
84
+ | `search_words` | `query: string` (required)<br>`limit?: number` (default 10)<br>`fuzzy?: boolean` (default true) | Instant prefix autocomplete and typo suggestions scored by Levenshtein edit distance. |
85
+ | `find_synonyms` | `word: string` (required)<br>`partOfSpeech?: string`<br>`limit?: number` (default 20) | Curated thesaurus synonyms and antonyms combining Wordset and Moby Thesaurus II (>2.5 million terms). |
86
+ | `lemmatize_word` | `word: string` (required) | Morphological analysis that strips inflectional affixes (`-ing`, `-ed`, `-s`, `-ies`, `-ly`, `-er`, `-est`) to find root lemmas. |
87
+ | `get_word_of_the_day` | `date?: string` (ISO format, optional) | Deterministic, offline calendar Word of the Day matching the exact wordnook.app daily selection. |
88
+ | `get_random_word` | `count?: number` (1-10, default 1)<br>`minDefinitions?: number` | Serendipitous curated vocabulary discovery for creative writing, learning, and test generation. |
89
+ | `list_packs` | None | Lists installed and available reference packs, indicating entry counts and the currently active pack. |
90
+ | `set_active_pack` | `packId: string` (required) | Dynamically switches the active dictionary pack (e.g. `"en-kaikki"` for 380k+ words, or `"en-core"` for the curated starter pack). |
93
91
 
94
92
  ---
95
93
 
96
- ## 📄 License
97
- MIT License.
94
+ ## 📚 Bundled Reference Data Packs
95
+
96
+ WordNook MCP includes offline compressed datasets that load on demand:
97
+
98
+ * **English Core (`en-core`):** ~50,000 curated headwords derived from Wordset and WordNet 3.0 (fast, clean, primary definitions).
99
+ * **Moby Thesaurus II (`en-moby`):** Grady Ward's massive public domain thesaurus with over 2.5 million synonyms across 30,000 root word clusters.
100
+ * **Wiktionary (`en-kaikki`):** Complete Wiktionary extract via Kaikki.org with 379,894 English headwords, international loanwords, and deep etymologies.
101
+
102
+ ---
103
+
104
+ ## 💡 Contextual Resources (`wordnook://`)
105
+
106
+ Directly inspectable by AI agents:
107
+
108
+ * `wordnook://definitions/{word}`: Full markdown definition card for any English word.
109
+ * `wordnook://thesaurus/{word}`: Structured JSON synonym and antonym hierarchy.
110
+ * `wordnook://word-of-the-day`: Today's curated featured word and phonetics.
111
+ * `wordnook://stats`: Total loaded vocabulary count, active pack, and system health.
112
+
113
+ ---
114
+
115
+ ## 🎨 Curated Prompt Templates
116
+
117
+ * `vocabulary_enhancer`: Elevates draft prose to match a requested tone (`literary`, `academic`, or `plain`) while strictly preserving intended meaning.
118
+ * `etymology_and_nuance`: Analyzes subtle shades of meaning between near-synonyms using classical origins and example sentences.
119
+ * `word_puzzle_assistant`: Solves crossword clues, word games, and anagrams against verified dictionary entries.
120
+
121
+ ---
122
+
123
+ ## 💻 CLI Options & Flags
124
+
125
+ When running `npx -y @hemingweb/wordnook-mcp`:
126
+
127
+ ```text
128
+ Options:
129
+ --port, -p <number> Run in HTTP/SSE mode on specified port (e.g. for Open WebUI)
130
+ --pack <packId> Set default active pack on startup (e.g. "en-kaikki" or "en-core")
131
+ --data-dir <path> Path to directory containing custom data packs (*.json.gz)
132
+ --version, -v Show version
133
+ --help, -h Show help banner
134
+ ```
135
+
136
+ ---
137
+
138
+ ## 🔗 Links & Documentation
139
+
140
+ * **Live Web App:** [https://wordnook.app](https://wordnook.app)
141
+ * **Interactive User Manual:** [https://wordnook.app/manual](https://wordnook.app/manual)
142
+ * **Complete User Manual (Markdown):** [https://wordnook.app/docs/USER_MANUAL.md](https://wordnook.app/docs/USER_MANUAL.md)
143
+ * **MCP Technical Specification:** [https://wordnook.app/docs/MCP_SERVER_SPECIFICATION.md](https://wordnook.app/docs/MCP_SERVER_SPECIFICATION.md)
144
+ * **Architecture Specification:** [https://wordnook.app/docs/SPECIFICATION.md](https://wordnook.app/docs/SPECIFICATION.md)
145
+
146
+ ---
147
+
148
+ ## 📄 License & Attribution
149
+
150
+ * WordNook MCP is licensed under **[CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)**.
151
+ * Lexicographical data includes content from Wordset (CC-BY-SA 4.0), Kaikki.org Wiktionary (CC-BY-SA 4.0), and Moby Thesaurus II (Public Domain).
@@ -1431,7 +1431,7 @@ async function createWordNookMcpServer(options = {}) {
1431
1431
  const server = new McpServer2(
1432
1432
  {
1433
1433
  name: "wordnook",
1434
- version: "1.0.21"
1434
+ version: "1.0.22"
1435
1435
  },
1436
1436
  {
1437
1437
  capabilities: {
@@ -1602,7 +1602,7 @@ Tools Exposed:
1602
1602
  `);
1603
1603
  process.exit(0);
1604
1604
  } else if (arg === "--version" || arg === "-v") {
1605
- console.error("wordnook-mcp v1.0.21");
1605
+ console.error("wordnook-mcp v1.0.22");
1606
1606
  process.exit(0);
1607
1607
  } else if ((arg === "--port" || arg === "-p") && args[i + 1]) {
1608
1608
  port = parseInt(args[i + 1], 10);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hemingweb/wordnook-mcp",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Offline-first linguistic Model Context Protocol (MCP) server providing dictionaries, thesauruses, and lemmatization for AI agents.",
5
5
  "type": "module",
6
6
  "license": "CC-BY-SA-4.0",