Skip to main content
Glama

Karakeep MCP server

by karakeep-app
ArchiveBookmarkButton.tsx1.69 kB
import React from "react"; import { ActionButton, ActionButtonProps } from "@/components/ui/action-button"; import { toast } from "@/components/ui/use-toast"; import { api } from "@/lib/trpc"; import { useUpdateBookmark } from "@karakeep/shared-react/hooks/bookmarks"; interface ArchiveBookmarkButtonProps extends Omit<ActionButtonProps, "loading" | "disabled"> { bookmarkId: string; onDone?: () => void; } const ArchiveBookmarkButton = React.forwardRef< HTMLButtonElement, ArchiveBookmarkButtonProps >(({ bookmarkId, onDone, ...props }, ref) => { const { data } = api.bookmarks.getBookmark.useQuery( { bookmarkId }, { select: (data) => ({ archived: data.archived, }), }, ); const { mutate: updateBookmark, isPending: isArchivingBookmark } = useUpdateBookmark({ onSuccess: () => { toast({ description: "Bookmark has been archived!", }); onDone?.(); }, onError: (e) => { if (e.data?.code == "BAD_REQUEST") { toast({ variant: "destructive", description: e.message, }); } else { toast({ variant: "destructive", title: "Something went wrong", }); } }, }); if (!data) { return <span />; } return ( <ActionButton ref={ref} loading={isArchivingBookmark} disabled={data.archived} onClick={() => updateBookmark({ bookmarkId, archived: !data.archived, }) } {...props} /> ); }); ArchiveBookmarkButton.displayName = "ArchiveBookmarkButton"; export default ArchiveBookmarkButton;

MCP directory API

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