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

Add add_resource_template() to MCPServer

Open
#3,333 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start with the MCPServer and ResourceManager add_resource() entry points, then read the implementation from #3208. Determine how ResourceTemplate is handled through the existing decorator path and define the matching direct API. Done means callers can register a ResourceTemplate without using @resource, with coverage for the new behavior.

Written by the indexing model from the issue text.

Description

v2
Description

MCPServer and ResourceManager have add_resource() method for static Resources, but there is no way to handle ResourceTemplate without using @resource decorator.

I am implementing the following workaround using the decorator for my usecase, but it is a bit odd.

server = MCPServer("...")

# Configure resources (implemented in other files)
server.resource("resource://users")(resources.list_users)
server.resource("resource://users/{id}")(resources.get_user)
References

It was implemented in #3208.

Dominant language
Python
Stars
24.3k
Forks
4k
Avg merge
1d 11h
Merged PRs (30d)
30

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/python-sdk

All issues in modelcontextprotocol/python-sdk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.