@modelcontextprotocol/sdk
    Preparing search index...
    • Middleware to handle unsupported HTTP methods with a 405 Method Not Allowed response.

      Parameters

      • allowedMethods: string[]

        Array of allowed HTTP methods for this endpoint (e.g., ['GET', 'POST'])

      Returns RequestHandler

      Express middleware that returns a 405 error if method not in allowed list