lexic-mcp 0.1.9 → 0.1.11

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.md CHANGED
@@ -25,7 +25,21 @@ npm install
25
25
  npm run build
26
26
  ```
27
27
 
28
- ### 2. Get a PAT from Lexic
28
+ ### 2. Authenticate
29
+
30
+ **Option A: OAuth (Recommended)**
31
+
32
+ The simplest way to authenticate - no tokens to manage:
33
+
34
+ ```bash
35
+ lexic-mcp login
36
+ ```
37
+
38
+ This opens your browser to authenticate with Lexic. Your credentials are stored securely and refreshed automatically.
39
+
40
+ **Option B: Personal Access Token (PAT)**
41
+
42
+ For CI/CD or environments without browser access:
29
43
 
30
44
  1. Log into [Lexic](https://lexic.io)
31
45
  2. Go to Settings → API Tokens
@@ -34,28 +48,25 @@ npm run build
34
48
 
35
49
  ### 3. Configure Claude Code
36
50
 
37
- Add to your Claude Code settings (`~/.config/claude/settings.json`):
51
+ **With OAuth (after running `lexic-mcp login`):**
38
52
 
39
53
  ```json
40
54
  {
41
55
  "mcpServers": {
42
56
  "lexic": {
43
- "command": "lexic-mcp",
44
- "env": {
45
- "LEXIC_PAT": "pat_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
46
- }
57
+ "command": "lexic-mcp"
47
58
  }
48
59
  }
49
60
  }
50
61
  ```
51
62
 
52
- Or if running from source:
63
+ **With PAT:**
64
+
53
65
  ```json
54
66
  {
55
67
  "mcpServers": {
56
68
  "lexic": {
57
- "command": "node",
58
- "args": ["/path/to/lexic-mcp/dist/index.js"],
69
+ "command": "lexic-mcp",
59
70
  "env": {
60
71
  "LEXIC_PAT": "pat_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
61
72
  }
@@ -171,15 +182,29 @@ Lexic API side. This server's responsibilities are:
171
182
  2. Forward tool calls to API
172
183
  3. Return responses unchanged (preserving _meta)
173
184
 
185
+ ## CLI Commands
186
+
187
+ ```bash
188
+ lexic-mcp login # Authenticate via browser OAuth flow
189
+ lexic-mcp logout # Clear stored credentials
190
+ lexic-mcp status # Show authentication status
191
+ lexic-mcp version # Show version
192
+ lexic-mcp # Start MCP server (default)
193
+ ```
194
+
174
195
  ## Environment Variables
175
196
 
176
197
  | Variable | Required | Default | Description |
177
198
  |----------|----------|---------|-------------|
178
- | `LEXIC_PAT` | Yes | - | Personal Access Token |
199
+ | `LEXIC_PAT` | No* | - | Personal Access Token (alternative to OAuth) |
179
200
  | `LEXIC_API_URL` | No | `https://api.lexic.io/api` | Lexic API base URL |
180
201
  | `LOG_LEVEL` | No | `info` | Logging level (debug, info, warn, error) |
181
202
 
182
- > **Note**: Domains are determined by the API based on your PAT permissions. No local domain configuration is needed.
203
+ \* Either OAuth credentials (via `lexic-mcp login`) or `LEXIC_PAT` is required.
204
+
205
+ > **Note**: Domains are determined by the API based on your authentication. No local domain configuration is needed.
206
+
207
+ For advanced OAuth deployment options (HTTP transport, remote servers), see [docs/oauth.md](docs/oauth.md).
183
208
 
184
209
  ## Customizing Templates
185
210
 
@@ -209,7 +234,8 @@ npm run dev
209
234
 
210
235
  ### "Invalid or expired token"
211
236
 
212
- Your PAT has expired (max 30 days). Generate a new one in Lexic.
237
+ - **With OAuth**: Run `lexic-mcp login` to re-authenticate
238
+ - **With PAT**: Generate a new token in Lexic (PATs expire after 30 days)
213
239
 
214
240
  ### "Failed to connect to Lexic"
215
241
 
@@ -220,6 +246,14 @@ Check that the Lexic API is accessible. If using a self-hosted instance, verify
220
246
  1. Restart Claude Code after changing settings
221
247
  2. Check server logs: `LOG_LEVEL=debug lexic-mcp`
222
248
 
249
+ ### Check authentication status
250
+
251
+ ```bash
252
+ lexic-mcp status
253
+ ```
254
+
255
+ This shows your current authentication method and whether credentials are valid.
256
+
223
257
  ## License
224
258
 
225
259
  MIT