mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-19 23:53:17 -05:00
chore: remove mcp impl from demo
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
import { oAuthDiscoveryMetadata } from "better-auth/plugins";
|
||||
import { auth } from "../../../lib/auth";
|
||||
|
||||
export const GET = oAuthDiscoveryMetadata(auth);
|
||||
@@ -1,38 +0,0 @@
|
||||
import { createMcpHandler } from "@vercel/mcp-adapter";
|
||||
import { withMcpAuth } from "better-auth/plugins";
|
||||
import { z } from "zod";
|
||||
import { auth } from "@/lib/auth";
|
||||
|
||||
const handler = withMcpAuth(auth, (req, session) => {
|
||||
return createMcpHandler(
|
||||
(server) => {
|
||||
server.tool(
|
||||
"echo",
|
||||
"Echo a message",
|
||||
{ message: z.string() },
|
||||
async ({ message }) => {
|
||||
return {
|
||||
content: [{ type: "text", text: `Tool echo: ${message}` }],
|
||||
};
|
||||
},
|
||||
);
|
||||
},
|
||||
{
|
||||
capabilities: {
|
||||
tools: {
|
||||
echo: {
|
||||
description: "Echo a message",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
redisUrl: process.env.REDIS_URL,
|
||||
basePath: "/api",
|
||||
verboseLogs: true,
|
||||
maxDuration: 60,
|
||||
},
|
||||
)(req);
|
||||
});
|
||||
|
||||
export { handler as GET, handler as POST, handler as DELETE };
|
||||
Reference in New Issue
Block a user