0Pricing
MCP Academy · Lección

El transporte HTTP transmitible

Cómo funciona MCP mediante un único endpoint HTTP.

El transporte HTTP transmitible es una lección gratuita de MCP Academy en CoddyKit. Esta es la lección 2 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de MCP Academy, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de MCP Academy incluye 4 lecciones en total.

Partes de esta lección aún no han sido traducidas y se muestran en inglés.

Meet Streamable HTTP

MCP's modern remote transport is called Streamable HTTP. It lets your server live behind one web URL that any client on the internet can reach.

One Endpoint to Rule Them All

Unlike older designs, Streamable HTTP uses a single endpoint, often something like /mcp. Both requests and replies flow through that one path.

POST https://api.example.com/mcp

Clients POST Their Messages

To call a tool, the client sends a normal HTTP POST to the endpoint. The body is the same JSON-RPC message you already learned about. 📨

Two Ways to Answer

The server can reply in two shapes: a plain JSON response for quick calls, or an event stream when it wants to send results bit by bit.

The Accept Header Decides

The client's Accept header signals what it can handle. Listing both JSON and the event-stream type lets the server choose the best reply format.

Accept: application/json, text/event-stream

It Is Still JSON-RPC

The transport changed, but the language did not. Every message over HTTP is the same JSON-RPC request, response, or notification you met earlier.

Turning On HTTP in the SDK

With the Python SDK you flip one switch: run your server with the streamable-http transport instead of stdio. The tools stay exactly the same.

mcp.run(transport="streamable-http")

It Speaks Plain HTTP

Because it is ordinary HTTP, it plays nicely with the whole web stack: load balancers, proxies, and TLS all work without anything special. 🌐

Stateful or Stateless

Streamable HTTP can run stateful, remembering a session, or stateless, treating each call fresh. You choose based on how your server holds context.

It Replaced an Older Transport

An earlier HTTP+SSE design used two separate paths and was clunkier. Streamable HTTP replaced it as the recommended way to serve MCP remotely.

Why It Matters

This single-endpoint design is what makes a remote MCP server practical to deploy and easy for any client to connect to from anywhere.

Quick Check

How does a client send a tool call over Streamable HTTP?

Recap: Streamable HTTP

Streamable HTTP serves MCP over one HTTP endpoint: clients POST JSON-RPC, and the server answers with JSON or a live event stream. Same logic, remote reach. 🚀

Preguntas frecuentes

¿La lección «El transporte HTTP transmitible» es gratis?

Sí — el texto completo de «El transporte HTTP transmitible» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de MCP Academy, actualiza a CoddyKit PRO. El curso de MCP Academy incluye 4 lecciones en total.

¿Qué aprenderé en «El transporte HTTP transmitible»?

Cómo funciona MCP mediante un único endpoint HTTP. Practicas MCP Academy con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.

¿Necesito experiencia previa para empezar MCP Academy?

No se requiere experiencia previa. MCP Academy en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 2 de 4.

¿Cuánto tiempo toma la lección «El transporte HTTP transmitible»?

La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.

¿Puedo escribir y ejecutar código en esta lección de MCP Academy?

Sí. Cada lección de MCP Academy incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.

Todas las lecciones de este curso

  1. Por qué stdio no es suficiente
  2. El transporte HTTP transmitible
  3. Transmitir respuestas con SSE
  4. Sesiones y reconexión
← Volver a MCP Academy