Skip to main content
Glama

Escudo de Fuga Entre Clientes

detect_cross_client_leak_risk

Analiza el código fuente que arma el transporte HTTP/SSE de un servidor MCP en busca de estado compartido sin aislamiento por sesión/cliente: (1) una sola instancia de McpServer/Server creada a nivel de módulo (una vez al arrancar) que se conecta a un transporte nuevo dentro de cada handler de petición, en vez de crear también una instancia nueva del servidor por cliente — las respuestas pueden mezclarse entre clientes distintos; y (2) una variable mutable (let/var) a nivel de módulo escrita por un handler de petición y leída dentro del callback de una herramienta registrada, sin que haga falta reutilizar ninguna instancia completa de servidor. El mismo patrón detrás de CVE-2026-25536 (CVSS 7.1) en el propio SDK oficial de TypeScript de MCP — "Context Injection and Over Sharing" del OWASP MCP Top 10. Es un análisis estático por patrones de texto (no ejecuta el código) — mismo enfoque que detect_dns_rebinding_risk y detect_missing_auth_risk. Requiere una llave de acceso válida (usos gratis o créditos) — ver POST /crear-llave.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "codigo": "<codigo>"
    },
    "name": "detect_cross_client_leak_risk"
  }
}

Input Schema

NameRequiredDescriptionDefault
codigoYesEl código fuente que arma el transporte HTTP/SSE de un servidor MCP, en texto plano.
lenguajeNoSolo informativo (ej. "javascript", "typescript") — este campo no cambia el resultado.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full burden and does a solid job: it discloses the analysis method ('análisis estático por patrones de texto (no ejecuta el código)'), the auth requirement and credit model, and the concrete failure mode (responses mixed between clients). It does not describe what a finding looks like, severity scoring, or false-positive behavior, which is the main remaining gap for a scanner with no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Content is front-loaded and largely earns its place — the CVE/OWASP mapping and the non-execution caveat are genuinely useful. However, the core content is delivered as a single ~130-word sentence with nested em-dash clauses and two numbered sub-clauses, which is hard to parse; breaking the two detection patterns into separate sentences would improve scanability without adding length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a static analyzer with no annotations and no output schema, the definition covers input scope, detection logic, method, and auth. It leaves an important gap: nothing tells the agent what comes back (findings list, line references, risk verdict), so the agent cannot anticipate or interpret the result. Adequate but not complete for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameters are already documented in the schema, including the note that 'lenguaje' is informational only. The description adds scoping meaning by specifying that 'codigo' must be the HTTP/SSE transport code rather than arbitrary source, but gives no format or size guidance beyond that, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a precise verb and resource ('Analiza el código fuente que arma el transporte HTTP/SSE de un servidor MCP') and then enumerates the two exact anti-patterns it detects: a module-level McpServer/Server instance reused across per-request transports, and a module-level mutable variable written in a request handler and read in a tool callback. It also anchors the check to CVE-2026-25536 and the OWASP MCP Top 10 entry, so an agent can distinguish this from the ~20 sibling detect_* tools without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is clear: feed it the HTTP/SSE transport source of an MCP server, and it is the same style of static detector as detect_dns_rebinding_risk and detect_missing_auth_risk, which tells the agent these are parallel, non-overlapping risk checks. It also states the prerequisite of a valid API key (free uses or credits, POST /crear-llave). It stops short of explicit exclusions, e.g. that it does not cover stdio transports or runtime behavior.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources