Part 1: Exploring Model Context Protocol (MCP) in Data and AI

Introduction:

AI is not new to us; over time, enormous studies and research have been conducted in this area. Whether it is machine learning, Deep learning, expert systems, Robotics, Image, or Natural language processing, all these AI subfields went through significant changes; however, December 2022 was a watershed moment for Deep learning. During this time, OpenAI [2] introduced the LLM model. Not only the industries, but even the common man has started using the LLM [1]. We have seen chatbots and other use cases floated around using LLM. LLMs are good for text summarization, but can’t store data and talk to applications. Let's say LLM has written an email, but it does not know whether this email has to be sent through Gmail or Outlook. Industry was missing a kind of standard. At the end of 2024, anthropic Team [3][4] has launched a defined standard on how LLM can be leveraged within the industry or outside of the industry (how tools and systems can feed structured data into LLM). It has given more opportunities to use LLM in subsequent use cases and a better method of interaction with applications.

Details Discussion:

As per the diagram, the user query is received by the application or program, which will have capabilities to connect with different systems such as databases, web applications, and so on. As per Fig.1, the middle part will resolve the context and will send this to the LLM model for the subsequent task, and will get a response from the LLM. Based on the logic, in case a program or app connects to the required applications.

Experiment:

from mcp.server import MCPServer

from pymongo import MongoClient

class MongoDBMCPServer(MCPServer):

def __init__(self, mongo_uri):

super().__init__()

self.client = MongoClient(mongo_uri)

self.db = self.client.your_database_name

# Registering a tool to find documents

self.register_tool("find_documents", self._find_documents)

def _find_documents(self, collection_name, query):

collection = self.db[collection_name]

results = list(collection.find(query))

return {"status": "success", "data": results}

# Example usage:

# server = MongoDBMCPServer("mongodb://localhost:27017/")

# server.run() # This would start the MCP server

server.operation({ …

});

server.operation({

name: “insertDocument”,

description: “Insert a document into a mongoDB collection”,

input: InsertDocumentSchema,

….

});

server.operation({ …

});

server.operation({ …

});

// Initialize the server

const.transport = new StdioServerTransport();

server.listen(transport)

There are numerous places where we can use MCP in Data and AI areas, a few examples are given below:

1. Getting a pipeline (e.g., ETL) job failure reason

2. Which dataset failed the quality check, and why?

3. Sales report execution

4. Sales forecasting

Summary:

Model context protocol has paved the way to acquire companies and build a variety of use cases using Large Language Model (LLM). It has simplified the work and increased productivity within the industry.

References:

[1]. https://en.wikipedia.org/w/index.php?title=Large_language_model&action=history, 0:24, 3 August 2025

[2]. https://en.wikipedia.org/wiki/OpenAI

[3]. https://blog.modelcontextprotocol.io/posts/welcome-to-mcp-blog/

[4]. https://modelcontextprotocol.io/overview

Next
Next

Revolutionizing Data-Driven Enterprises with Large Language Models (LLMs)