v0.4.0 · World

server-middleware

Server middleware component world

Middleware components sit between transports and other handlers in the pipeline, providing cross-cutting concerns like:

  • Wrapping capability components (tools-capability → tools-middleware → server-handler)
  • Adding instrumentation, logging, or monitoring
  • Implementing request/response transformation

Middleware imports server-handler (to call downstream) and exports server-handler (to receive from upstream), forming a linear chain.