Uses FastAPI framework to provide REST API endpoints alongside MCP protocol support for Bible passage retrieval
Integrates with GitHub Copilot to enable AI-assisted Bible passage lookup and retrieval through natural language queries
Uses Pydantic models for data validation and type safety in Bible passage requests and configuration management
Built with Python 3.10+ runtime environment for Bible passage retrieval and MCP server functionality
Provides OpenAPI documentation through Swagger UI for exploring and testing Bible passage retrieval REST API endpoints
Bible MCP Server
A Model Context Protocol (MCP) server that provides Bible passage retrieval functionality using the mcp-weather core infrastructure.
This server enables AI assistants to access Bible passages from various translations, with support for multiple deployment modes:
--mode stdio(default): MCP protocol over stdin/stdout for direct AI assistant integration--mode mcp: MCP protocol over HTTP for networked AI assistant access--mode rest: Both REST API and MCP protocol over HTTP for maximum flexibility
Features
The Bible MCP Server provides:
MCP Tools (for AI assistants)
get_passage(passage, version)- Retrieve Bible passages. Supports multiple passages separated by semicolons (e.g., "John 3:16; Romans 8:28").
REST API Endpoints
GET /health- Health checkGET /info- Service informationPOST /passage- Get Bible passageGET /docs- OpenAPI documentation (Swagger UI)
Supported Bible Versions
ESV (English Standard Version)
NIV (New International Version)
KJV (King James Version)
NASB (New American Standard Bible)
NKJV (New King James Version)
NLT (New Living Translation)
AMP (Amplified Bible)
MSG (The Message)
Installation
Prerequisites
Python 3.10+
uvpackage manager
Installing uv
On Linux/macOS:
On Windows:
Alternatively, you can install uv using pip:
After installation, restart your terminal or run source ~/.bashrc (Linux/macOS) or restart your command prompt (Windows).
Step 1: Install Dependencies
Step 2: Configure Environment
Usage
The Bible MCP server supports three deployment modes via command-line arguments:
Mode 1: stdio (Default) - Direct AI Assistant Integration
Perfect for direct integration with AI assistants like GitHub Copilot, Claude Desktop, etc.
Mode 2: mcp - MCP Protocol over HTTP
Provides MCP protocol over HTTP at http://localhost:3000/mcp for networked AI assistant access.
Mode 3: rest - Full HTTP Server (REST + MCP)
The server will start at http://localhost:3000 with:
MCP endpoint:
http://localhost:3000/mcpREST API:
http://localhost:3000/*API docs:
http://localhost:3000/docsHealth check:
http://localhost:3000/health
Test the MCP Tools
You can test the MCP tools by connecting GitHub Copilot or using a test client:
Then ask Copilot:
"Show me John 3:16"
"What does Romans 8 say?"
"Read Psalm 23 in NIV"
Test the REST API
CLI Help and Options
Environment Variables (Alternative to CLI)
You can also configure the server using environment variables:
Test All Modes
Run the comprehensive test suite:
Or try the interactive curl examples:
Project Structure
Core.utils Integration
This project uses the core.utils pattern from mcp-weather for dynamic documentation:
instructions.md: Comprehensive feature documentation in markdown@inject_docstring: Dynamically injects markdown into MCP tool docstringsload_instruction: Loads markdown for REST API documentationSingle source of truth: Same documentation for both MCP tools and REST endpoints
How It Works
Features Pattern (Automatic Discovery)
This server uses automatic feature discovery - just like mcp-weather!
Add a new feature in 4 steps:
Create feature directory:
features/my_feature/Add instructions.md: Comprehensive documentation in markdown
Add tool.py: With
register_tool(mcp, service)function using@inject_docstringAdd routes.py (optional): With
create_router(service)function usingload_instruction
Example feature structure:
That's it! The service automatically:
Discovers your feature
Registers MCP tools from
tool.pyIncludes REST routes from
routes.pyLoads documentation from
instructions.md
No manual registration needed!
1. Configuration Layer (config.py)
Extends core configuration classes with service-specific settings:
2. Business Logic Layer (bible_service.py)
Pure business logic, independent of MCP/REST:
3. MCP Service Wrapper (service.py)
Implements BaseService to expose business logic via MCP:
4. Server Implementation (server.py)
Extends BaseMCPServer to create the complete server:
Key Benefits of Using mcp-weather Core
By using mcp-weather as a dependency, you get:
✅ No boilerplate - Server infrastructure is ready to use
✅ Multiple deployment modes - stdio, MCP-only HTTP, REST+MCP HTTP via CLI
✅ Dynamic documentation - Markdown-based docs via core.utils
✅ Dual interfaces - MCP + REST API automatically
✅ Configuration - Environment variable management
✅ Error handling - Comprehensive exception handling
✅ Type safety - Full Pydantic models and type hints
✅ Async support - Async-first design throughout
✅ Logging - Structured logging built-in
✅ CORS - Configurable CORS support
✅ Health checks - Standard endpoints
✅ Testing - Comprehensive test suite included
Customization
Add New MCP Tools
Edit mcp_bible/service.py:
Add New REST Endpoints
Edit mcp_bible/server.py:
Add New Configuration
Edit mcp_bible/config.py:
Troubleshooting
Import Errors
Make sure you're importing from core, not mcp_weather.core:
Module Not Found
Make sure mcp-weather is installed:
If not installed, install it:
Features Implemented ✅
✅ Multiple deployment modes (stdio, mcp, rest)
✅ CLI interface with comprehensive help
✅ Dynamic documentation using core.utils
✅ Bible passage retrieval from BibleGateway.com
✅ 8 Bible translations supported
✅ Multiple passage support (semicolon-separated)
✅ Comprehensive test suite with mode testing
✅ REST API examples and curl scripts
✅ Auto-discovery of features
✅ Structured logging throughout
Next Steps
Add authentication providers (Authentik integration)
Add more Bible API sources (Bible API, ESV API)
Implement passage search and concordance
Add daily verses and reading plans
Add Redis caching for performance
Add metrics and monitoring
Add Docker deployment examples
Learn More
License
This project is provided as-is for use and modification.