Untitled Lesson
Skill Matrix
UNLOCK NODES BY LEARNING NEW TAGS.
💻 Code Challenge | +75 XP
Task: Reorder the blocks in logical sequence to solve the problem.
A.D.A. Interface
Adaptive Didactic Assistant

Pascual Vila
Full-Stack Software and AI Engineer
Full-Stack Software and AI Engineer with 6 years of experience building enterprise-grade web applications across React, Angular, Node.js, and Python. Recently completed a Master's in AI Development specializing in LLMs, RAG, and AI agent architectures, and currently builds enterprise systems that integrate AI and Digital Twins to optimize industrial and logistics processes.
LinkedIn ↗The Error //
Exposing an MCP tool that reads or modifies sensitive data with no authorization check
// Wrong: no authorization check, same gap as an unprotected API endpoint
server.tool("getOrder", { orderId: z.string() }, async ({ orderId }) => {
return await orderRepository.findById(orderId); // any caller, any order
});
// Correct: same rigor as any API
server.tool("getOrder", { orderId: z.string(), userId: z.string() },
async ({ orderId, userId }) => {
const order = await orderRepository.findById(orderId);
if (order.userId !== userId) throw new Error("Unauthorized");
return order;
});The Solution //
An MCP server is functionally another API surface, regardless of the fact that it's designed to be called by an AI client rather than a traditional HTTP client — it needs the exact same authorization discipline as any other endpoint, verifying the requester actually has permission for the specific resource or action being requested.
The Error //
Choosing the wrong transport mechanism for where the MCP server actually runs relative to its client
// Wrong for a remote server: stdio only works for a local subprocess
// Correct: choose the transport matching your actual deployment
// Local subprocess → stdio transport
// Remote, network-accessible server → HTTP-based transportThe Solution //
A stdio transport is designed for a local tool spawned as a subprocess on the same machine as the AI client, and won't work correctly for a server that needs to be reached over a network from a remote client, which requires an HTTP-based transport instead — matching the transport to the actual deployment topology matters.