Skip to content

Commit a348780

Browse files
author
substrate-bot
committed
Add HTTP server with API key auth for tunneling, update sermon tools, clean up
1 parent 7e64545 commit a348780

File tree

5 files changed

+325
-237
lines changed

5 files changed

+325
-237
lines changed

README.md

Lines changed: 134 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -1,238 +1,210 @@
1-
# Logos Bible Software MCP Server
1+
# LogosBibleMCP
22

3-
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that connects AI assistants to [Logos Bible Software](https://www.logos.com/), with cross-platform support for Windows and macOS.
3+
MCP server for Logos Bible Software integration. Provides tools for Bible study, sermon research, and accessing your Logos data.
44

5-
## What This Does
5+
## Features
66

7-
- **12 MCP tools** that let AI assistants read Bible text, search Scripture, navigate Logos, access your notes/highlights/favorites, check reading plans, and explore word studies and factbook entries
8-
- **Cross-platform support** - Works on Windows and macOS
9-
- **Biblia API integration** - Fetch Bible text and search via free REST API
7+
- **Bible Text Retrieval**: Get passages with the Biblia API
8+
- **Sermon Access**: Read your sermon documents from Logos Sermon Builder
9+
- **Liturgical Filtering**: Filter sermons by season (Advent, Lent, Easter, etc.)
10+
- **Notes & Highlights**: Access your study notes and highlights
11+
- **Logos Integration**: Open passages, word studies, and Factbook in Logos
1012

11-
## Prerequisites
13+
## Installation
1214

13-
| Requirement | Details |
14-
|-------------|---------|
15-
| **Windows or macOS** | Windows 10/11 or macOS 10.15+ |
16-
| **Logos Bible Software** | Installed (tested with v48+) |
17-
| **Node.js** | v18+ (v20+ recommended) |
18-
| **Biblia API Key** | Free key from [bibliaapi.com](https://bibliaapi.com/) |
15+
### Prerequisites
1916

20-
## Setup
17+
- Node.js 18+
18+
- Logos Bible Software (Windows/macOS)
19+
- Biblia API key (free at [bibliaapi.com](https://bibliaapi.com))
2120

22-
### 1. Clone the repo
23-
24-
```bash
25-
git clone https://github.com/Perlsowisdom/LogosBibleMCP.git
26-
cd LogosBibleMCP
27-
```
28-
29-
### 2. Install dependencies and build
21+
### Setup
3022

3123
```bash
3224
cd logos-mcp-server
3325
npm install
3426
npm run build
35-
cd ..
36-
```
37-
38-
### 3. Get a Biblia API key
39-
40-
1. Go to [bibliaapi.com](https://bibliaapi.com/)
41-
2. Sign up for a free account
42-
3. Copy your API key
43-
44-
### 4. Configure environment variables
45-
46-
Create a `.env` file in the project root:
47-
27+
npm link # Makes logos-mcp-server available globally
4828
```
49-
BIBLIA_API_KEY=your_api_key_here
50-
```
51-
52-
Or set the `BIBLIA_API_KEY` environment variable in your MCP client configuration.
5329

54-
### 5. Configure MCP client
30+
### Configure MCP Client
5531

56-
Add to your MCP client configuration (e.g., Claude Desktop, Cline, etc.):
32+
Add to your MCP client config (Claude Desktop, etc.):
5733

58-
**Windows:**
5934
```json
6035
{
6136
"mcpServers": {
6237
"logos": {
63-
"command": "node",
64-
"args": ["C:/path/to/LogosBibleMCP/logos-mcp-server/dist/index.js"],
38+
"command": "logos-mcp-server",
6539
"env": {
66-
"BIBLIA_API_KEY": "your_api_key_here"
40+
"BIBLIA_API_KEY": "your-api-key-here"
6741
}
6842
}
6943
}
7044
}
7145
```
7246

73-
**macOS:**
74-
```json
75-
{
76-
"mcpServers": {
77-
"logos": {
78-
"command": "node",
79-
"args": ["/path/to/LogosBibleMCP/logos-mcp-server/dist/index.js"],
80-
"env": {
81-
"BIBLIA_API_KEY": "your_api_key_here"
82-
}
83-
}
84-
}
85-
}
86-
```
47+
## Tools
48+
49+
### Bible Study
50+
51+
| Tool | Description |
52+
|------|-------------|
53+
| `get_bible_text` | Retrieve Bible passage text |
54+
| `get_passage_context` | Get passage with surrounding verses |
55+
| `search_bible` | Search Bible for terms |
56+
| `get_cross_references` | Find related verses |
57+
| `navigate_passage` | Open passage in Logos UI |
8758

88-
## Available Tools
59+
### Sermon Research
8960

90-
| Tool | What it does |
61+
| Tool | Description |
9162
|------|-------------|
92-
| `navigate_passage` | Opens a passage in the Logos UI |
93-
| `get_bible_text` | Retrieves passage text (LEB default; also KJV, ASV, DARBY, YLT, WEB) |
94-
| `get_passage_context` | Gets a passage with surrounding verses for context |
95-
| `search_bible` | Searches Bible text for words, phrases, or topics |
96-
| `get_cross_references` | Finds related passages by extracting key terms |
97-
| `get_user_notes` | Reads your study notes from Logos |
98-
| `get_user_highlights` | Reads your highlights and visual markup |
99-
| `get_user_sermons` | Reads your sermon documents from Logos |
100-
| `get_favorites` | Lists your saved favorites/bookmarks |
101-
| `get_reading_progress` | Shows your reading plan status |
102-
| `open_word_study` | Opens a word study in Logos (Greek/Hebrew/English) |
103-
| `open_factbook` | Opens a Factbook entry for a person, place, or topic |
104-
| `get_study_workflows` | Lists available study workflow templates and active instances |
105-
106-
## Project Structure
63+
| `get_user_sermons` | Read sermon documents from Logos |
64+
65+
**Sermon Filtering Options:**
10766

10867
```
109-
LogosBibleMCP/
110-
├── logos-mcp-server/
111-
│ ├── package.json
112-
│ ├── tsconfig.json
113-
│ ├── src/
114-
│ │ ├── index.ts # MCP server entry point (12 tools)
115-
│ │ ├── config.ts # Cross-platform paths, API config
116-
│ │ ├── types.ts # Shared TypeScript types
117-
│ │ └── services/
118-
│ │ ├── reference-parser.ts # Bible reference normalization
119-
│ │ ├── biblia-api.ts # Biblia.com REST API client
120-
│ │ ├── logos-app.ts # Cross-platform URL scheme handling
121-
│ │ └── sqlite-reader.ts # Read-only Logos SQLite access
122-
│ └── dist/ # Built output (after npm run build)
68+
get_user_sermons
69+
title: "partial title match"
70+
after_date: "2025-01-01" # ISO date
71+
before_date: "2025-12-31" # ISO date
72+
liturgical_season: "lent" # advent, christmas, epiphany, lent, holy_week, easter, pentecost, ordinary
73+
year: 2025 # For liturgical season calculation
74+
limit: 20 # Max results
12375
```
12476

125-
## How It Works
77+
### User Data
78+
79+
| Tool | Description |
80+
|------|-------------|
81+
| `get_user_notes` | Read study notes |
82+
| `get_user_highlights` | Read highlights |
83+
| `get_favorites` | List bookmarks |
84+
| `get_reading_progress` | Show reading plan progress |
85+
86+
### Logos Integration
12687

127-
The MCP server integrates with Logos through three channels:
88+
| Tool | Description |
89+
|------|-------------|
90+
| `open_word_study` | Open word study in Logos |
91+
| `open_factbook` | Open Factbook entry |
92+
| `get_study_workflows` | List workflow templates |
12893

129-
- **Biblia API** - Retrieves Bible text and search results via the free REST API from Faithlife
130-
- **URL schemes** - Opens passages, word studies, and factbook entries directly in Logos using `logos4:///` URLs
131-
- **SQLite databases** - Reads your personal data (notes, highlights, favorites, workflows, reading plans) directly from Logos local database files (read-only, never modifies your data)
94+
## HTTP Server & Tunneling
13295

133-
## Logos Data Paths
96+
For remote access (e.g., tunneling to Zo Computer), use the HTTP server:
13497

135-
The server auto-detects your Logos data directory:
98+
### 1. Set Environment Variables
13699

137-
**Windows:**
138-
```
139-
%LOCALAPPDATA%\Logos\Logos\Documents\[random-id]\
100+
```bash
101+
# Required
102+
export BIBLIA_API_KEY="your-biblia-api-key"
103+
104+
# Required for tunneling (prevents unauthorized access)
105+
export LOGOS_MCP_API_KEY="your-secret-key-here"
140106
```
141107

142-
**macOS:**
108+
### 2. Start HTTP Server
109+
110+
```bash
111+
npm run start:http
112+
# or
113+
logos-http
143114
```
144-
~/Library/Application Support/Logos4/Documents/[random-id]/
115+
116+
The server runs on port 3000 by default:
117+
- SSE endpoint: `http://localhost:3000/sse`
118+
- Health check: `http://localhost:3000/health`
119+
120+
### 3. Create Tunnel
121+
122+
Using ngrok:
123+
124+
```bash
125+
ngrok http 3000
145126
```
146127

147-
If auto-detection fails, set the `LOGOS_DATA_DIR` environment variable:
128+
### 4. Configure mcporter
129+
130+
On Zo Computer, update your mcporter config (`/home/workspace/config/mcporter.json`):
148131

149132
```json
150133
{
151134
"mcpServers": {
152135
"logos": {
136+
"description": "Logos Bible Software (tunneled)",
137+
"command": "npx",
138+
"args": ["-y", "mcp-remote", "https://your-tunnel.ngrok.io/sse"],
153139
"env": {
154-
"BIBLIA_API_KEY": "your_key",
155-
"LOGOS_DATA_DIR": "C:/Users/YourName/AppData/Local/Logos/Logos/Documents/xxxxx"
140+
"LOGOS_MCP_API_KEY": "${LOGOS_MCP_API_KEY}"
156141
}
157142
}
158143
}
159144
}
160145
```
161146

162-
## Finding Your Logos Data Directory
163-
164-
**Windows:**
165-
```powershell
166-
dir "%LOCALAPPDATA%\Logos\Logos\Documents" /b
167-
```
168-
169-
**macOS:**
170-
```bash
171-
find ~/Library/Application\ Support/Logos4/Documents -maxdepth 1 -type d
172-
```
173-
174-
## Platform-Specific Features
175-
176-
| Feature | Windows | macOS |
177-
|---------|---------|-------|
178-
| Bible text via Biblia API |||
179-
| Search via Biblia API |||
180-
| Open passages in Logos |||
181-
| Open word studies |||
182-
| Open Factbook |||
183-
| Read notes/highlights |||
184-
| Read favorites |||
185-
| Read workflows |||
186-
| Check if Logos running |||
147+
Set the API key in Zo's Settings > Advanced > Secrets:
148+
- `LOGOS_MCP_API_KEY`: The same secret key you set on your Windows machine
187149

188-
## Troubleshooting
189-
190-
**"BIBLIA_API_KEY is not set"** - Make sure your environment includes the API key.
150+
### Windows Quick Start
191151

192-
**"Database not found"** - Your Logos data path differs from the expected location. Set `LOGOS_DATA_DIR` manually.
152+
Run `start-tunnel.bat` which will:
153+
1. Prompt for required API keys
154+
2. Build the server if needed
155+
3. Start the HTTP server
156+
4. Display tunneling instructions
193157

194-
**Logos doesn't open passages** - Make sure Logos Bible Software is running before using navigation tools.
158+
## CLI Tools
195159

196-
**Windows: "start command failed"** - Ensure Logos is properly installed and the `logos4:` URL scheme is registered.
197-
198-
## License
160+
```bash
161+
# Diagnose Logos data directory
162+
logos-diagnose diagnose
199163

200-
MIT
164+
# Show detailed database info
165+
logos-diagnose diagnose-raw
201166

202-
## Remote Access (Tunnel)
167+
# Show Blocks table (sermon content)
168+
logos-diagnose diagnose-blocks
203169

204-
To access your local Logos MCP from Zo or other remote clients:
170+
# Test sermon retrieval
171+
logos-diagnose test-sermons liturgical_season:"lent" year:2025
172+
```
205173

206-
### 1. Start the SSE Server
174+
## Development
207175

208-
```powershell
209-
cd LogosBibleMCP\logos-mcp-server
210-
$env:BIBLIA_API_KEY="1fb84969450248a49fe2812d3c60b182"
211-
npm run build
212-
npm run start:sse
176+
```bash
177+
npm run dev # Run with hot reload
178+
npm test # Run tests
179+
npm run build # Build to dist/
213180
```
214181

215-
This starts an HTTP server at `http://localhost:3000` with endpoints:
216-
- `/sse` - SSE endpoint for MCP connections
217-
- `/health` - Health check
218-
219-
### 2. Create a Tunnel with ngrok
182+
## Troubleshooting
220183

221-
1. Install ngrok: `winget install ngrok.ngrok`
222-
2. Sign up at [ngrok.com](https://ngrok.com) and get your auth token
223-
3. Configure: `ngrok config add-authtoken YOUR_TOKEN`
224-
4. Create tunnel: `ngrok http 3000`
184+
### "No sermons found"
225185

226-
ngrok will display a URL like `https://abc123.ngrok.io`.
186+
1. Ensure Logos is installed and has been run
187+
2. Check that sermons are synced locally (open Logos, go to Documents → Sermons)
188+
3. Run `logos-diagnose diagnose` to verify database location
227189

228-
### 3. Connect from Zo
190+
### "Database not found"
229191

230-
Once you have the tunnel URL, configure mcporter:
192+
Set the `LOGOS_DATA_DIR` environment variable to your Logos data folder:
231193

232194
```bash
233-
mcporter config add logos --url https://your-tunnel.ngrok.io/sse
195+
# Windows
196+
set LOGOS_DATA_DIR=C:\Users\YourName\AppData\Local\Logos\Documents\abc123.efg
197+
198+
# macOS
199+
export LOGOS_DATA_DIR=~/Library/Application Support/Logos4/Data/abc123.efg
234200
```
235201

236-
Or use the tunnel URL directly with any MCP client that supports SSE.
202+
### MCP client shows old tool definitions
237203

238-
**Note:** The tunnel URL changes each time you restart ngrok (unless you have a paid plan). You'll need to update the configuration with the new URL.
204+
1. Pull latest changes: `git pull`
205+
2. Rebuild: `npm run build`
206+
3. Restart your MCP client
207+
208+
## License
209+
210+
MIT

logos-mcp-server/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66
"main": "dist/index.js",
77
"bin": {
88
"logos-mcp-server": "dist/index.js",
9-
"logos-diagnose": "dist/cli.js"
9+
"logos-diagnose": "dist/cli.js",
10+
"logos-http": "dist/sse-server.js"
1011
},
1112
"scripts": {
1213
"build": "tsc",
1314
"dev": "tsx src/index.ts",
15+
"start:http": "node dist/sse-server.js",
16+
"start:stdio": "node dist/index.js",
17+
"diagnose": "node dist/cli.js diagnose",
1418
"test": "vitest run",
1519
"test:watch": "vitest"
1620
},

0 commit comments

Comments
 (0)