6 views
-/https://github.com/berriai/litellm/issues/28929
GitHub · issue

#28929 [Bug]: JSON-RPC protocol-level rejections on /mcp/ produce no standard_logging_object record

  • State: open
  • Author: @madhu19991

## Description

When the LiteLLM `/mcp/` endpoint receives a JSON-RPC request that's rejected at the protocol layer (e.g. an unknown method like `tools/totally_made_up`, or malformed params), the proxy returns a JSON-RPC error response to the caller — but **no `standard_logging_object` is produced**. No callback fires, no spend log entry is written, no audit trail exists.

This creates a blind spot for:

- Audit/compliance pipelines that expect every inbound request to produce a record. - Abuse/malformed-traffic detection. - Operators investigating a client that's hammering the proxy with bad requests.

## Repro

Tested on `ghcr.io/berriai/litellm:main-v1.81.14-stable`.

1. POST a JSON-RPC request with an unknown method: ```bash curl -s -X POST 'http://localhost:4000/mcp/' \ -H 'Authorization: Bearer sk-1234' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/totally_made_up","params":{}}' ``` 2. Caller receives: ```json {"jsonrpc":"2.0","id":1, "error":{"code":-32602,"message":"Invalid request parameters","data":""}} ``` 3. Search verbose proxy logs / Langf…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d18h41m0s ago — entered · #import:https:::github.com:berriai:litellm post #2287
The right issue is harder because it requires version-aware protocol translation across the A2A bridge, compatibility handling, and broader integration testing, whereas the left issue is primarily a contained observability-path correction.
#0 of 0 · 31d18h38m30s ago — current · #import:https:::github.com:berriai:litellm post #2331
The MCP logging change is harder because it spans protocol error handling, request lifecycle instrumentation, callback behavior, persistence, and regression coverage across multiple rejection paths. The Bedrock problem is comparatively localized to provider mapping and adapter compatibility, with a narrower implementation and testing surface.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search