I'm not even Catholic, but I found it refreshing to read Pope Leo XIV's thoughts about AI in his recent encyclical. It's not that I agree with everything (though so much of it is spot on), but it stands in striking contrast with the lack of serious AI discussion from secular world leaders.

And I don't think you need to be Catholic to appreciate that Leo is serious about understanding AI in terms of power in the political economy.

Many simplistic commentaries and reactions have tried to frame it as some kind of anti-AI smackdown. It is nothing of the sort; he even calls AI a "valuable tool." But he also recognizes that "the use of AI is never a purely technical matter," so we have to think about how systems are designed, aligned, and used. I guess "anti-AI" is what we call anyone besides the ridiculous, unserious techno-solutionist crowd who demands that we let them destroy all jobs without even attempting to present an alternative vision of dignified human life.

I think a more precise framing is that the encyclical is calling for a vision of pro-human ethics that needs to accompany the development and implementation of AI systems.

AI could make a corporations the ultimate middlemen of faith. Grokipedia certainly seems to me like an attempt to make Musk's AI a middleman of reality. And remember who just got funded in a record-breaking way? I think Protestants and Catholics alike can largely agree that it would be goofy to have a stochastic, artificial pope, especially when we know the hyper-rich have their thumbs on the scale.

But I think AI can be used in beneficial ways for believers. I've written before here about using Claude Code to help me rapidly build a robust "Psalm of the Day" website, mostly to make it more convenient for me to regularly read Psalms!

Now, I've also built an MCP (Model Context Protocol) server that gives AI agents (such Claude Code/Desktop) access to various tools for searching the Bible and retrieving scripture! Even if we're not fully sure how integrations like this will end up being used in agentic contexts, it is clear to me that semantic search for the Bible has value for ordinary Christians.

Here is the Github repo!

AI raises so many fascinating Christianity/religion-related questions for me:

  • Does God "count it" if I ask an LLM to pray for somebody? (you can think this is ridiculous, but what if someone had some form of aphasia after a TBI, stroke, etc. and is having trouble finding all the words to express a full prayer?)
  • Does it "count" for anything for a developer to tithe their Claude Code or Codex tokens to their church or other "biblical" projects?
  • As AI-related technologies change how information is retrieved and disseminated, how at risk are clergy jobs? Do faith communities need to take proactive steps to protect against this?
  • Do the different frontier model providers have different theological biases?
  • AI labs almost certainly train models on data from livestreams of churches' services. Can we get them to pay the churches for this?
  • If someone runs an AI-automated Instagram account that posts Bible quotes (for example), can that ever be an effective and morally-acceptable evangelization effort, or does it merely direct attention away from human-run accounts that have more capacity for building real online faith communities? (
  • Can we prevent AI from being used to enable/scale religious discrimination?

I can't pretend to have the answers to these questions, as I'm not a theologian or clergyman. But I don't think it's crazy to suggest that religious texts (of all faiths) can serve to anchor us to real (not-algorithmic, non-AI) human culture. Anyway, I think this mcp server is interesting from both a spiritual and engineering perspective. RAG often gets oversimplified.

Why I built a Bible MCP server

Scripture is an area where we want models/agents engaging directly with the text instead of just spewing the most probable crap.

Whether you're a believer or not, it's imperative that AI not hallucinate scripture. If you're a Christian, you obviously don't want AI to probabilistically make up crap in place of the word of God. And it's also imperative that the faith is represented correctly to those outside it for the sake of accuracy and interfaith relations.

If we drop the talk about "agents" for a second though, I think it's clear that the Bible is an interesting retrieval challenge. If you can remember the chapter and verse, it is pretty easy to find a specific passage. If you want to find verses by looking for words or concepts though, we start needing to use technology.

If we think about putting the Bible in a database, it is readily apparent that several different search/retrieval layers are necessary to find excerpts:

  1. Find by exact book, chapter, verse: good for famous or partially memorized verses.
  2. Full text search: if we want to find particular phrases or words but don't know where they'll be, this can be helpful. However, this hits limitations pretty quickly.
  3. Semantic search: Embedding models can turn text into numerical vectors in a many-dimensional space. In this space, text with a similar meaning is close together even if the words are drastically different. This lets us search. I think this is particularly interesting in the case of the bible because we can find which passages are most closely related to modern topics/terms that didn't exist in biblical times.
  4. Network relationships: Most text is not just blobs of standalone text. There are usually some sort of internal or external references to other relevant text (blogging is a great example of this). The Bible is a deeply self-referential text. Numerous books tell the same stories from different perspectives, and there are a lot of references to stuff that happened in earlier books

MCP servers simply expose tools, resources, and prompts to AI, and my Bible MCP server exposes these methods as tools: get_verse, get_passage, search_text, search_semantic, and get_cross_references.

A lot of discussion of Retrieval Augmented Generation (RAG) centers on #3 above, but the Bible is a legible example of some common failure modes of a naive, vector-only approach.

I like building RAG on SQL databases like PostgreSQL and SQLite because there is always something besides vector similarity that you want to be able to filter on. With the Bible, we are largely protected from issues with temporal staleness, but I did find it useful to add a testament filter parameter to my search tools. Also, having multiple translations necessitates being able to filter queries on that.

Vector retrieval with the Bible really is a gamechanger, but it's also a great example of a workflow where semantic search is only the first part. Passages from the Bible aren't just 1-liners; they take place in the context of the narrative arcs of their books and the whole Bible. If we really want to be thorough, we need to retrieve more context and cross references around any passages that the vector search finds.

In so many ways, this is natural SQL territory, so my server uses sqlite-vec . Given that supporting embedding models was another requirement for this setup, it was obvious that Python was the right language and ecosystem for this project as a local server.

Vector embeddings are an amazing technology, but they also have very clear limits if you are just embedding a bunch of documents from your business or scientific org and calling it a day. There's a lot of structure and relationships that your AI never sees when you do that. Even in a static corpus like the Bible, the structure and relationships can be everything.

Examples with Claude Desktop

One trend that has felt inescapable in America is the financialization of everything in life. So I had Claude dig into that and see what it could dig up:

Screenshot of Claude Desktop using the Bible MCP server's search_semantic tool. The user asks Claude to find verses matching the phrase "securitizing the lives and work of the poor to generate yield and float for wall street," and Claude returns a JSON response starting with Proverbs 11:24, followed by a discussion of the results including Proverbs 10:15 and 18:11 about wealth and poverty.

I also thought it would be funny to search for enshittification, and the embedding model didn't disappoint:

Screenshot of Claude Desktop calling the Bible MCP server's search_semantic tool with the query "enshittification." The tool returns Proverbs 25:23 as the top match, and Claude's response discusses higher semantic distances for the modern neologism, then highlights Isaiah 3:24 and 2 Peter 2:18 as playful matches for the concept of product/quality degradation.

I thought it was hilarious that it picked up this. It was an interesting parallel, and the scripture it found felt almost listicle-ish.

Proverbs 24:3 is a cool one that came up in some searches I had Claude do related to my current situation of moving to a new city!

Where open models come in

Nothing you provide to 3rd party AI providers is private or privileged. There are plenty of reasons to not want to let tech companies too deeply into your spiritual and personal life. And it's actually not just a matter of personal preferences about privacy. For someone like Elon Musk, who has proven himself willing to deploy enormous amounts of money into politics, getting even more detailed data about Americans' religious beliefs and lives could be a powerful tool.

Luckily, local open-weights models can utilize my Bible MCP server too! AnythingLLM Desktop is a great program for this and can be paired various model backends including LM Studio (a combination I've highlighted here before for making it easy to escape being dependent on cloud model providers).

Smaller/quantized models can be prone to hallucinating tool calls, especially since not all models are trained for tool calling.

Testing this MCP server with smaller models proved well worth the time in exposing areas where I could make the api more clear. The intelligence of the latest Claude models can hide little sticking points that will trip up smaller models. For example, I found that these models tended to try "NIV" as the translation parameter when it isn't an option (the server uses WEB and KJV for licensing reasons).

Context is another limitation with running these models. If you wanted to fit the entire book of Genesis in context of a local model, that can be a huge memory hog (if it even fits). The use case I had in mind was using an LLM to get a TLDR of an entire book of the Bible with the whole book in context.

I don't think we can handwave away environmental concerns either, but local models naturally will have lower environmental impacts if inference runs on a laptop compared to hyperscaler data centers.

Wrapping up

Vectors are a bad medium for keeping track of state! And relationships!

Sometimes, a naive approach to RAG is treated as something that can be all-purpose "AI-memory." Embeddings are only a part of how information needs to be stored and retrieved for AI. And the Bible example is static, this is very intentionally a read-only (though I am considering adding

Given that no LLM is morally neutral, this server provides a valuable ability to get a "second opinion" when using AI to discuss anything along these lines since MCP isn't tied to any single AI service.

I think it would be interesting to run servers with similar architecture for the Quran and Dharmic texts. If someone is serious about reading a diverse variety of religious texts, I think that could be great way to find starting points (because the total body of all human religious text is so large). I took a course in university that surveyed various world religious texts, so maybe AI could provide a similar experience but more democratized and customized?

Anyway, I hope you have found this interesting, and I am also open to feedback about my execution of the project since I don't work with Python a lot (I prefer R for a lot of my data science work, but the Python w/FastMCP stack seems good for local servers like this).