Skip to main content
Glama
README.md•5.66 kB
# EGW Writings Chat CLI A powerful command-line interface that lets you chat with Ellen G. White's writings using AI and our deployed MCP server. ## šŸš€ Quick Start ### 1. Setup Environment Copy the example environment file and configure your LLM API: ```bash cp .env.example .env ``` Edit `.env` with your preferred LLM provider: #### OpenAI (Default) ```env LLM_API_KEY=sk-your-openai-key LLM_BASE_URL=https://api.openai.com/v1 LLM_MODEL=gpt-3.5-turbo ``` #### Anthropic Claude ```env LLM_API_KEY=sk-ant-your-claude-key LLM_BASE_URL=https://api.anthropic.com/v1 LLM_MODEL=claude-3-haiku-20240307 ``` #### Google Gemini ```env LLM_API_KEY=your-gemini-key LLM_BASE_URL=https://generativelanguage.googleapis.com/v1beta LLM_MODEL=gemini-pro ``` #### Local LLM (Ollama) ```env LLM_API_KEY=ollama LLM_BASE_URL=http://localhost:11434/v1 LLM_MODEL=llama2 ``` ### 2. Install Dependencies ```bash npm install ``` ### 3. Start Chatting ```bash node egw-chat-cli.js ``` Or use the package.json version: ```bash # Copy CLI package configuration cp package-cli.json package.json npm install npm start ``` ## šŸ’¬ Usage Examples ### Search EGW Writings ``` šŸ“š EGW Chat > search for prayer šŸ” Using search_local tool to search EGW writings... šŸ“– Answer: I found several passages about prayer in Ellen G. White's writings: 1. **Steps to Christ** - Chapter on prayer 2. **Prayer** - Entire book dedicated to prayer 3. **Gospel Workers** - Multiple sections on prayer effectiveness The writings emphasize that prayer is communion with God, essential for spiritual growth... ``` ### Get Book Information ``` šŸ“š EGW Chat > tell me about book 5 šŸ” Using get_local_book tool to search EGW writings... šŸ“– Answer: **Book Information:** - **Title**: The Desire of Ages - **Author**: Ellen G. White - **Year**: 1898 - **Type**: Book - **Description**: The life of Christ from His birth to His ascension This is one of EGW's most comprehensive works... ``` ### List Available Books ``` šŸ“š EGW Chat > list all books šŸ” Using list_local_books tool to search EGW writings... šŸ“– Answer: **Available EGW Books:** 1. Steps to Christ 2. The Desire of Ages 3. Patriarchs and Prophets 4. Prophets and Kings 5. The Acts of the Apostles 6. The Great Controversy 7. Christ's Object Lessons 8. Education 9. Early Writings 10. Testimonies for the Church (9 volumes) And 40+ more books available... ``` ### General Questions ``` šŸ“š EGW Chat > What did Ellen White teach about health? šŸ’¬ Response: Ellen G. White taught extensively about health as part of the "health message"... ``` ## šŸ›  Available Tools The CLI automatically connects to our EGW MCP server with these tools: 1. **search_local** - Search EGW writings database for specific content 2. **get_local_book** - Get information about a specific book by ID 3. **get_local_content** - Get content from a specific book (with pagination) 4. **list_local_books** - List all available books 5. **get_database_stats** - Get database statistics ## šŸ”§ Features - **šŸ¤– AI-Powered**: Uses LLM to understand your questions and format responses - **šŸ“š Complete Database**: Access to 1.5GB of EGW writings - **šŸ” Smart Search**: Intelligent tool selection based on your queries - **šŸ’¬ Conversational**: Natural language interface - **⚔ Fast**: Direct connection to deployed MCP server - **🌐 Multiple LLMs**: Support for OpenAI, Claude, Gemini, and local models ## šŸ“‹ Commands ### Chat Commands - Any natural language query about EGW writings - "exit" or "quit" to leave the CLI - Ctrl+C to force quit ### Query Examples - "search for [topic]" - "tell me about book [number]" - "list all books" - "what did EGW say about [topic]" - "how many books do you have?" - "get content from book [number]" ## šŸ”Œ How It Works 1. **MCP Connection**: Connects to `@pythondev-pro/egw_writings_mcp_server` on Smithery 2. **AI Analysis**: LLM analyzes your query to determine which MCP tool to use 3. **Tool Execution**: Executes the appropriate MCP tool with your parameters 4. **Response Formatting**: LLM formats the results in a helpful, conversational way 5. **Natural Chat**: Provides spiritual insights and practical applications ## šŸ›  Development ### Files Structure ``` egw-chat-cli.js # Main CLI application .env.example # Environment variables template package-cli.json # CLI package dependencies README-CLI.md # This documentation ``` ### Requirements - Node.js >= 14.0.0 - LLM API key (OpenAI, Claude, Gemini, or local) - Internet connection for MCP server access ## 🚨 Troubleshooting ### Common Issues **"LLM_API_KEY environment variable is required"** - Ensure you've created a `.env` file with your API key - Copy `.env.example` to `.env` and fill in your credentials **"Failed to connect to MCP server"** - Check your internet connection - Ensure the MCP server is running on Smithery - Try again after a few moments **"Tool execution timeout"** - The database query might be taking too long - Try with more specific search terms - Use lower limits for large searches **"LLM API error"** - Check your API key is valid - Ensure you have credits/usage available - Verify the base URL is correct for your provider ## šŸ“ž Support For issues or questions: 1. Check this README first 2. Verify your `.env` configuration 3. Ensure internet connectivity 4. Create an issue on the GitHub repository ## šŸ“œ License MIT License - see LICENSE file for details. ## šŸ™ Acknowledgments - Ellen G. White Estate for the writings - Smithery platform for MCP deployment - LLM providers for AI capabilities - Open source community for tools and libraries

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pythondev-pro/egw_writings_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server