npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

letter-to-god-mcp-server

v1.0.3

Published

A Model Context Protocol (MCP) server that provides personalized Bible guidance and mentorship through AI integration with OpenAI's ChatGPT

Readme

Letter to God MCP Server

A Model Context Protocol (MCP) server that provides personalized Bible guidance and mentorship through AI integration with OpenAI's ChatGPT.

Features

  • Personalized Bible Guidance: Get customized spiritual guidance based on your name and current feelings
  • Three Scripture Selection: AI finds three relevant Bible scriptures for your situation
  • Personalized Letter from God: Receive a full-length letter written as if from God Almighty
  • Biblical Stories & Parables: Includes relevant stories and explanations for each scripture
  • Actionable Advice: Provides practical activities and actions to help cope and overcome problems
  • Multiple Access Methods: CLI interface and MCP server integration
  • Beautiful Terminal Output: Colored, formatted responses for easy reading

Quick Start

✅ Option 1: Use Instantly via NPX (No Install Required)

# Install dependencies
```bash
npm npx letter-to-god-mcp-server

Set your API key:

You must provide your OpenAI API key for the tool to work.

• Option A: Set environment variable

     export OPENAI_API_KEY="your-api-key-here"

• Option B: Create .env file in current directory

     echo "OPENAI_API_KEY=your-api-key-here" > .env

Place this .env file in the same directory where you run the command.

Option 2: Command Line Interface (Immediate Use)

The fastest way to get Bible guidance:

# Install dependencies
npm install

# Get guidance directly from command line
node cli.js --name "John" --feeling "anxious about my future"
node cli.js --name "Sarah" --feeling "struggling with forgiveness"
node cli.js -n "David" -f "feeling lost and confused"

# See all options
node cli.js --help

Option 3: MCP Server (For Integration)

Run as an MCP server for integration with MCP clients:

node index.js

Usage

The server provides one main tool:

getBibleGuidance

Parameters:

  • name (string, required): Your name
  • feeling (string, required): What you are feeling today or the problem you're facing

Example Usage: When connected to an MCP client, you can call:

getBibleGuidance({
  name: "John",
  feeling: "anxious about my future and feeling lost"
})

Response:

  • The AI will act as God Almighty and provide:
    • Three relevant Bible scriptures
    • A personalized letter with explanations
    • Biblical stories and parables
    • Practical actions and activities
    • All formatted as a direct message from God

Output

The server provides two types of output:

  1. Terminal Display: Full response is logged to the console with clear formatting
  2. MCP Response: Structured response returned to the MCP client

Technical Details

  • Model: Uses GPT-4 for high-quality responses
  • Max Tokens: 2000 tokens for comprehensive guidance
  • Temperature: 0.7 for balanced creativity and consistency
  • System Prompt: Configured to act as God Almighty with Biblical expertise

Example Terminal Output

=== Processing Bible guidance request ===
Name: John
Feeling: anxious about my future
Timestamp: 2025-01-20T14:45:00.000Z
==========================================

Sending request to OpenAI...

=== BIBLE GUIDANCE RESPONSE ===
My beloved child John,

I see your heart heavy with anxiety about your future...
[Full AI response with scriptures, stories, and guidance]
===============================

MCP Client Integration Guide

A. Using with Cline (VSCode Extension)

  1. Install Cline Extension in VSCode
  2. Configure MCP Server:
    • Open Cline settings
    • Add MCP server configuration:
    {
      "mcpServers": {
        "bible-expert": {
          "command": "node",
          "args": ["/path/to/your/project/index.js"],
          "cwd": "/path/to/your/project"
        }
      }
    }
  3. Use in Cline:
    • Start a conversation with Cline
    • Ask: "Use the getBibleGuidance tool with name 'John' and feeling 'anxious about my future'"
    • Cline will call your MCP server and display the Bible guidance

B. Using with Claude Desktop

  1. Locate Configuration File:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add Server Configuration:

    {
      "mcpServers": {
        "bible-expert": {
          "command": "node",
          "args": ["/absolute/path/to/your/project/index.js"],
          "cwd": "/absolute/path/to/your/project"
        }
      }
    }
  3. Restart Claude Desktop

  4. Use in Conversations:

    Can you use the getBibleGuidance tool to help me? 
    My name is Sarah and I'm feeling overwhelmed with work stress.

C. Using with Other MCP Clients

Generic Configuration:

  • Server Command: node index.js
  • Working Directory: Your project directory
  • Transport: stdio
  • Tool Name: getBibleGuidance
  • Required Parameters: name (string), feeling (string)

D. Manual MCP Testing

Test with MCP Inspector (if available):

# Install MCP inspector
npm install -g @modelcontextprotocol/inspector

# Run inspector
mcp-inspector node index.js

Direct stdio communication:

# Start server
node index.js

# Send JSON-RPC messages (example)
{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}
{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {"name": "getBibleGuidance", "arguments": {"name": "John", "feeling": "anxious"}}}

Troubleshooting

Common Issues

  1. "API key not configured":

    • Check your .env file has the correct OpenAI API key
    • Ensure the key starts with sk-
  2. "Server not connecting":

    • Verify the path to index.js is correct in your MCP client config
    • Check that Node.js is installed and accessible
    • Ensure all dependencies are installed (npm install)
  3. "Tool not found":

    • Restart your MCP client after configuration changes
    • Verify the server is running without errors
    • Check the tool name is exactly getBibleGuidance
  4. "No response from OpenAI":

    • Check your internet connection
    • Verify your OpenAI API key has sufficient credits
    • Check OpenAI service status

Debug Mode

Run the server with debug output:

DEBUG=* node index.js

Testing Connection

Use the test script to verify everything works:

node test-server.js

Error Handling

The server includes comprehensive error handling for:

  • OpenAI API failures
  • Missing API keys
  • Network issues
  • Invalid responses
  • MCP protocol errors

All errors are logged to the console and returned as structured responses to the MCP client.

Package Scripts

Add these to your package.json for convenience:

{
  "scripts": {
    "start": "node index.js",
    "cli": "node cli.js",
    "test": "node test-server.js",
    "build": "npx tsc"
  }
}

Then use:

npm start              # Start MCP server
npm run cli -- --name "John" --feeling "anxious"  # CLI usage
npm test               # Test server
npm run build          # Compile TypeScript