por Google Cloud Tech
MCPs explained → https://goo.gle/4wjeLka Google MCP repo → https://goo.gle/4aeGUA5 Model Context Protocol (MCP) → https://goo.gle/4uQk3D8 MCP vs API: What's the difference and why does it matter for AI developers? In this video, Smitha Kolan breaks down how Model Context Protocol (MCP) works, how it's different from traditional APIs, and why it's becoming the new standard for connecting AI agents to tools, data, and systems. For decades, APIs have been the universal handshake between softw
Cada verso em Inglês seguido da tradução em português.
If you've ever built an app that talks to an AI model,
Si alguna vez has creado una aplicación que habla con un modelo de IA,
MCP changes everything.
todo lo renueva.
Because the way AI connects to your tools, data,
Porque la forma en que la IA se conecta a sus herramientas, datos,
and systems is being completely rewritten.
y sistemas está siendo completamente reescrito.
For years, APIs used to be the glue that held everything
Durante años, las API solían ser el pegamento que sostenía todo
together.
juntos.
But now there's a new standard rising fast,
Pero ahora hay una nueva estándar aumentando rápidamente,
and that something is called the model context protocol, or MCP.
y que algo se llama el protocolo de contexto del modelo, o MCP.
And it might just be the biggest shift since APIs themselves.
Y podría ser el más grande cambiar desde las propias API.
So what exactly is MCP, and why are people
Entonces, ¿qué es exactamente MCP, y por qué las personas
saying it could replace the way we integrate AI
diciendo que podría reemplazar la forma en que integramos la IA
with everything around it.
con todo a su alrededor.
Let's break it down clearly so that by the end of this video,
Vamos a desglosarlo claramente para que que al final de este vídeo,
you'll understand how MCP actually works
entenderás cómo MCP realmente funciona
and how it's different from APIs,
y cómo es diferente de las API,
and why it's reshaping how we build agents and applications
y por qué está remodelando la forma en que agentes de compilación y aplicaciones
that use large language models.
que usan modelos de lenguaje grandes.
For decades, API were the universal handshake
Durante décadas, las API el apretón de manos universal
between systems.
entre sistemas.
You define an endpoint, you send a request
Se define un punto final, envías una solicitud
and you got a response back.
y recibes una respuesta.
It's clean and predictable, and for traditional software,
Es limpio y predecible, y para el software tradicional,
that is perfect.
que está que ni mandada a hacer.
But when large language models enter the picture,
Pero cuando el lenguaje grande modelos entran en escena,
everything changed.
todo cambió.
Models don't just call one endpoint,
Los modelos no solo llamar a un punto final,
they might talk to 10 endpoints.
podrían hablar con 10 puntos finales.
They want to chain them together or even interpret
Quieren encadenarlos juntos o incluso interpretar
unstructured data and also ask follow up questions.
datos no estructurados y también hacer preguntas de seguimiento.
And that means they don't just need access to a tool,
Y eso significa que no solo necesito acceso a una herramienta,
they also need context.
también necesitan contexto.
But here's the problem APIs are built for programs
Pero aquí está el problema Las API se crean para programas
talking to programs.
hablar con los programas.
They are not built for models.
No están construidos para modelos.
Reasoning over messy real world data and API
Razonamiento sobre desordenado datos y API del mundo real
is like a locked cabinet.
es como un armario cerrado.
You need to know exactly what drawer to open
Necesitas saber exactamente qué cajón abrir
and what shape the key is.
y qué forma tiene la llave.
But a model is trying to understand
Pero un modelo es tratando de entender
what's inside the cabinet without clear labels
lo que hay dentro del armario sin etiquetas claras
so it doesn't know which function to call
para que no sepa qué función llamar
or which parameters to pass until you tell it.
o qué parámetros pasa hasta que lo digas.
And you have to hardcode it sometimes.
Y tienes que codificarlo a veces.
And oftentimes have to keep explaining over and over again.
Y muchas veces tienen que mantener explicando una y otra vez.
That's where MCP comes in.
Es aquí donde intervienen los alimentos.
It was designed to make models autonomously discover and use
Fue diseñado para hacer modelos descubrir y usar de forma autónoma
tools without the constant hand-holding
herramientas sin la sostenimiento constante de la mano
that we've been doing in prompt engineering.
que hemos estado haciendo en ingeniería rápida.
So before we dive deeper, let's define both sides.
Entonces, antes de profundizar, definamos ambos lados.
Clearly, APIs are the traditional way software
Claramente, las API son el software de forma tradicional
communicates.
se comunica
They expose specific endpoints.
Exponen criterios de valoración específicos.
They accept requests in structured formats like JSON,
Aceptan solicitudes en formatos estructurados como JSON,
and they return predictable outputs.
y regresan resultados predecibles.
Developers document them, secure them, and version them.
Los desarrolladores los documentan, asegurarlos y versionarlos.
But they assume one thing that both sides
Pero asumen una cosa que ambos lados
knows exactly what to expect.
sabe exactamente qué esperar.
MCP flips that assumption.
MCP invierte esa suposición.
Instead of the model needing to be manually thought
En lugar de que el modelo necesite ser pensado manualmente
about each endpoint, MCP gives the model a standardized way
sobre cada punto final, MCP da el modelo de una manera estandarizada
to discover what a tool can do.
para descubrir lo que puede hacer una herramienta.
What kind of inputs it expects, and what kind of outputs
Qué tipo de insumos espera, y qué tipo de resultados
it returns all through context.
devuelve todo a través del contexto.
Think of it like giving a model a live, machine readable
Piensa en ello como dar un modelar un modelo en vivo, legible por máquina
map of your API instead of a static instruction manual.
mapa de su API en lugar de un manual de instrucciones estático.
Now that sounds abstract, so let's make it real.
Eso suena abstracto, así que hagámoslo real.
Imagine you're building an AI agent that
Imagina que estás construyendo un agente de IA que
manages support tickets.
gestiona los tickets de soporte.
You give it access to Gmail, notion, and Jira.
Le das acceso a Gmail, Notion y Jira.
With APIs.
Con APIs.
You'd write custom code for each integration,
Escribirías código personalizado para cada integración,
handle issues like pagination, auth tokens, error cases,
manejar problemas como la paginación, auth tokens, casos de error,
rate limits, and also teach the model through long prompts
límites de tarifas, y también enseñan el modelo a través de indicaciones largas
like when you want to create a Jira ticket.
como cuando quieres crear un ticket de Jira.
Call this endpoint with these fields when
Llamar a este punto final con estos campos cuando
you want to reply to an email, call Gmail with this payload,
quieres responder a un correo electrónico, llamar a Gmail con esta carga útil,
but with MCP you don't need to do any of that.
pero con MCP no tienen que hacer nada de eso.
Each service like Gmail, notion, Jira exposes and MCP
Cada servicio como Gmail, noción, Jira expone y MCP
compatible interface.
interfaz compatible.
The model discovers these tools automatically
El modelo descubre estas herramientas automáticamente
and understands their functions as part of its environment.
y entiende sus funciones como parte de su entorno.
You don't tell it how to do it, you give the context
No le dices cómo hacerlo, le das el contexto
and it figures it out dynamically.
y lo calcula dinámicamente.
That's the core difference between APIs,
Ese es el núcleo diferencia entre las API,
which are code level contracts between two applications,
que son contratos a nivel de código entre dos aplicaciones,
and MCP, which is a semantic protocol between a model
y MCP, que es una semántica protocolo entre un modelo
and its environment.
y su entorno.
So you're no longer teaching the model which endpoint to hit,
Así que ya no estás enseñando el modelo a qué punto final llegar,
but you're giving it a structured description of what's
pero le estás dando un descripción estructurada de lo que
available and letting it reason about which tool to use
disponible y dejarlo razón sobre qué herramienta usar
and when.
Y es niño.
It's like giving the model a toolbox instead
Es como darle a la modelar una caja de herramientas en su lugar
of forcing it to memorize how each tool works.
de obligarlo a memorizar cómo funciona cada herramienta.
This shift might sound small, but it's actually
Este cambio puede sonar pequeño, pero en realidad es
massive for developers building agentic systems with APIs.
masiva para desarrolladores construyendo sistemas agénticos con API.
The logic of what to call and when to call it
La lógica de qué llamada y cuándo llamarla
lived in your app code.
vivían en el código de tu aplicación.
With MCP, that logic can actually
Con MCP, eso la lógica puede en realidad
move into the model's reasoning layer itself.
pasar a la de la modelo capa de razonamiento en sí.
You can now build a general purpose agent
Ahora puedes crear una agente de propósito general
that can plug into any tool that supports the protocol,
que se puede conectar a cualquier herramienta que es compatible con el protocolo,
without having to rewrite code for each integration.
sin tener que reescribir código para cada integración.
That's the magic here, and it's standardization the same way
Esa es la magia aquí, y es estandarización de la misma manera
HTTP made websites interoperable,
Sitios web creados por HTTP interoperable,
allowing them to share and use data
permitiéndoles compartir y usar datos
with each and other systems, and letting them work together
con cada uno y otros sistemas, y dejar que trabajen juntos
to perform tasks with minimal human intervention.
para realizar tareas con intervención humana mínima.
MCP is trying to make AI environments interoperable.
MCP está tratando de hacer que la IA entornos interoperables.
But let's talk about what's actually
Pero hablemos de lo que en realidad
happening under the hood.
pasando bajo el capó.
And MCP server is a lightweight process that sits next
Y el servidor MCP es un proceso que se sienta a continuación
to your service or data source.
a su servicio o fuente de datos.
It describes what it can do and what functions it exposes,
Describe lo que puede hacer y qué funciones expone,
all using JSON schemas.
todo usando esquemas JSON.
The model connects to this server
El modelo conecta a este servidor
through a standardized interface like WebSocket or HTTP,
a través de una interfaz estandarizada como WebSocket o HTTP,
and receives metadata about the available resources.
y recibe metadatos sobre los recursos disponibles.
Once connected, the model can call these functions directly,
Una vez conectado, el modelo puede llaman a estas funciones directamente,
not by guessing, but by using the metadata.
no adivinando, sino mediante el uso de los metadatos.
It knows what inputs are required
Sabe lo que se requieren entradas
and what each field means and what type of output to expect.
y lo que significa cada campo y qué tipo de salida esperar.
The beauty is that everything is self-describing.
La belleza es que todo es autodescriptivo.
You don't have to prompt engineer the schema or reformat
No tienes que preguntar diseñar el esquema o reformatear
responses.
inmunes.
It's all standardized.
Todo está estandarizado.
Compare that to an API where every single integration
Compare eso con una API donde cada integración
is bespoke.
está hecho a medida.
You need a developer to read the docs, map the payloads,
Necesitas un desarrollador para leer los documentos, mapear las cargas útiles,
and manually wrap the endpoints so MCP abstracts that away.
y envolver manualmente los puntos finales así que MCP abstrae eso.
This means instead of building 100 custom integrations,
Esto significa que en lugar de construir 100 integraciones personalizadas,
you build one MCP interface and every compatible model
construyes una interfaz MCP y todos los modelos compatibles
can use it instantly.
puede usarlo al instante.
That's why people are calling MCP the plug and play
Es por eso que la gente está llamar a MCP el plug and play
layer for AI systems.
capa para sistemas de IA.
Now, this doesn't mean APIs are going away.
Ahora, esto no significa Las API están desapareciendo.
APIs are still the foundation.
Las API siguen siendo la base.
They're how your systems actually function.
Son la forma en que sus sistemas realmente funcionan.
But MCP changes how models access those APIs.
Pero MCP cambia la forma modelos acceden a esas API.
Think of it like this.
Pensemos en ello de esta manera.
MCP doesn't replace your backend.
MCP no sustituye tu backend.
It replaces the middleware between the model and the API.
Sustituye al middleware entre el modelo y la API.
The MCP server acts like a translator,
El servidor MCP actúa como un traductor,
converting your existing APIs into a format
convirtiendo tu API en un formato
that models can understand automatically.
que los modelos pueden entender automáticamente.
So instead of saying MCP versus API, it's more like MCP
Entonces, en lugar de decir MCP en comparación con la API, es más como MCP
on top of APIs.
En la parte superior de.
This distinction is key.
Esta distinción es clave.
MCP doesn't compete with APIs.
MCP no compite con las API.
It actually leverages them, but it changes
De hecho, aprovecha ellos, pero cambia
who the client is with API.
quién es el cliente con la API.
The client is another program or user with MCP,
El cliente es otro programa o usuario con MCP,
the client is the model itself.
el cliente es el modelo en sí.
And that subtle difference changes
Y esa sutil cambios en las diferencias
everything about how we design integrations.
todo sobre cómo diseñamos integraciones.
Let's Zoom out for a bit.
Vamos a alejar un poco.
The rise of MCP is part of a bigger
El auge de MCP es parte de una mayor
movement towards model native software architecture.
movimiento hacia el modelo arquitectura de software nativo.
For decades, we've built systems for humans and for code.
Durante décadas, hemos construido para humanos y para el código.
Now we're building systems for models and models
Ahora estamos construyendo sistemas para modelos y modelos
don't consume REST endpoints the way code does.
no consumas DESCANSO puntos finales de la misma manera que lo hace el código.
Crie uma conta grátis e ganhe 15 novas palavras por dia.
Criar conta grátis