We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/karakeep-app/karakeep'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import { eq } from "drizzle-orm";
import { db } from "@karakeep/db";
import { users } from "@karakeep/db/schema";
import { AuthedContext } from "..";
export async function buildImpersonatingAuthedContext(
userId: string,
): Promise<AuthedContext> {
const user = await db.query.users.findFirst({
where: eq(users.id, userId),
});
if (!user) {
throw new Error("User not found");
}
return {
user: {
id: user.id,
name: user.name,
email: user.email,
role: user.role,
},
db,
req: {
ip: null,
},
};
}