Skip to main content

Command Palette

Search for a command to run...

Model Context Protocol: The Missing Link Between LLMs and Real-World Data

Updated
8 min readView as Markdown
Model Context Protocol: The Missing Link Between LLMs and Real-World Data

Introduction

Hey guys! So, unless you’ve been living under a rock, you’ve probably heard about MCP, or Model Context Protocol, along with Large Language Models. They’ve been gaining a lot of attention recently, and there’s quite a buzz around them. But what’s driving all this excitement, and why are they becoming so popular? During my summer internship, while working with Large Language Models (LLMs), I’ve also been experimenting with Model Context Protocol (MCP) Servers. Initially, they were somewhat challenging to understand, but over the past few weeks, I’ve gained insight into what they are, the issues they address, and how they function.

So, Model Context Protocol or MCP, is an open protocol developed by Anthropic to connect Large Language Models to real-world data. Its purpose is to streamline the integration of LLMs with external tools and systems. These servers enable Claude Desktop, Cursor or Windsurf to connect to and execute queries on a Postgres Database, hit an API endpoint and send emails or messages on Slack.

Why do we need MCPs?

A Large Language Model such as ChatGPT or Claude works by predicting the next word, or token, based on the context they’ve been given and the data they were trained on. In simple terms, if something wasn’t part of their training data, they cannot magically know about it. That’s why to be useful in everyday world tasks, they need a way to interact with the outside world, whether it’s reading files, browsing the web or querying a data.

Different data sources are implemented in different ways. A web search returns a list of links, while a database query gives a structured result set. The way you interact with these sources also varies significantly. As a result, applications need to be manually integrated with every tool they want to use, creating an NxM integration problem. This is where Model Context Protocol Servers come in. They solve this by standardizing the how applications interact with data sources and the data is returned to the large language model.

MCP Servers are built on top of the function calling capabilities of Language Models, which allows LLMs to invoke pre-determined functions based on user requests. They make the tool calling process simpler by:

  1. By defining a consistent way to describe any function or tool, regardless of the underlying AI system.

  2. Providing a standard protocol for discovering available tools and executing them.

  3. Enabling a universal plug-and-play feature, where any system can use them without any custom integration code.

This enables developers to expose curated a list of endpoints within an API that allow specific actions or data fetching tasks. For example, filesystem MCP servers might provide tools to search for a file, and to read from or write to the filesystem. Suppose, a user asks a question that requires information from a file — the GPT can call the search file function of the server, then use the read tool to load the file into the context before generating a response.

How do MCP Servers work?

Key Components

  • Host Application: An LLM-powered interface that interacts with users and initiates connections to MCP servers. This includes tools like Claude Desktop, AI-enhanced IDEs such as Cursor, or web-based LLM chat interfaces.

  • MCP Client: A component embedded within the host application that manages connections with MCP servers. It translates between the host’s internal logic and the standardized Model Context Protocol. For example, Claude Desktop includes a built-in MCP client.

  • MCP Server: A lightweight service that adds context and capabilities to LLMs by exposing specific functions through MCP. Each server typically handles a single integration point, like accessing GitHub repositories, querying a PostgreSQL database, or reading local files.

  • Local Resources: Assets on your computer, such as files, databases, or local services that MCP servers can securely access and expose to host applications.

  • Remote Resources: Internet-accessible resources (e.g., APIs or cloud-based tools) that MCP servers can connect to and make available to LLMs.

Communication Model

  • Transport Layer: The protocol used for communication between MCP clients and servers. MCP supports two main transport mechanisms:

    • STDIO (Standard Input/Output): Used for local connections where the server runs in the same environment as the client.

    • HTTP + SSE (Server-Sent Events): Designed for remote connections, with HTTP handling requests and SSE enabling streaming responses.

  • Messaging Format: All communication between clients and servers uses JSON-RPC 2.0, which provides a consistent structure for requests, responses, and notifications across all transport layers.

So, when a user interacts with an AI application that supports MCP servers, several things happen behind the scenes to ensure the right tool is selected and executed. Here’s how it works:

  • Initial Connection: The application tries to connect to the server based on the protocol you specified while configuring the server.

  • Tool Discovery: Once connected, the client sends a tools/list request to the server. The server responds with a comprehensive list of available tools, including their names, descriptions, and input schemas. This allows the AI application to understand what capabilities the server provides and how to invoke them properly.

  • Context Building: The AI model receives information about available tools and incorporates this into its decision-making process. When a user makes a request, the model analyzes whether any of the available MCP tools are relevant to fulfilling that request.

  • Tool Selection: Based on the user's query and the available tool descriptions, the AI determines which tool (if any) should be invoked. The model considers factors like the tool's purpose, required parameters, and expected output format.

  • Request Execution: When a tool is selected, the client constructs a tools/call request with the appropriate tool name and arguments, then sends it to the server via the established transport channel. The server processes the request, executes the corresponding logic, and returns the results.

  • Response Processing: The server sends back a JSON-RPC response containing the tool's output. The client receives this data and makes it available to the AI model, which then incorporates the results into its response to the user.

  • Streaming Support: For long-running operations, the SSE transport enables servers to stream partial results back to the client, providing real-time feedback and improving the user experience during complex operations.

This seamless communication flow allows MCP to act as a bridge between AI applications and external data sources or services, enabling dynamic tool use without requiring the AI model to have built-in knowledge of every possible integration.

Data & Files

  • server-filesystem - Read, write, and search files on your local machine; perfect for document editing and file management

  • server-postgres - Query databases, run analytics, and generate reports directly from your data

  • s****erver-sqlite - Access local SQLite databases for lightweight data operations

Development Tools

  • server-github - Search repositories, create issues and PRs, and manage code directly from your AI assistant

  • mcp-server-git - Perform Git operations like viewing commit history and managing branches

Productivity & Communication

  • server-slack - Send messages, search conversations, and automate team notifications

  • server-google-drive - Access and analyze documents, sheets, and presentations stored in Google Drive

Web & Research

  • server-brave-search - Perform web searches to get real-time information and research capabilities

  • server-puppeteer - Automate browser tasks, scrape websites, and capture screenshots

Here are the Limitations and Conclusion sections for your article:

Limitations & Challenges

While MCP servers offer powerful capabilities, there are some limitations to be aware of:

Adoption & Ecosystem

  • MCP is still relatively new, so the ecosystem of available servers is growing but not yet comprehensive

  • Not all AI applications support MCP yet—currently limited to tools like Claude Desktop, Cursor, and Windsurf

  • Finding and configuring the right servers can require some technical knowledge

Performance Considerations

  • Each tool call adds latency to the AI's response time, especially for remote servers

  • Running multiple MCP servers simultaneously can consume significant system resources

  • Network-dependent operations may fail or timeout, requiring proper error handling

Security & Privacy

  • Granting LLMs access to your local files, databases, or APIs requires careful consideration

  • There's a risk of unintended data exposure if servers aren't properly configured

  • Currently, most implementations require manual permission management

Development & Debugging

  • Debugging MCP server issues can be challenging due to the abstraction layers involved

  • Error messages aren't always clear when something goes wrong

  • The protocol is still evolving, which means breaking changes may occur

Context & Reliability

  • LLMs may not always choose the correct tool for a given task

  • Tool descriptions need to be precise, or the model might misuse them

  • There are token limits on how much data can be retrieved and processed in a single interaction

Conclusion

Model Context Protocol represents a significant step forward in making Large Language Models more practical and useful for real-world applications. By standardizing how AI systems interact with external tools and data sources, MCP eliminates the need for custom integrations and opens up a world of possibilities for developers and users alike.

During my internship working with LLMs and MCP servers, I've seen firsthand how this protocol transforms what's possible with AI assistants. From querying databases to managing Git repositories, MCP bridges the gap between AI's intelligence and the real-world systems we use every day.

While the protocol is still maturing and has some limitations, the trajectory is promising. As more applications adopt MCP and the ecosystem of available servers grows, we'll likely see AI assistants become increasingly capable and integrated into our workflows.

If you're a developer, I encourage you to experiment with existing MCP servers or even build your own. The barrier to entry is relatively low, and the potential impact is significant. Who knows—the next server you build might become an essential tool for thousands of developers!