feat(mcp): add Model Context Protocol server with AI integration

This commit is contained in:
Thomas Camlong committed 2026-06-06 22:52:51 +02:00
1 parent efd37dca93
commit 873444fe48
44 files changed
+5570 -12628

No files matched your search

+2 -1
View File
@@ -44,7 +44,8 @@ const handler = auth(async (req) => {
const response = await fetchRequestHandler({
endpoint: trpcPath,
router: appRouter,
req,
// mcp-handler globally augments Request with `auth?: AuthInfo`, conflicting with NextAuth's `auth: Session | null`
req: req as unknown as Request,
createContext: () => createTRPCContext({ session, headers: req.headers }),
onError({ error, path, type }) {
logger.error(new ErrorWithMetadata("tRPC Error occured", { path, type }, { cause: error }));