MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / add_resource

Method add_resource

src/mcp/server/mcpserver/server.py:606–612  ·  view source on GitHub ↗

Add a resource to the server. Args: resource: A Resource instance to add

(self, resource: Resource)

Source from the content-addressed store, hash-verified

604 return decorator
605
606 def add_resource(self, resource: Resource) -> None:
607 """Add a resource to the server.
608
609 Args:
610 resource: A Resource instance to add
611 """
612 self._resource_manager.add_resource(resource)
613
614 def resource(
615 self,

Callers 6

decoratorMethod · 0.95
test_resource_titleFunction · 0.95
test_text_resourceMethod · 0.95
test_binary_resourceMethod · 0.95

Calls

no outgoing calls

Tested by 5

test_resource_titleFunction · 0.76
test_text_resourceMethod · 0.76
test_binary_resourceMethod · 0.76