shop_mcp_server
An MCP server in Rails that gives Claude real access to a store's products, orders and inventory, with semantic search on pgvector.
Project · Tool calling and MCP client in Ruby on Rails
A shopping chat built with Rails 8 where the AI decides when to search Shopify's live Global Catalog over MCP and answers with real products, prices and links.
An AI model with no way to look things up will happily invent a product, a price or a link. For shopping that is a real problem: a made-up price is worse than no answer.
A Rails chat app that gives the model one tool, SearchProducts, and lets it decide when to use it. When a question needs real product data, the model asks for the tool, the app searches Shopify’s live Global Catalog, and the model answers from what came back: up to three products, each reduced to a title, a price and a URL.
It is the same tool calling pattern behind the shopping features in ChatGPT, Perplexity and Copilot, built from scratch in Ruby.
ChatResponseJob on Solid Queue builds a RubyLLM chat with the SearchProducts tool attached.tools/call to Shopify’s catalog MCP endpoint.Replies never reached the browser. The job and the web server are separate processes, and Action Cable’s default async adapter only broadcasts inside one process. I switched to Solid Cable, which passes broadcasts through a shared database, with no Redis needed.
The assistant forgot the conversation. Each job builds a fresh chat, so on the second message the model had no memory of the first. The fix replays saved messages into the new chat, and a spec covers it (“My name is Alex”, then “What is my name?”).
An MCP gem crashed on the handshake. ruby_llm-mcp failed on Shopify’s response, so I filed ruby_llm-mcp#155 and called the endpoint directly with a small hand-written JSON-RPC client over Net::HTTP.
acts_as_chat could not be used and persistence is written by hand.Works end to end: chat, live catalog search and streamed replies. It is a learning and portfolio project. It only searches (no cart or checkout) and returns at most three products per search.
Need something like this in your own product? See AI engineering and integration and Shopify, BigCommerce and e-commerce.
An MCP server in Rails that gives Claude real access to a store's products, orders and inventory, with semantic search on pgvector.
An AI agent that scores how discoverable a Shopify product is to AI shopping assistants (GEO and AEO).
A Rails support agent, in progress, that looks up real order data with tools and is designed to ask a human before any risky action.