// ROSIEBOT: MCP IN ACTION AT RIVET

RosieBot: MCP in action at RIVET

Jul 16, 2025 · Phil Borel · 6 min read

Note: this is an old post, ported from my old blog. I originally wrote it for a talk I gave on July 16, 2025. MCP & the tooling around it have moved a long way since, so treat the specifics as a snapshot. It's the hands-on follow-up to A Framework for Building AI Features in SaaS Applications.


Thesis: AI fills product gaps & AI features are product-feedback mechanisms built into your product

SaaS companies (e.g., RIVET) will start to use AI (chatbot interfaces) to…

  1. Fill gaps with easy-to-implement (low-quality) product development experiences powered by a chatbot interface
  2. Plan high-quality product development experiences informed by customer usage of the chatbot interface
  3. Expose chatbot interfaces powered by data integrated from other products to provide customer value enabled by that data

Strengths:

  1. 💬 Flexible interface (NLP) - fills gaps
  2. 📊 Usage patterns - feedback over millions of possible product outcomes

Weaknesses:

  1. ❌ "Good enough" is often not enough:
    • Accuracy
    • Consistency
    • Convention vs Configuration
  2. ❌ Distribution (MCP is filling a gap, but there's a lack of easy setup for AI features)
  3. ❌ Advanced use cases need a sophisticated user (not everyone is a prompt engineer)

The chatbot has a place, but it is limited: Users want to achieve outcomes. They crave focused solutions to their problems - they don't want to ask the bot to design the dashboard every time, they just want the best dashboard for their problem. Once the AI novelty wears off (it already has for many), users will grow impatient with the "Chatbot UI for Everything" model.


Data Types: Peripheral vs Contextual

Peripheral Data

Peripheral: Generally available data (I can scrape this data off of a website without logging in)

  • public API docs
  • public marketing materials
  • product training resources
  • sales collateral

Contextual Data

Contextual: Data with context on the specific user & use case (the user must be authenticated)

  • the user's own usage data (what did the user do right before querying the bot, which features does this user use most/least often, what is the user's persona)
  • the user's data in the app (e.g., the user's org's workers, jobs, assignments)

MCP: What is it & how does it work?

Model Context Protocol (MCP) is a pre-agreed upon standard for structuring communications between models (LLMs) and tools (operations over datasets). MCP can be used to help AI devs create Agents.

💡 MCP unlocks contextual data 💡

Think "REST for AI"

Data access for AI apps

An AI app like Claude can't see your customers' data in your product. An MCP server gives it a set of tools it can call to go get that data on the user's behalf. Here's Claude calling a RIVET get_all_job_reports tool to answer a question about my jobs (and the tool failing, which will be a theme):

Claude calling a get_all_job_reports MCP tool to answer "How many jobs do I have this week that are active?" & getting "Failed to retrieve job reports data" back

Client-server design

User → MCP Client → LLM
                  → MCP Server → Tools (e.g., external APIs)

The MCP client sits in the middle. It tells the LLM which tools exist, the LLM decides which tool (if any) would help answer the query, & the client asks the MCP server to actually run it.

Ecosystem alternatives

  • Function Calling
  • Vectorized DB access
  • A2A

How to get started?

  • Assuming you have public APIs
  • Set up an MCP client & server
  • Implement inter-service auth
  • Tune your settings
  • Figure out that your public APIs are not suited for this type of data access
  • Create purpose-built APIs for MCP
  • End up using vectorized data pipelines instead (haha jk)

RosieBot: MCP Deep Dive

RosieBot is a chatbot I built into RIVET (a labor planning & scheduling platform for construction contractors) as a prototype. You ask it questions about your jobs & workers; it uses MCP tools backed by RIVET's public API to answer.

Example usage

When it works, it's great. Against seeded data:

RosieBot answering "Which workers are scheduled on jobs in the Detroit area today and tomorrow?" with a list of workers, jobs & shift times pulled via two tool calls

Seeded data - success case (tool arguments redacted). Look closely & you'll see the dates don't agree between the first half of the answer & the second.

When it doesn't, it politely tells you to go use the product:

RosieBot answering "how many jobs do I have with active workers in June 2025?" by apologizing & recommending the user log in & check the Jobs dashboard

Failure case

System architecture

There are four moving parts:

  • RIVET Web Application (RWA): the UI the user types into
  • RIVET Web Service (RWS): RIVET's API, which also hosts the public API
  • RIVET MCP Client (MCP-client): talks to the LLM & the MCP server
  • RIVET MCP Server (MCP-server): exposes tools that call RIVET's public API

Request cycle

  1. The user enters a query into the RIVET Web Application UI (RWA)
  2. RWA sends the query to the RIVET Web Service (RWS)
  3. RWS authenticates the request, checks permissions & scopes the request to the current user's org
  4. RWS sends the query to the RIVET MCP Client (MCP-client)
  5. MCP-client adds some "magic sauce" (prompt context & the tools list) to the query & sends it to the LLM to see if the LLM thinks any of the tools will help it process the request
    • MCP-client gets the tools list from a prior registration handshake with the MCP-server
  6. The LLM uses NLP to understand the query & selects a tool to help it answer the query. It then responds to the MCP-client with a tool use request
  7. The MCP-client authenticates the tool use request (in this case, with the requesting user's token) & forwards the tool use request to the RIVET MCP Server (MCP-server)
  8. The MCP-server processes the request by calling on external data sources (in this case, the RIVET public API hosted on RWS) & returns data back to the MCP-client
  9. The MCP-client sends this data to the LLM
  10. The LLM determines if it has sufficient context to answer the question
    • If no, the LLM makes an additional tool use request to the MCP-client (this ends up being several responses)
    • If yes, the LLM processes the query & returns a response to the MCP-client
  11. The MCP-client stitches the responses together from the LLM & returns them to RWS
  12. RWS returns the response to RWA
  13. RWA formats the response & displays it to the user

Lessons Learned

Good surprises

  1. Setup was not very difficult - if you already have APIs to get started with
  2. I spent <$5 on credits testing this over a week, & the API key comes with $5 of free credits

Bad surprises

Getting a good (accurate & consistent) result was very difficult:

  1. Tool calls often exceeded the model's context window limit - I needed to make the data lean & specific
  2. I needed to create MCP-specific API endpoints to get data the LLM could use optimally
  3. Prompt engineering matters - a lot
  4. Fixing issues with maths or other specific domains requires additional tool calls (call the calculator tool instead of having the LLM guess the maths)

The Future - Where is this going?

RosieBot primary use cases

1. PM in my pocket

A request we've heard: "I want a PM in my pocket" via a phone app. One path there: AI apps like Claude let users plug in their own integrations, so RIVET's tools could show up in an app that's already on their phone:

Claude's "Add integration" dialog asking for an integration name & URL

2. Product-development feedback based on customer usage of the NLP input UX

Every question a customer asks the bot is a feature request in disguise. The log of what people ask for (& where the bot fails them) tells the product team where a focused, high-quality experience is worth building.

3. AI application integrations

Meet customers in the AI apps they already use by exposing RIVET's data to those apps through an MCP server.

Other use cases?

RIVET has job labor planning, worker scheduling & job performance data.

  • PM in a pocket
    • "Who has worked with JANE DOE over the last 30 days?"
    • "How can I get capacity for OPPORTUNITY X? Who could I move around to make them available for OPPORTUNITY X?"
    • "Who is scheduled to work on JOB Y at the end of this week?"
  • Product usage & job performance analysis on the best performing contractors in RIVET (for internal use, publishing marketing materials & sharing with contractors in app)
    • Requires significant investment in a "Construction Model" that knows what "good" is for job performance, planning & scheduling