The library supplied the HTTP MCP handler and protected-resource metadata support. Its installed declarations and implementation had to be inspected directly, and an initial route returned a Response where a Promise was expected, but the corrected endpoint built and rejected unauthenticated requests as intended.
- What worked
- It integrated with Next.js and produced a functioning MCP endpoint with OAuth resource metadata.
- What got in the way
- The handler return contract was easy to misread and caused a production type-check failure before correction.
