From simple chatbots to powerful automation: the rise of Model Context Protocol

July 3, 2025
July 2, 2025
5
min read

Large Language Models (LLMs) have transformed the way we interact with computers, evolving from mere question-answering tools to powerful orchestrators of external services. It is happening really fast: ChatGPT exploded in 2022, 2025 might be the year of the Model Context Protocol (MCP) that allows LLMs to take action in the real world.

It goes so fast that, some say, Microsoft CEO Satya Nadella declared that “SaaS is dead” (Source: BG2 podcast with Brad Gerstner and Bill Gurley, December 2024. This sentence is subject to controversial interpretation). I was sceptical but I became definitely less sceptical after learning about and using MCP. This is a protocol created by Anthropic. And they introduce it as the USB-C of LLMs.

But let’s take a step back and see what MCP is and what problem it solves.

The basics: LLMs and their limits

LLMs like GPT-4 can generate text, answer questions, and even simulate conversations with impressive fluency. But there’s a catch: they operate in a closed environment — they can only generate responses based on their training data and what the user provides in a prompt and answer in text. If you ask an LLM for real-time weather information, to send an email or even just what time it is, it can’t do that natively. Why? Because it has no direct access to the outside world — no way to run code, access APIs, or fetch live data.

Something basic as the code below will produce the answer “I am unable to provide the current time”.

response = client.chat.completions.create(
    model = model
    messages=[
        {"role": "system", "content": "You are a helpful assistant"},
        {"role": "user", "content": "What is the current time?"}
    ]
)

The next step: tool use

To overcome this, LLM developers introduced the idea of function calling or tool use: the LLM can decide to not answer in text but output a specific token that means “call a tool”. The LLM is informed about what tools it can use using JSON and is required to provide the appropriate arguments and instructed about the format of the output from these tools. This bridges the gap between the static world of the LLM and dynamic, real-world data.

For instance, if the LLM decides it needs to know the current time, it can call a get_current_time function, then incorporate the result into its final answer. This is a huge improvement but still requires developers to predefine all the tools and how to call them. To better understand what problem MCP solves let’s go a little bit more in detail and see what code is needed to provide this simple get_current_time tool to an LLM using OpenAI libraries.

# Define the function to be called, namely “the tool”
def get_current_time():
    return datetime.now().isoformat()

# Create an object that describes the function and its input in natural language
# but that can be converted to JSON to be passed to the LLM.
tools = [
    {
        "type": "function",
        "function": {
            "name": "get_current_time",
            "description": "Returns the current time in ISO format",
            "parameters": {"type": "object", "properties": {}, "required": []}
        }
    }
]

# Call the LLM now passing the tool
response = client.chat.completions.create(
    model=model,
    messages=[
        {"role": "system", "content": "You are a helpful assistant"},
        {"role": "user", "content": "What is the current time?"}
    ],
    tools=tools,
    tool_choice="auto"
)

# Handle the response. When the LLM tells us to use the function run it instead of returning its output.
# If the result has to be then integrated into a natural language response a second LLM call
# needs to happen where the result is passed in the context.
message = response.choices[0].message
if message.tool_calls:
    for tool_call in message.tool_calls:
        if tool_call.function.name == "get_current_time":
            current_time = get_current_time()
            print(f"The current time is: {current_time}")
else:
    print(message.content)

While the function to get the time itself is only 2 lines of code, a lot is involved in describing it to the LLM and handling its answer. See the comments in the code to understand what’s happening.

Enter MCP: The Model Context Protocol revolution

So we have seen that, while function calling lets LLMs work with one-off local tools, it is fairly cumbersome to interface them with the LLMs. MCP is a protocol invented by Anthropic, the makers of the LLM model Claude, and it takes tool use to a whole new level by performing two crucial steps:

  • standardizing how LLMs discover, call, and integrate external tools at runtime by providing a common communication protocol that any tool can implement
  • managing external environments by automatically spinning up and coordinating multiple isolated computing contexts: these could be specialized servers, Docker containers, or APIs.

Even though MCP is just a standard, remember that HTML is “just a standard” as well but it allowed billions of servers and clients to communicate efficiently, generating the internet.

What’s unique about MCP is its ability to orchestrate complex workflows: an LLM might spin up a server for sending emails, another for browsing the web, and yet another for persistent memory storage. With MCP, these tools become integrated components of a cohesive AI workflow, rather than isolated services.

However, this is still not the reason why MCP is exploding and is so useful compared to the methods to pass tools available previously. The real reason is that standardization allows to create a marketplace. Now anyone can create a tool that can then be used by any LLM in a couple of lines of code.

You can have a look at the links below to find literally thousands of tools already built and that can be used to equip your LLMs in an instant:

MCP: A use case example

To get a better feeling sense of scale of the change that MCP brings, let’s imagine a fairly complex use case. We would like our LLM to open a browser, go on internet, look for a recipe for apple pie and finally write it to a file on disk instead of into the chat. See below how to do it.

# Import the library
from agents.mcp import MCPServerStdio

# Define the parameters to download the prebuilt tools from the web
fetch_params = {"command": "uvx", "args": ["mcp-server-fetch"]}
playwright_params = {"command": "npx", "args": ["@playwright/mcp@latest"]}
files_params = {"command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "./sandbox"]}

# Just create a MCPServerStdio object and pass it to the LLM call.
# This function call will download the tools if not already available locally and spin up environments for them to run.
# Finally, it will create the JSON scaffolding to advertise them to the LLM.
async with MCPServerStdio(params=files_params, client_session_timeout_seconds=30) as mcp_server_files:
    async with MCPServerStdio(params=playwright_params, client_session_timeout_seconds=30) as mcp_server_browser:

        agent = Agent(
            name="investigator",
            instructions="""
	You browse the internet to accomplish your instructions.
	You are highly capable at browsing the internet independently to accomplish your task, including accepting all cookies and clicking 'not now' as appropriate to get to the content you need. If one website isn't fruitful, try another. Be persistent until you have solved your assignment, trying different options and sites as needed.
			""",
            model="gpt-4.1-mini",
            mcp_servers=[mcp_server_files, mcp_server_browser]
        )
        with trace("investigate"):
            result = await Runner.run(agent, "Find a great recipe for Apple Pie, then summarize it in markdown to apple.md")

I find it incredible that these 19 lines of code (6 of which are the system prompt!) produce a web search and generate a file starting from a question written in natural language!

What’s more is that you can look at the “trace”. In fact, this last code uses OpenAI Agent SDK, a very recent development, that also includes a website where traces of your LLM calls are logged. For example, I could see that in some cases the LLM does multiple web searches before being happy with its results. In other words, it has indeed some autonomy.

Beyond Static Prompts: Dynamic, Multi-Tool Workflows

The beauty of MCP lies in its extensibility: it’s not limited to one tool at a time. You can have:

  • A browser tool for real-time search
  • A file system tool for creating documents
  • A memory database for storing and retrieving results
  • An email server tool for sending messages
  • And much more, digging into the thousands of tools already built

All of them are managed by the LLM, which decides what to use and when and how many times.

I want to put the focus here on 3 specific categories of tools that bring LLM applications to another level:

  • Action: This is the most easy to understand and the most discussed in the above examples. “Action tools” allow your LLM to actually take action in the real world.
  • Memory: One particular action is enabling LLMs to write to a database, and this becomes a special kind of tool. Previously, LLMs could only access information by including large amounts of potentially irrelevant data in their context. MCP allows LLMs to store and retrieve specific, relevant data as needed, to get much closer to a real human-like memory.
  • Agents: MCP enables multi-agent workflows where specialized LLMs can be wrapped as services that other LLMs call. For example, you could create a search-specialized agent and an email-specialized agent, and then implement a coordinator LLM to orchestrate them through MCP connections. This differs from simple tools because each agent has its own reasoning capabilities.
    It can for instance be used to create custom emails from LinkedIn profiles. Do you see the commercial interest for that (even if it might not be legal)? I think the example speaks for itself.

In conclusion, this dynamic interplay allows AI agents to handle increasingly complex tasks with human-like flexibility and efficiency, including taking actual action in the real world.

Conclusion: A New Era for AI Automation

MCP represents a major leap in the evolution of LLMs, spanning from static conversational engines to dynamic, context-aware orchestrators of real-world tasks. Whether it’s summarizing information, browsing the web, automating email outreach, or managing persistent data, MCP empowers LLMs to transcend their static boundaries and truly act in the world.

Author:

Luca Pescatore

AI & Automation
AI & Automation
AI & Automation

Large Language Models (LLMs) have transformed the way we interact with computers, evolving from mere question-answering tools to powerful orchestrators of external services. It is happening really fast: ChatGPT exploded in 2022, 2025 might be the year of the Model Context Protocol (MCP) that allows LLMs to take action in the real world.

It goes so fast that, some say, Microsoft CEO Satya Nadella declared that “SaaS is dead” (Source: BG2 podcast with Brad Gerstner and Bill Gurley, December 2024. This sentence is subject to controversial interpretation). I was sceptical but I became definitely less sceptical after learning about and using MCP. This is a protocol created by Anthropic. And they introduce it as the USB-C of LLMs.

But let’s take a step back and see what MCP is and what problem it solves.

The basics: LLMs and their limits

LLMs like GPT-4 can generate text, answer questions, and even simulate conversations with impressive fluency. But there’s a catch: they operate in a closed environment — they can only generate responses based on their training data and what the user provides in a prompt and answer in text. If you ask an LLM for real-time weather information, to send an email or even just what time it is, it can’t do that natively. Why? Because it has no direct access to the outside world — no way to run code, access APIs, or fetch live data.

Something basic as the code below will produce the answer “I am unable to provide the current time”.

response = client.chat.completions.create(
    model = model
    messages=[
        {"role": "system", "content": "You are a helpful assistant"},
        {"role": "user", "content": "What is the current time?"}
    ]
)

The next step: tool use

To overcome this, LLM developers introduced the idea of function calling or tool use: the LLM can decide to not answer in text but output a specific token that means “call a tool”. The LLM is informed about what tools it can use using JSON and is required to provide the appropriate arguments and instructed about the format of the output from these tools. This bridges the gap between the static world of the LLM and dynamic, real-world data.

For instance, if the LLM decides it needs to know the current time, it can call a get_current_time function, then incorporate the result into its final answer. This is a huge improvement but still requires developers to predefine all the tools and how to call them. To better understand what problem MCP solves let’s go a little bit more in detail and see what code is needed to provide this simple get_current_time tool to an LLM using OpenAI libraries.

# Define the function to be called, namely “the tool”
def get_current_time():
    return datetime.now().isoformat()

# Create an object that describes the function and its input in natural language
# but that can be converted to JSON to be passed to the LLM.
tools = [
    {
        "type": "function",
        "function": {
            "name": "get_current_time",
            "description": "Returns the current time in ISO format",
            "parameters": {"type": "object", "properties": {}, "required": []}
        }
    }
]

# Call the LLM now passing the tool
response = client.chat.completions.create(
    model=model,
    messages=[
        {"role": "system", "content": "You are a helpful assistant"},
        {"role": "user", "content": "What is the current time?"}
    ],
    tools=tools,
    tool_choice="auto"
)

# Handle the response. When the LLM tells us to use the function run it instead of returning its output.
# If the result has to be then integrated into a natural language response a second LLM call
# needs to happen where the result is passed in the context.
message = response.choices[0].message
if message.tool_calls:
    for tool_call in message.tool_calls:
        if tool_call.function.name == "get_current_time":
            current_time = get_current_time()
            print(f"The current time is: {current_time}")
else:
    print(message.content)

While the function to get the time itself is only 2 lines of code, a lot is involved in describing it to the LLM and handling its answer. See the comments in the code to understand what’s happening.

Enter MCP: The Model Context Protocol revolution

So we have seen that, while function calling lets LLMs work with one-off local tools, it is fairly cumbersome to interface them with the LLMs. MCP is a protocol invented by Anthropic, the makers of the LLM model Claude, and it takes tool use to a whole new level by performing two crucial steps:

  • standardizing how LLMs discover, call, and integrate external tools at runtime by providing a common communication protocol that any tool can implement
  • managing external environments by automatically spinning up and coordinating multiple isolated computing contexts: these could be specialized servers, Docker containers, or APIs.

Even though MCP is just a standard, remember that HTML is “just a standard” as well but it allowed billions of servers and clients to communicate efficiently, generating the internet.

What’s unique about MCP is its ability to orchestrate complex workflows: an LLM might spin up a server for sending emails, another for browsing the web, and yet another for persistent memory storage. With MCP, these tools become integrated components of a cohesive AI workflow, rather than isolated services.

However, this is still not the reason why MCP is exploding and is so useful compared to the methods to pass tools available previously. The real reason is that standardization allows to create a marketplace. Now anyone can create a tool that can then be used by any LLM in a couple of lines of code.

You can have a look at the links below to find literally thousands of tools already built and that can be used to equip your LLMs in an instant:

MCP: A use case example

To get a better feeling sense of scale of the change that MCP brings, let’s imagine a fairly complex use case. We would like our LLM to open a browser, go on internet, look for a recipe for apple pie and finally write it to a file on disk instead of into the chat. See below how to do it.

# Import the library
from agents.mcp import MCPServerStdio

# Define the parameters to download the prebuilt tools from the web
fetch_params = {"command": "uvx", "args": ["mcp-server-fetch"]}
playwright_params = {"command": "npx", "args": ["@playwright/mcp@latest"]}
files_params = {"command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "./sandbox"]}

# Just create a MCPServerStdio object and pass it to the LLM call.
# This function call will download the tools if not already available locally and spin up environments for them to run.
# Finally, it will create the JSON scaffolding to advertise them to the LLM.
async with MCPServerStdio(params=files_params, client_session_timeout_seconds=30) as mcp_server_files:
    async with MCPServerStdio(params=playwright_params, client_session_timeout_seconds=30) as mcp_server_browser:

        agent = Agent(
            name="investigator",
            instructions="""
	You browse the internet to accomplish your instructions.
	You are highly capable at browsing the internet independently to accomplish your task, including accepting all cookies and clicking 'not now' as appropriate to get to the content you need. If one website isn't fruitful, try another. Be persistent until you have solved your assignment, trying different options and sites as needed.
			""",
            model="gpt-4.1-mini",
            mcp_servers=[mcp_server_files, mcp_server_browser]
        )
        with trace("investigate"):
            result = await Runner.run(agent, "Find a great recipe for Apple Pie, then summarize it in markdown to apple.md")

I find it incredible that these 19 lines of code (6 of which are the system prompt!) produce a web search and generate a file starting from a question written in natural language!

What’s more is that you can look at the “trace”. In fact, this last code uses OpenAI Agent SDK, a very recent development, that also includes a website where traces of your LLM calls are logged. For example, I could see that in some cases the LLM does multiple web searches before being happy with its results. In other words, it has indeed some autonomy.

Beyond Static Prompts: Dynamic, Multi-Tool Workflows

The beauty of MCP lies in its extensibility: it’s not limited to one tool at a time. You can have:

  • A browser tool for real-time search
  • A file system tool for creating documents
  • A memory database for storing and retrieving results
  • An email server tool for sending messages
  • And much more, digging into the thousands of tools already built

All of them are managed by the LLM, which decides what to use and when and how many times.

I want to put the focus here on 3 specific categories of tools that bring LLM applications to another level:

  • Action: This is the most easy to understand and the most discussed in the above examples. “Action tools” allow your LLM to actually take action in the real world.
  • Memory: One particular action is enabling LLMs to write to a database, and this becomes a special kind of tool. Previously, LLMs could only access information by including large amounts of potentially irrelevant data in their context. MCP allows LLMs to store and retrieve specific, relevant data as needed, to get much closer to a real human-like memory.
  • Agents: MCP enables multi-agent workflows where specialized LLMs can be wrapped as services that other LLMs call. For example, you could create a search-specialized agent and an email-specialized agent, and then implement a coordinator LLM to orchestrate them through MCP connections. This differs from simple tools because each agent has its own reasoning capabilities.
    It can for instance be used to create custom emails from LinkedIn profiles. Do you see the commercial interest for that (even if it might not be legal)? I think the example speaks for itself.

In conclusion, this dynamic interplay allows AI agents to handle increasingly complex tasks with human-like flexibility and efficiency, including taking actual action in the real world.

Conclusion: A New Era for AI Automation

MCP represents a major leap in the evolution of LLMs, spanning from static conversational engines to dynamic, context-aware orchestrators of real-world tasks. Whether it’s summarizing information, browsing the web, automating email outreach, or managing persistent data, MCP empowers LLMs to transcend their static boundaries and truly act in the world.

Author:

Luca Pescatore

By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.