modelcontextprotocol / modelcontextprotocol/java-sdk
Add Primitive repository APIs (`ResourceRepository`, `ToolsRepository`, ... )
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.7k
- Forks
- 1.1k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 9
Description
Currently, McpStatelessAsyncServer and McpAsyncServer save resources, tools, prompts, and completionswithCopyOnWriteArrayList`.
I want to provide an API (for example, ResourcesRepository) that, by default, uses the current in-memory strategy but can be replaced, for example, by a dynamic implementation that returns a different list of resources depending on the currently authenticated user.
Contributor 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.
Research direction
Start with McpStatelessAsyncServer.java and McpAsyncServer.java, especially the CopyOnWriteArrayList fields referenced in the issue, and trace how resources, tools, prompts, and completions are stored and served. Define the repository API boundary while preserving the current in-memory behavior and allowing user-dependent implementations; done means all four primitive collections use the replaceable APIs without changing existing server behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100