lantern-connect 0.1.1 → 0.1.3

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
@@ -32,7 +32,7 @@ lantern-connect --lantern-url https://your-lantern.com --mcp-url https://api.you
32
32
 
33
33
  | Option | Description | Default |
34
34
  |--------|-------------|---------|
35
- | `--mcp-url <url>` | MCP server URL | `https://api.onlantern.com/mcp` |
35
+ | `--mcp-url <url>` | MCP server URL | `https://mcp.onlantern.com/mcp` |
36
36
  | `--lantern-url <url>` | Lantern web URL for authentication | `https://onlantern.com` |
37
37
  | `--help, -h` | Show help message | |
38
38
 
@@ -122,6 +122,11 @@ nano ~/.cursor/mcp.json
122
122
  - Make sure your backend has the latest MCP session handling code
123
123
  - Restart your backend server
124
124
 
125
+ ### Gemini CLI shows "Protected resource does not match"
126
+ - Run `npx lantern-reset` to clear cached OAuth tokens
127
+ - Then run `npx lantern-connect` again
128
+ - Or manually delete `~/.gemini/mcp-oauth-tokens.json`
129
+
125
130
  ### CORS errors on localhost:3000
126
131
  - Make sure your frontend's `.env.local` has `NEXT_PUBLIC_API_URL=http://localhost:3001`
127
132
  - The `--mcp-url` flag is for the CLI/MCP tools, not the frontend
@@ -44,6 +44,32 @@ function removeFromJsonConfig(configPath, name) {
44
44
  }
45
45
  }
46
46
 
47
+ function clearGeminiOAuthCache(serverName) {
48
+ const cachePath = expandHome('~/.gemini/mcp-oauth-tokens.json')
49
+ if (!existsSync(cachePath)) {
50
+ return { cleared: false }
51
+ }
52
+
53
+ try {
54
+ const content = readFileSync(cachePath, 'utf-8')
55
+ const tokens = JSON.parse(content)
56
+
57
+ if (!Array.isArray(tokens)) {
58
+ return { cleared: false }
59
+ }
60
+
61
+ const filtered = tokens.filter(t => t.serverName !== serverName)
62
+ if (filtered.length === tokens.length) {
63
+ return { cleared: false }
64
+ }
65
+
66
+ writeFileSync(cachePath, JSON.stringify(filtered, null, 2))
67
+ return { cleared: true }
68
+ } catch (err) {
69
+ return { cleared: false }
70
+ }
71
+ }
72
+
47
73
  function removeClaudeCode() {
48
74
  try {
49
75
  execSync('claude mcp remove lantern', { stdio: 'pipe' })
@@ -83,6 +109,10 @@ async function main() {
83
109
  // Gemini CLI
84
110
  const geminiPath = expandHome('~/.gemini/settings.json')
85
111
  const geminiResult = removeFromJsonConfig(geminiPath, 'lantern')
112
+ const geminiOAuthResult = clearGeminiOAuthCache('lantern')
113
+ if (geminiOAuthResult.cleared) {
114
+ geminiResult.oauthCleared = true
115
+ }
86
116
  results.push({ name: 'Gemini CLI', ...geminiResult })
87
117
 
88
118
  // Cursor
@@ -94,7 +124,11 @@ async function main() {
94
124
  let anyRemoved = false
95
125
  for (const result of results) {
96
126
  if (result.found) {
97
- console.log(` ✓ ${result.name} - removed`)
127
+ const extra = result.oauthCleared ? ' (+ OAuth cache)' : ''
128
+ console.log(` ✓ ${result.name} - removed${extra}`)
129
+ anyRemoved = true
130
+ } else if (result.oauthCleared) {
131
+ console.log(` ✓ ${result.name} - OAuth cache cleared`)
98
132
  anyRemoved = true
99
133
  } else {
100
134
  console.log(` · ${result.name} - ${result.reason}`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lantern-connect",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "CLI installer to connect AI tools (Claude, Gemini, Cursor) to Lantern",
5
5
  "type": "module",
6
6
  "bin": {
package/src/auth.js CHANGED
@@ -4,7 +4,7 @@ import open from 'open'
4
4
 
5
5
  const CALLBACK_PORT = 8765
6
6
  const DEFAULT_LANTERN_URL = process.env.LANTERN_URL || 'https://onlantern.com'
7
- const DEFAULT_MCP_URL = process.env.MCP_URL || 'https://api.onlantern.com/mcp'
7
+ const DEFAULT_MCP_URL = process.env.MCP_URL || 'https://mcp.onlantern.com/mcp'
8
8
 
9
9
  function createSuccessHtml(email) {
10
10
  return `
package/src/index.js CHANGED
@@ -31,7 +31,7 @@ function parseArgs() {
31
31
  Usage: lantern-connect [options]
32
32
 
33
33
  Options:
34
- --mcp-url <url> MCP server URL (default: https://api.onlantern.com/mcp)
34
+ --mcp-url <url> MCP server URL (default: https://mcp.onlantern.com/mcp)
35
35
  --lantern-url <url> Lantern web URL (default: https://onlantern.com)
36
36
  --help, -h Show this help message
37
37
  `)