Repository navigation
Add translation listing and verse fetching to Bible MCP server - #78
Merged
Merged
Conversation
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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()withfetchSimpleChapterJson()that uses the simplified.simple.jsonendpoint 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→getBibleReferenceandfetch→fetchChapterfor clarity and consistency.New data structures: Added
TranslationSummaryinterface andfilterTranslations()utility function for flexible translation filtering.Enhanced error handling: Added
error()helper function for consistent error responses in MCP tools.Notable Implementation Details
fetchVerse()tool automatically strips the verse number prefix for single-verse results for cleaner output.https://claude.ai/code/session_01J6xhi8xAhoc83gHsJj2Luf