Skip to content

Add translation listing and verse fetching to Bible MCP server - #78

Merged
KallynGowdy merged 6 commits into
mainfrom
claude/confident-babbage-p58a6l
Oct 8, 2026
Merged

KallynGowdy merged 6 commits into
mainfrom
claude/confident-babbage-p58a6l

Conversation

@KallynGowdy

Copy link
Copy Markdown
Collaborator

Summary

This PR enhances the Bible MCP server with new capabilities for discovering available translations and fetching individual verses, while also refactoring the chapter fetching to use a simplified JSON format.

Key Changes

  • New listTranslations() tool: Lists available Bible translations from the API with optional filtering by language (ISO 639-3 codes or language names) and translation name. Includes caching of the translations list and case-insensitive substring matching.

  • New fetchVerse() tool: Directly retrieves the text of a single verse or verse range (e.g., "John 3:16" or "John 3:16-18") without requiring a separate reference lookup step.

  • Refactored chapter fetching: Replaced fetchChapterJson() with fetchSimpleChapterJson() that uses the simplified .simple.json endpoint where verse content is pre-flattened into single text strings, eliminating the need for complex content parsing.

  • Removed complex verse parsing: Deleted flattenVerseContent() function since the simplified format already provides text as a single string per verse.

  • Tool naming improvements: Renamed search → getBibleReference and fetch → fetchChapter for clarity and consistency.

  • New data structures: Added TranslationSummary interface and filterTranslations() utility function for flexible translation filtering.

  • Enhanced error handling: Added error() helper function for consistent error responses in MCP tools.

Notable Implementation Details

  • Translation filtering supports both exact language code matching and partial name matching across multiple fields (id, name, englishName, shortName, languageName, languageEnglishName).
  • The fetchVerse() tool automatically strips the verse number prefix for single-verse results for cleaner output.
  • Translations are cached per API base URL to avoid repeated fetches.
  • Updated README to document all four tools and their capabilities.

https://claude.ai/code/session_01J6xhi8xAhoc83gHsJj2Luf

claude added 6 commits October 7, 2026 18:58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J6xhi8xAhoc83gHsJj2Luf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J6xhi8xAhoc83gHsJj2Luf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J6xhi8xAhoc83gHsJj2Luf
Accepts any translation id from listTranslations() in addition to the
BSB/WEB/WLC/SBL aliases, and falls back to the translation's own book
names when a book isn't found in BSB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J6xhi8xAhoc83gHsJj2Luf
@KallynGowdy
KallynGowdy merged commit 0d08343 into main Oct 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants