Ruby on Rails MCP server that provides a knowledge base for AI agents

Ruby on Rails MCP server that provides a knowledge base for AI agents
A Rails 8 MCP (Model Context Protocol) server that provides a knowledge base for AI agents. Elevate your AI applications with enhanced reasoning and dynamic tool usage through RAG-powered document retrieval.

Along with my son Mario Alvarez Navarro we have developed an open source application called Minerva.

It's a Ruby on Rails MCP (Model Context Protocol) server that provides a knowledge base for AI agents. Elevate your AI applications with enhanced reasoning and dynamic tool usage through RAG-powered document retrieval.

What is Minerva?

Minerva is a self-hosted knowledge base that connects directly to AI agents like Claude, Cursor, or any MCP-compatible tool. You feed it your documents and it makes them available to AI through semantic search, so your AI assistant can reason with your own data.

Instead of copy-pasting context into every conversation, Minerva lets your AI agent pull exactly the information it needs, when it needs it.

Features

  • Document Management - Create and organise markdown documents via an intuitive web UI.
  • PDF Processing - Upload PDFs with automatic text extraction. Drop a PDF and Minerva handles the rest.
  • Website Scraping - Import content from web pages and crawl entire sites to build your knowledge base.
  • RAG Search - Vector similarity search powered by pgvector embeddings. Minerva finds the most relevant documents for any query.
  • MCP Interface - Connect directly to Claude, Cursor, or any MCP-compatible AI agent. One endpoint, zero friction.

Architecture

We built Minerva with a focus on simplicity and minimal dependencies:

  • PostgreSQL with pgvector for vector storage (768-dimensional embeddings with HNSW indexing)
  • Ollama for local embedding generation using the nomic-embed-text model — no external API calls needed
  • Solid Queue / Solid Cache / Solid Cable for background jobs and caching — no Redis required
  • Propshaft + importmap-rails for assets — no Node.js required
  • Kamal for deployment

The entire stack runs on Rails 8 with PostgreSQL. That's it. No Redis, no Node.js, no complex infrastructure.

How it works

Minerva exposes a single /mcp endpoint that AI agents connect to. When an agent needs information, it calls the DocumentSearch tool through MCP, and Minerva returns the most relevant documents from your knowledge base using vector similarity search.

Setting it up with Claude Code is as simple as pointing to your Minerva instance:

{
  "mcpServers": {
    "minerva": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

Open Source

Minerva is fully open source under the MIT license. You can find the code, installation instructions, and documentation on GitHub:

github.com/jorgegorka/minerva

Contributions are welcome!