Is MCP a better alternative to RAG for Observability?

Is MCP a better alternative to RAG for Observability?

Discover how MCP simplifies real-time data retrieval from Parseable.

Anant Vindal's photo
Jan 16, 2025·

6 min read

RAG i.e. Retrieval Augmented Generation has been the main stay for developers trying to integrate data sources to LLMs. The purpose of such integration is to retrieve information from a real time, real world data system to augment the LLM’s knowledge. So, that the LLM generated response is accurate and contextual.

But as developers adopted RAG, issues like context window size limitations, cost of LLM calls, and unstructured patterns of data access showed up. There wasn’t a consistent, portable framework for connecting data systems and Models.

Recent addition to the Data + LLM problem space is MCP, which aims to be a standard framework to allow real time data retrieval and augmentation.

I tried out MCP with Parseable, with a simple goal - generate log data analysis dashboards on Parseable using Claude 3.5, based on simple prompts. In this post, I’ll walk you through the code and the outcomes. But before that, let’s understand MCP in a bit detail.

What is MCP?

MCP i.e. Model Context Protocol is a framework by Anthropic which allows developers to build agentic workflows requiring real-time or private data in an LLM-agnostic manner (MCP Blog). This allows developers to augment their users’ experience by enabling LLMs to fetch data from anywhere like a PostgreSQL database or a FTP server or even an API.

MCP consists of two components - MCP server and MCP client.

MCP Server

The MCP server acts as the interface between the MCP client, data source system and LLMs. It holds all the business logic required to fetch information from the specific data source. It also holds predefined prompts to perform certain operations. This is essentially an HTTP server that exposes the business logic via REST API.

Specifically, MCP server exposes Tools and Prompts as primitives. These primitives enable clients leverage specific functionalities of the backing data store and LLM in a structured way.

An MCP server is an HTTP server which exposes multiple resources to the client. A resource could be anything ranging from a set of APIs fetching real-time data from a remote server to a private PostgreSQL database server serving records.

MCP Client

MCP client is the interface between a user and an LLM. Clients have to be written specifically for a given server, i.e.

An MCP Client is an interface between a user and an LLM. It also maintains a 1:1 connection to an MCP Server and exposes the server’s capabilities to the LLM.

The best way to understand it is by taking an example of the Claude Desktop app. The app in this case is a client and in the beginning, it is not exposed to any MCP Servers so it can only answer based on the current knowledge that the LLM has.

Lets assume that the user writes a server which connects to and runs queries against a PostgreSQL database and makes the client aware of that server. Now the LLM (through the client) can access the PostgreSQL server and fetch data from it to answer the user’s questions about their private data.

Integration with Parseable

For this blog, we’ve zeroed down on building dynamic observability dashboards using a LLM. At the end of this blog, you’ll be able to prompt the MCP client to dynamically visualise a specific log format.

Background

Dashboards in Parseable require the user to write a SQL query which is then executed by the Parseable server and the resulting data is used to generate the required plot.

This is where MCP comes in. Using Parseable MCP server, a user can spin up elaborate dashboards within minutes! Let’s see how.

Prerequisites

  • Claude Desktop App installed. Download from here.

  • Parseable Server up and running with observability data ingested. Refer to the Parseable documentation.

Architecture

Below diagram shows the high level architecture that we’re going to set up in this blog. On one side you have a Parseable cluster running with observability data coming in. On the other side you have a MCP Server-Client pair.

Here the MCP server is created specifically for our use case, i.e. the server understands how to make calls to Parseable server, how to fetch specific data for specific purposes.

Based on the dashboard generation use case, the Parseable MCP Server exposes Tools and Prompts:

  • Tools

    • get-schema - A tool to fetch the schema for the mentioned stream.

    • post-dashboard - A tool to send a request to create a dashboard.

  • Prompts

    • generate-dashboard-object - A prompt which describes a Parseable dashboard and its API requirements.

Getting Started

Setup the MCP Server

Download the Parseable MCP server code

git clone git@github.com:parseablehq/blog-samples.git
cd blog-samples/mcp-parseable

Create a virtual environment and install the requirements

python -m venv venv
pip install -r requirements.txt

Navigate to the .env inside src directory. Set the correct Parseable server credentials in the .env file

vi src/.env
PARSEABLE_API_BASE=http://localhost:8000
P_USERNAME=admin
P_PASSWORD=admin

Finally start the the MCP server

python3 src/server.py

Setup the MCP Client

The Claude Desktop app will be the MCP client in this workflow. First step is to point the client to our MCP server. From your Claude Desktop app, open the config file. You can open it with File -> Settings -> Developer -> Edit Config.

Then edit the config file to point it towards MCP Parseable server.py (the command should use your venv's python executable).

{
    "mcpServers": {
        "mcp_parseable": {
            "command": "YOUR:\\VENV\\Scripts\\python.exe",
            "args": [
                "YOUR:\\PATH\\mcp-parseable\\src\\server.py"
            ]
        }
    }
}

Generate a dashboard on Parseable

Once the MCP Client is configured successfully, let’s attempt at using the workflow generate a dashboard. Ensure that the Desktop app shows two small hammers as available tools and the Parseable Server is running.

Prompt Claude to tell you the schema for the stream you want to create a dashboard for. View the result of the get-schema tool and copy the returned schema.

Now hover over the “attach pin” and select the Attach from MCP option

Select the mcp_parseable server and choose generate-dashboard-object prompt

You’ll be given a pop-up demanding two arguments. The first one is the schema of the stream for which we want to create a dashboard and the second one is the description of tiles to show in the dashboard. Paste the copied schema in the first one. (Both arguments are required)

Claude will generate an object which it can directly use to create a dashboard. Prompt it to do so

You can now head over to the Parseable Server to see the dashboard generated by Claude.

Summary

RAG (Retrieval Augmented Generation) helps integrate data sources with LLMs, but has faced issues like context window limits and data access inconsistencies.

MCP (Model Context Protocol) by Anthropic aims to standardize real-time data retrieval and augmentation in an LLM-agnostic way.

This post explores using MCP with Parseable to create dynamic log analysis dashboards through Claude 3.5 via simple prompts. The architecture involves a specific MCP server-client pair to facilitate data queries and visualization on Parseable, enhancing LLM functionality with real-time data augmentation.

All the code used in this blog is available here: https://github.com/parseablehq/blog-samples/tree/main/mcp-parseable