Skip to content

Add Resource Collection example to Everything server #3130

Description

@cliffhall

Is your feature request related to a problem? Please describe.
@olaservo suggested that we add an example of resource collections. It was prompted by this discussion on the topic.

Describe the solution you'd like
@olaservo has posted a gist that demonstrates the pattern where a single resources/read request

Her example returns multiple ResourceContents with different URIs - useful for modeling collections, indexes, or composite resources.

Resources like the following:

    • demo://collection/summer-specials: Returns all items as separate resources
    • demo://collection/by-category/{category}: Returns items filtered by category
    • demo://collection/item/{id}: Returns a single item (for individual access)

Describe alternatives you've considered
None really. This is a well thought out example, and I think we should add it when the newly refactored Everything server PR is merged.

Activity

  1. olaservo commented on Jan 11, 2026

    @olaservo
    Member

    @claude could you fetch the example from the gist linked in this issue and create a PR based on that code?

  2. claude commented on Jan 11, 2026

    @claude
    Contributor

    Claude finished @olaservo's task in 2m 58s —— View job • claude/issue-3130-20260111-1423 • Create PR ➔


    Task Complete

    I've successfully added the resource collection example to the Everything server based on the gist provided by @olaservo.

    What was done:

    • Fetched the example code from the gist
    • Created a new file src/everything/resources/collections.ts with the collection resources implementation
    • Updated src/everything/resources/index.ts to register the new collection resources
    • Built the project successfully
    • Committed and pushed changes

    Summary

    The new resource collection example demonstrates the pattern where a single resources/read request returns multiple ResourceContents with different URIs. This is useful for modeling collections, indexes, or composite resources.

    Resources added:

    • demo://collection/summer-specials - Returns all items as separate resources
    • demo://collection/by-category/{category} - Returns items filtered by category (accessories, footwear, skincare)
    • demo://collection/item/{id} - Returns a single item for individual access

    The implementation includes:

    • A main collection resource returning all items
    • Three category-filtered collections (accessories, footwear, skincare)
    • Five individual item resources (Summer Hat, Beach Towel, Sunglasses, Flip Flops, Sunscreen SPF50)

    Each collection returns multiple resources with their own URIs, demonstrating how collections can expose nested items as independently addressable resources.


  3. added a commit that references this issue on Jan 11, 2026
    218ad2d
  4. added a commit that references this issue on Oct 2, 2026
    f89031a
  5. added
    server-everythingReference implementation for the Everything MCP server - src/everything
    on Oct 19, 2026
  6. cliffhall commented on Oct 19, 2026

    @cliffhall
    MemberAuthor

    Triage: Priority Low (total 5)

    • Severity 2: A resource-collection example, one read returning several contents, demonstrates an MCP Resources feature and is not yet in the everything server.
    • Urgency 2: wanted eventually
    • Bonuses: +1 assigned

    Board: Servers V2 (#43), Status Incoming, awaiting maintainer review (no milestone yet). Part of the backlog triage in #4875.

  7. added this to the v2.3.0 milestone on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or requestserver-everythingReference implementation for the Everything MCP server - src/everythingv2

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions