Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const handler = createMcpHandler(
verboseLogs: true,
}
);
export { handler as GET, handler as POST };
export { handler as GET, handler as POST, handler as DELETE };
```

### Advanced Routing
Expand Down Expand Up @@ -304,7 +304,7 @@ const authHandler = withMcpAuth(handler, verifyToken, {
resourceMetadataPath: "/.well-known/oauth-protected-resource", // Optional: Custom metadata path
});

export { authHandler as GET, authHandler as POST };
export { authHandler as GET, authHandler as POST, authHandler as DELETE };
```

### OAuth Protected Resource Metadata
Expand Down
4 changes: 2 additions & 2 deletions examples/auth/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ const authHandler = withMcpAuth(handler, verifyToken, {
resourceMetadataPath: "/.well-known/oauth-protected-resource",
});

// Export the handler for both GET and POST methods
export { authHandler as GET, authHandler as POST };
// Export the handler for GET, POST, and DELETE HTTP methods
export { authHandler as GET, authHandler as POST, authHandler as DELETE };
2 changes: 1 addition & 1 deletion examples/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ const handler = createMcpRouteHandler(
}
);

export { handler as GET, handler as POST };
export { handler as GET, handler as POST, handler as DELETE };
2 changes: 1 addition & 1 deletion src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const handler = createMcpHandler(
}
);

export { handler as GET, handler as POST };
export { handler as GET, handler as POST, handler as DELETE };
`;

async function detectPackageManager(): Promise<
Expand Down