fix(mcp): HTTP resources/read + add Local Testing docs for mcp and a2a#39
fix(mcp): HTTP resources/read + add Local Testing docs for mcp and a2a#39
Conversation
…/list
MCP Inspector GUI hit -32601 'Unknown method: resources/read' and
'Unknown method: resources/templates/list' clicking through the Resources
tab over the Streamable HTTP transport. stdio McpHandler implemented both,
dispatch_http silently dropped them.
Refactor resources_read body into a free function read_resource(iii, cfg,
params) so both transports share the exposure-filtered implementation.
Wire HTTP dispatch_http to call read_resource for 'resources/read' and to
return '{resourceTemplates: []}' for 'resources/templates/list'.
Also add 'iii://context' to HTTP resources/list (was stdio-only before).
Fix the stale hardcoded sdk_version 0.10.0 inside iii://context; use
env!(CARGO_PKG_VERSION) so the value tracks Cargo.toml.
Caught by live Inspector browser session — error surfaced the moment the
user clicked a resource URI in the UI. Post-fix: Resources tab enumerates
4 URIs, reads each, and the iii://functions filter still hides hidden +
infra functions.
…path, Inspector quickstart
Local validation was scattered across chat transcripts and a couple of
dropped test scripts. Move the full smoke recipe into each worker's README
so anyone picking up these workers can verify the exposure gates end-to-end
in 5 minutes without needing to hunt.
mcp/README.md — new 'Local testing' section covers:
1. Engine config.yaml + 'iii --no-update-check' launch.
2. Standalone testworker source that registers a function with
mcp.expose metadata.
3. Three ways to connect: curl to POST /mcp, MCP Inspector GUI
(Streamable HTTP, http://127.0.0.1:3111/mcp), Inspector CLI for
non-interactive smoke, and stdio transport including Claude Desktop
config JSON.
4. Per-gate verification: hidden function → 'not exposed' message,
infra prefix → 'in the iii-engine internal namespace', builtin call
under --no-builtins → 'disabled on this server'.
Also clarifies that Inspector's prompt/tool arg inputs are text fields
(the chevron is decoration — MCP PromptArgument has no enum field).
a2a/README.md — new 'Local testing' section covers:
1. Same engine setup.
2. Testworker with a2a.expose metadata.
3. curl against GET /.well-known/agent-card.json and POST /a2a for
message/send (data-part AND text shorthand forms), tasks/get.
4. Per-gate verification: hidden function, infra prefix (distinct
rejection messages after the recent handler.rs fix), --tier flag.
No code changes — docs only.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 55 minutes and 49 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Follow-up to #37. Two orphan commits that didn't make it into that PR:
Commits
ff9e42ffix(mcp): HTTP transport missing resources/read + resources/templates/listMCP Inspector GUI against the HTTP transport surfaced
Unknown method resources/readandUnknown method resources/templates/listerrors. The stdio transport already handled both; HTTPdispatch_httpsilently dropped them. Refactored the resource-reading path into a sharedread_resource(iii, cfg, params)free function wired into both transports so they stay in lock-step.d17f85bdocs(mcp,a2a): add Local Testing sectionsAfter real-world Inspector smoke-testing I captured the exact setup steps. Both READMEs now carry a
## Local testingsection:iii --no-update-check, port 3111)mcp.expose+ tier user, tier ops, no tier, no metadata, fakestate::*hard-floor case)http://127.0.0.1:3111/mcpDANGEROUSLY_OMIT_AUTH=true npx -y @modelcontextprotocol/inspector)Verification
cargo clippy -- -D warningsclean on mcp + a2acargo testpasses