How to Implement Model Context Protocol (MCP) in Rails: 3 Approaches

How to Implement Model Context Protocol (MCP) in Rails: 3 Approaches When I started building Agentify, I took the straightforward path: hardcode the tool integrations directly into my Rails application. Need weather data? Write a method that calls the weather API. Need to search knowledge bases? Build it into the agent logic. It worked, but it wasn’t sustainable. Then the Model Context Protocol (MCP) standard emerged, promising a way to standardize tool interactions between AI agents and external services. Instead of building every integration myself, I could tap into a growing ecosystem of MCP servers. The question was: how do you actually implement this in a real Rails application? ...

May 29, 2025 · 8 min · Rida Al Barazi

What I Learned This Week: 12-Factor Agents, Prompt Security, and Voice Interfaces

What I Learned This Week 1. 12-Factor Agents This week I came across the 12-Factor Agents framework by HumanLayer, which adapts the well-known 12-Factor App principles for building robust and maintainable AI agents. Notable principle: Own Your Context Window Rather than sending the full conversation history with each agent interaction, this principle encourages summarizing or explicitly controlling the context that gets passed along. It’s a smart approach for performance and clarity — especially in longer or multi-agent flows. ...

May 9, 2025 · 2 min · Rida Al Barazi