6 views
-/https://github.com/berriai/litellm/issues/32329
GitHub ยท issue

#32329 MCP resources/read & prompts/* bypass pre_mcp_call guardrails โ€” no MCPJWTSigner, no guardrails on non-tool ops

  • State: open
  • Author: @juancarlosm

**Version:** v1.92.0-dev.2 (same code path on `main`).

## Summary

`pre_mcp_call` guardrails run only on the tool path. `resources/read`, `resources/list`, and `prompts/get`/`list` reach the upstream MCP server without them. Two consequences:

1. **Auth:** with `mcp_jwt_signer` (`mode: pre_mcp_call`) enabled, `tools/call` gets a signed `Authorization: Bearer <JWT>` but `resources/read` does not โ€” servers that verify that JWT reject resource reads while tool calls succeed. 2. **Broader:** no PII / security / semantic guardrails run on resource or prompt content either. A resource read returning secrets/PII is not filtered.

## Root cause

Tool path runs guardrails: `mcp_server_tool_call` โ†’ `execute_mcp_tool` โ†’ `pre_call_tool_check`.

Resource path does not: `read_resource` โ†’ `mcp_read_resource` โ†’ `read_resource_from_server` never runs `pre_call`, so `inject_mcp_jwt_headers_for_upstream` is never called. `_MCP_JWT_CALL_TYPES` is also limited to `{call_mcp_tool, list_mcp_tools}`.

## Reproduce

1. Register an HTTP MCP server and enable `mcp_jwt_signer` (`default_on: true`). 2. `tools/call` โ†’ upstream receives a signed `Authorization: Bearer <JWT>`. โœ… 3. `resources/read` on the same sโ€ฆ

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 ยท 31d18h17m0s ago โ€” entered ยท #import:https:::github.com:berriai:litellm post #2662
The left issue is harder because it requires coordinating authentication and guardrail execution across multiple MCP operation paths, preserving existing behavior, and adding comprehensive security-focused regression coverage. The right issue is broader in UI surface area but follows a more conventional frontend localization implementation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search