Skip to main content
Glama

Zotero MCP Bridge

by colobas
hooks.ts917 B
import { initializeMcpRuntime, McpRuntime } from "./mcp/runtime"; let mcpRuntime: McpRuntime | null = null; async function onStartup() { await Promise.all([ Zotero.initializationPromise, Zotero.unlockPromise, Zotero.uiReadyPromise, ]); mcpRuntime = await initializeMcpRuntime(); addon.data.initialized = true; } async function onMainWindowLoad(_win: _ZoteroTypes.MainWindow): Promise<void> {} async function onMainWindowUnload(win: Window): Promise<void> { void win; } function onShutdown(): void { if (mcpRuntime) { void mcpRuntime.shutdown(); mcpRuntime = null; } ztoolkit.unregisterAll(); addon.data.initialized = false; // Remove addon object addon.data.alive = false; // @ts-expect-error - Plugin instance is not typed delete Zotero[addon.data.config.addonInstance]; } export default { onStartup, onShutdown, onMainWindowLoad, onMainWindowUnload, };

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/colobas/zotero_mcp_plugin'

If you have feedback or need assistance with the MCP directory API, please join our Discord server