posit-dev / posit-dev/mcptools
Support MCP resources (resources/list, resources/read)
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 196
- Forks
- 21
- Avg merge
- 1h 14m
- Merged PRs (30d)
- 1
Description
capabilities() advertises resources, but resources/list and resources/read fall through to Method not found in both transports (handle_http_request_message() / handle_message_from_client() in R/server.R).
Resources are required for MCP Apps (the ui:// HTML is delivered via resources/read), and generally useful for serving files/data to hosts.
Suggested shape: mcp_resource(uri, mime_type, handler, meta = NULL) accepted by mcp_server() alongside tools, where handler() returns the contents (text or raw).
Part of #115.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start in R/server.R by tracing handle_http_request_message() and handle_message_from_client(), then inspect how mcp_server() currently registers tools and advertises capabilities. Implement resource registration and handling for resources/list and resources/read in both transports, and verify that handlers can return text or raw contents without Method not found responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100