Skip to main content
Use this example when your server is growing beyond a single file and you want a clear alternative to grouping.

What it shows

  • one Redop instance per feature area
  • explicit tool and resource names like notes.list and notes://{id}
  • root-level composition with .use(...)
  • a folder pattern that scales cleanly as the server grows

Single-file runnable example

This is the runnable example that ships in packages/redop/examples/modules.ts.
When the server grows, split the same pattern into feature folders instead of bringing back grouping.

src/features/notes/index.ts

src/features/users/index.ts

src/index.ts

Why this example is useful

  • each feature module can be tested in isolation
  • the main server only owns top-level metadata and composition
  • public MCP names stay explicit and stable
  • .use(...) becomes the only composition model you need to teach

Run it