Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add Primitive repository APIs (`ResourceRepository`, `ToolsRepository`, ... )

Open
#578 20 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
java

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.

Description

enhancement feature/repositories P3

Currently, McpStatelessAsyncServer and McpAsyncServer save resources, tools, prompts, and completionswithCopyOnWriteArrayList`.

https://github.com/modelcontextprotocol/java-sdk/blob/main/mcp-core/src/main/java/io/modelcontextprotocol/server/McpStatelessAsyncServer.java#L60-L68

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.

Image

Dominant language
Java
Stars
3.7k
Forks
1.1k
Avg merge
1d 15h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelcontextprotocol/java-sdk

All issues in modelcontextprotocol/java-sdk

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.