# What is MCP? A shared protocol for connecting AI agents to apps

Author: Rajat
Published: 2026-09-23
Canonical URL: https://www.thebuildercourse.com/blog/how-mcp-works
Publisher: The Builder Course

Follow one request through a tool, an MCP server, and a service API. Compare it with a direct integration and a command-line route.

If I ask an agent what is on my calendar tomorrow, it needs my actual events to answer. Understanding the question does not give it access to the calendar.

The diagram below follows a calendar request and an email request. I included Gmail because the difference between a Gmail API and a Gmail MCP integration was one of the questions behind this article. If MCP is unfamiliar, [the shopping example](https://www.thebuildercourse.com/blog/mcp-skills-plugins) introduces it alongside skills and plugins.

## Watch where the request goes.

Choose an example and a route. The whole connection stays visible: request arrows lead to the service, and result arrows lead back. Switch to the direct route and watch the MCP server disappear. The responses are written illustrations. The tool names and connections are examples, not commands to copy or a claim that a particular Gmail integration exists.

An interactive illustration with sample data and written responses. No account is connected and no AI model is running.

### Calendar: Through MCP

What is on my calendar tomorrow?

Your AI app: the model requests list_events. MCP client: The app’s connection code sends the tool call to the server.

MCP request → MCP server: A separate program offers the tool. In this example, its implementation calls the service’s API. → API request → Calendar API. Account access is checked before reading data.

Data returned: 09:00 · Team catch-up; 11:00 · Project review; 14:00 · Customer call. The result travels back along the same route to the model in the app.

MCP connects the app to the server. The server does the lookup.

The model requests an action; the app executes it through its MCP client. Here, the server uses an API to read the account and returns the result over MCP. MCP and the service API are both part of this route.

Back in the conversation: Tomorrow you have a team catch-up at 09:00, a project review at 11:00, and a customer call at 14:00.

### Calendar: Direct integration

What is on my calendar tomorrow?

Your AI app: the model requests list_events. My custom tool: Code in my app calls the service directly, subject to its access rules.

API request → Calendar API. Account access is checked before reading data.

Data returned: 09:00 · Team catch-up; 11:00 · Project review; 14:00 · Customer call. The result travels back along the same route to the model in the app.

The MCP server disappears. The lookup still happens.

My custom tool is wired into the app and calls the API itself. The model still requests a tool, and account access is still required. A custom tool could also be exposed through MCP; this version is connected directly.

Back in the conversation: Tomorrow you have a team catch-up at 09:00, a project review at 11:00, and a customer call at 14:00.

### Calendar: Through a command

What is on my calendar tomorrow?

Your AI app: the model requests Run a lookup command. Shell tool: The app checks its policy, then runs the command-line program.

Command → CLI program: Command-line software translates the lookup command into a service API request. → API request → Calendar API. Account access is checked before reading data.

Data returned: 09:00 · Team catch-up; 11:00 · Project review; 14:00 · Customer call. The result travels back along the same route to the model in the app.

The command-line program does the lookup.

The agent asks a shell tool to run a command. That program contacts the service and returns output. This sample route uses no MCP server.

Back in the conversation: Tomorrow you have a team catch-up at 09:00, a project review at 11:00, and a customer call at 14:00.

### Gmail: Through MCP

Find the customer email about the delivery date.

Your AI app: the model requests search_messages. MCP client: The app’s connection code sends the tool call to the server.

MCP request → MCP server: A separate program offers the tool. In this example, its implementation calls the service’s API. → API request → Gmail API. Account access is checked before reading data.

Data returned: From: Alex; Subject: Delivery date; Could you confirm the delivery date?. The result travels back along the same route to the model in the app.

MCP connects the app to the server. The server does the lookup.

The model requests an action; the app executes it through its MCP client. Here, the server uses an API to read the account and returns the result over MCP. MCP and the service API are both part of this route.

Back in the conversation: Alex asked: ‘Could you confirm the delivery date?’

### Gmail: Direct integration

Find the customer email about the delivery date.

Your AI app: the model requests search_messages. My custom tool: Code in my app calls the service directly, subject to its access rules.

API request → Gmail API. Account access is checked before reading data.

Data returned: From: Alex; Subject: Delivery date; Could you confirm the delivery date?. The result travels back along the same route to the model in the app.

The MCP server disappears. The lookup still happens.

My custom tool is wired into the app and calls the API itself. The model still requests a tool, and account access is still required. A custom tool could also be exposed through MCP; this version is connected directly.

Back in the conversation: Alex asked: ‘Could you confirm the delivery date?’

### Gmail: Through a command

Find the customer email about the delivery date.

Your AI app: the model requests Run a lookup command. Shell tool: The app checks its policy, then runs the command-line program.

Command → CLI program: Command-line software translates the lookup command into a service API request. → API request → Gmail API. Account access is checked before reading data.

Data returned: From: Alex; Subject: Delivery date; Could you confirm the delivery date?. The result travels back along the same route to the model in the app.

The command-line program does the lookup.

The agent asks a shell tool to run a command. That program contacts the service and returns output. This sample route uses no MCP server.

Back in the conversation: Alex asked: ‘Could you confirm the delivery date?’

## A common way to connect.

MCP means Model Context Protocol. An AI application can use it to discover and use capabilities exposed by an MCP server. A **server** here is a program; it can run on your computer or elsewhere. The application contains an MCP client that handles the connection.

For this example, the server offers a calendar lookup tool. It receives a request, calls the calendar service, and returns the result. A different server might work with local files, a database, or command-line software. MCP does not require every server to wrap a web API.

The advantage is a shared connection protocol. A compatible application may use the same server without somebody rebuilding that integration for each app. The application still needs to support the relevant features, configure the connection, and obtain access.

Tools are the part we are following here. MCP also has resources for context and prompts for reusable interaction templates. Those are protocol concepts; an MCP prompt is not automatically the same package as an Agent Skill. [MCP architecture](https://modelcontextprotocol.io/docs/learn/architecture)

## Gmail still has its own front door for software.

Google’s Gmail API lets authorised programs work with mailboxes and mail. A calendar reminder app or a traditional automation can use an API without an agent being involved. [Gmail API overview](https://developers.google.com/workspace/gmail/api/guides)

A Gmail MCP integration could expose tools such as searching messages and use the Gmail API underneath. The AI app talks to the MCP server; the server talks to Gmail. Both interfaces can be part of the same request.

If you see a product labelled ‘Gmail MCP’, check who provides it and which actions it exposes. The label alone does not tell us that Google built it, that it supports every Gmail action, or that it has access to your account.

Writing a reply in the conversation, saving it as a Gmail draft, and sending it require different capabilities. The first generates text; the other two change the mailbox. An integration may support only some of these actions.

## The same action can have a different route.

An **API** is an interface for programs. A **CLI**, or command-line interface, lets someone use software by typing commands. A **tool** is an action the agent can request. Those words describe different aspects of the setup.

In the command route above, the agent asks a shell tool to run a command-line program. That program contacts the service. In the direct route, the tool’s implementation calls the API without MCP. The reader can get the same calendar events through either route.

A CLI can be used through a tool, so the choice depends on the service and the application. I would check which interfaces are available and which route the application can use reliably.

## A connection can fail in more than one place.

‘No matching emails’ is a successful search with an empty result. ‘Access denied’ means the search could not read the account. A missing server is different again. Those results call for different next steps, and the agent should preserve that distinction when it answers.

If a lookup fails, I would check that the expected tool is available, that the connection works, and that the account grants the required access. Rewriting the shopping or scheduling skill will not repair an expired connection.

If the agent needs a repeatable procedure for using that information, [a skill can hold those instructions](https://www.thebuildercourse.com/blog/what-is-an-agent-skill).

Tool details checked against linked documentation on 23 September 2026. Product conventions can change; check the source for your application.

## Read next

- [I installed a plugin. What did I actually install?](https://www.thebuildercourse.com/blog/what-is-an-agent-plugin): What installing a plugin can add to a connection.
- [Agent skills: saving a repeatable way of working](https://www.thebuildercourse.com/blog/what-is-an-agent-skill): How to give the agent a repeatable process for using its tools.
