lantern-connect
v0.3.0
Published
CLI installer to connect AI tools (Claude, Gemini, Cursor) to Lantern
Maintainers
Readme
lantern-connect
CLI installer to connect AI tools to Lantern.
Installation
npx lantern-connectOr install globally:
npm install -g lantern-connect
lantern-connectUsage
# Production (default)
lantern-connect
# Local development with ngrok
lantern-connect --mcp-url https://your-ngrok-url.ngrok-free.dev/mcpOptions
| Option | Description | Default |
|--------|-------------|---------|
| --mcp-url <url> | MCP server URL | https://mcp.onlantern.com/mcp |
| --help, -h | Show help message | |
What it does
- Detects installed AI tools (Claude Code, Gemini CLI, Cursor)
- Configures each detected tool to connect to Lantern's MCP server
- Each tool authenticates with Lantern on first use (via OAuth)
Supported Tools
| Tool | Config Location | Method |
|------|-----------------|--------|
| Claude Code | ~/.claude.json | claude mcp add |
| Gemini CLI | ~/.gemini/settings.json | httpUrl config |
| Cursor | ~/.cursor/mcp.json | url config |
Claude Web & Desktop
For Claude Web and Claude Desktop, use the built-in custom connector:
- Go to Settings → Connectors → Add custom connector
- Name it Lantern and paste:
https://mcp.onlantern.com/mcp - Click Add, then Connect
After Installation
- Fully quit and reopen your AI tools (Cmd+Q on macOS)
- Authenticate when prompted by each tool on first use
- Start using Lantern:
- Say "save to lantern" to export a conversation
- Say "list my lantern conversations" to see your library
- Say "load my lantern collection" to import a collection
Local Development
# Start your local Lantern backend and MCP server
cd lantern && npm run dev
# Run the CLI with your local MCP server
cd lantern-connect
node bin/lantern-connect.js --mcp-url http://localhost:3002/mcpResetting / Uninstall
To remove Lantern configuration from all AI tools at once:
npx lantern-resetThis removes the Lantern MCP server from Claude Code, Gemini CLI, and Cursor. Restart your AI tools after running.
Manual Reset
If you prefer to reset manually:
Claude Code:
claude mcp remove lanternClaude Web & Desktop: Go to Settings → Connectors and remove the Lantern connector.
Gemini CLI:
nano ~/.gemini/settings.json
# Remove the "lantern" entry from mcpServers, then saveCursor:
nano ~/.cursor/mcp.json
# Remove the "lantern" entry from mcpServers, then saveTroubleshooting
Gemini CLI shows "Bad Request" for SSE
- Make sure your backend has the latest MCP session handling code
- Restart your backend server
Gemini CLI shows "Protected resource does not match"
- Run
npx lantern-resetto clear cached OAuth tokens - Then run
npx lantern-connectagain - Or manually delete
~/.gemini/mcp-oauth-tokens.json
CORS errors on localhost:3000
- Make sure your frontend's
.env.localhasNEXT_PUBLIC_API_URL=http://localhost:3001 - The
--mcp-urlflag is for the CLI/MCP tools, not the frontend
