AgentToolProvider MCP probe: no byte-size cap on rmcp's JSON tools/list response before parsing
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- backend, networking
Research direction
Start by checking whether rmcp 3.1.2 or a newer upstream version has a fix for the JSON response path in rmcp::transport::common::reqwest::streamable_http_client. Read operator::resources::mcp_probe::run_probe_session and its module doc comment to understand the existing transport design. Done means deciding how to address or accept the uncapped response read and documenting the resulting scope.
Written by the indexing model from the issue text.
Description
Follow-up from grid#56 review (nerdalert): grid#56 landed bounds on the tool
catalog we persist to status.discoveredTools (name length + entry count),
but not on the raw HTTP response rmcp/reqwest buffer into memory before
parsing it into a tools/list result.
Problem
operator::resources::mcp_probe::run_probe_session calls into rmcp's
Streamable HTTP client (rmcp::transport::streamable_http_client). Its SSE
path honors a configured max_sse_event_size limit, but the plain-JSON
tools/list response path
(response.json::<ServerJsonRpcMessage>() in
rmcp::transport::common::reqwest::streamable_http_client) reads the entire
response body into memory with no size cap in the rmcp version this
workspace depends on (3.1.2).
A fast MCP endpoint returning an implausibly large JSON body could exhaust
operator memory before parsing ever completes, even though the outer probe
timeout (PROBE_TIMEOUT) still bounds elapsed time.
Options
- Upstream fix: check whether/when
rmcpadds a body-size cap for the
JSON response path (may already be tracked upstream -- worth checking
their issue tracker before doing anything else here). - Bypass rmcp's session API: bound bytes ourselves via a raw
reqwest
streamed read (bytes_stream()+ running total check) before handing off
to JSON parsing. This means not usingrmcp::ServiceExt::serve()/
list_tools()for this call, which undermines this module's "reuse
rmcp's transport, don't reimplement MCP protocol detection" design intent
(see the module doc comment). - Accept the gap for now: this is a controller-initiated discovery probe
against operator-declared endpoints, not a request-time data-plane path,
and the operator process itself has its own resource limits. Revisit if/
whenrmcpcloses the gap upstream.
Not blocking grid#56
The count/name-length bounds that landed in grid#56 already narrow the
practical blast radius once a response is read; this issue is specifically
about bounding the read itself.
- Dominant language
- Rust
- Stars
- 10
- Forks
- 24
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 136
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from praxis-proxy/grid
-
area/security triage/accepted
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
praxis-proxy/grid#504 · 1 comment ·
Maintainers usually reply within 1 day
-
triage/needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
praxis-proxy/grid#496 ·
Maintainers usually reply within 1 day
-
triage/needs-triage
Difficulty 5/5 Over a week Newbie friendliness 10/100
praxis-proxy/grid#511 ·
Maintainers usually reply within 1 day
-
triage/needs-triage
Difficulty 4/5 3-5 days Newbie friendliness 22/100
praxis-proxy/grid#510 ·
Maintainers usually reply within 1 day
-
area/security epic triage/accepted
Difficulty 5/5 Over a week Newbie friendliness 10/100
praxis-proxy/grid#508 ·
Maintainers usually reply within 1 day
All issues in praxis-proxy/grid
Similar issues
-
area:docs documentation good first issue priority:medium
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
calagopus/panel#285 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: streamed Responses API flex_unavailable error maps to 500 InternalServerError instead of 429Openllm translation
Difficulty 2/5 Under an hour Newbie friendliness 85/100
BerriAI/litellm#49736 · 1 comment ·
Maintainers usually reply within 1 day
-
question
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
autoindex tests: denied loopback bind shows only PermissionDenied (255 failures), not the causeOpenfield-report
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day