I built MCP on Ruby to help developers turn any Rails API into an MCP server

1 NinjaGems 1 4/30/2025, 7:37:59 AM github.com ↗

Comments (1)

NinjaGems · 10h ago
I built MCP on Ruby, a gem that turns your Rails app into a fully-featured LLM server following the Model Context Protocol standard.

- What is it? Think of MCP as "REST for LLMs" - it standardizes how apps talk to AI models.

My implementation brings this to Ruby/Rails with:

Provider adapters for OpenAI & Anthropic (just add your API key)

Persistent storage options (memory, Redis, ActiveRecord)

Streaming responses for dynamic UIs

File handling & tool calling support

*Rails integration with just a few lines of code

- Why I built it I wanted a clean, Rails-friendly way to add AI capabilities without writing boilerplate for each provider. The existing MCP implementations were Python-focused, so I built this for the Ruby community.

- The ActiveRecord storage (just released in v0.3.0) lets you store conversations in your existing Rails database.

- Try it out: https://github.com/nagstler/mcp_on_ruby