MCPcopy Index your code
hub / github.com/Visterainer/aidea-zotero

github.com/Visterainer/aidea-zotero @v3.2.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.2.2 ↗ · + Follow
2,011 symbols 6,507 edges 149 files 113 documented · 6% updated 8d agov3.2.2 · 2026-06-29★ 762 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

AIdea Logo

AIdea

English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Français

🌐 Website: https://visterainer.github.io/aidea-zotero/en/

A free, open-source AI assistant plugin for Zotero

🔐 OAuth login with OpenAI (ChatGPT), Google Gemini, and GitHub Copilot

⚙️ OpenAI-compatible APIs and local or self-hosted models via Ollama, LM Studio, vLLM, and similar runtimes

OpenAI ChatGPT Google Gemini GitHub Copilot

OpenAI Compatible API Ollama LM Studio vLLM

Features  |  Installation  |  Getting Started  |  Configuration  |  License


✨ Features

💬 AI Chat in the Side Panel

Chat with AI directly in Zotero's side panel, available in both the Library view and the PDF Reader. Ask questions, get summaries, and stay inside the same research workflow.

Side panel chat

📄 Paper-Aware Context

Select text in the PDF reader and click Add Text to attach the selected passage to the context area. AIdea can then answer against the selected passage instead of relying on a generic summary.

📝 Selection Translation

Translate selected text directly in Zotero's PDF reader popup. Selection translation uses the same OAuth/API model list as the chat panel, but can be configured with its own enable switch, model, source language, and target language.

The first time this feature is used for a paper, AIdea creates a local cold-start cache with a compact paper overview and terminology summary. Later selection translations reuse that local cache as context, and translated passages can be added back to Zotero notes.

Selection translation popup in the PDF reader

Selection translation settings

⚡ Quick Action Shortcuts

Use one-click shortcuts for common tasks such as Summarize, Explain, and Translate. Shortcuts can be added, edited, reordered, or removed to match your workflow.

🖼️ Multimodal Support

Attach screenshots, figures, and charts to your messages. AIdea supports drag and drop, clipboard paste, and screenshot capture directly from PDF content.

🔐 OAuth Login Without an API Key

Sign in with your existing account through OAuth. AIdea supports multiple providers with provider-specific OAuth flows, so you can start without managing an API key manually.

📄 Full-Document Translation

Translate full papers directly inside Zotero and export either a bilingual dual-column PDF or a single-language PDF. The translation workflow supports model selection, output path configuration, and end-to-end execution in the side panel.

Full-document translation panel

Example outputs:

Bilingual architecture paper translation example

Formula-heavy paper translation example

Table and prose translation example

🌐 Multi-Provider Support

Provider Auth Method Extra Setup
OpenAI (ChatGPT) OAuth via Codex CLI Node.js (auto-installed)
Google Gemini In-plugin OAuth (PKCE) Node.js (auto-installed)
GitHub Copilot In-plugin OAuth (Device Code) None

📝 Note Export

Save AI responses as Zotero notes with one click. Responses are stored in Markdown and support LaTeX math rendering.

💾 Persistent Chat History

All conversations are stored locally in Zotero's database. You can switch between conversations, continue previous threads, and manage local chat history.

🧠 Memory System

AIdea captures and recalls useful information across conversations to improve continuity and context awareness over time.

  • Auto-capture detects preferences, decisions, facts, and key entities from natural conversation
  • Per-library isolation keeps memories scoped to each Zotero library
  • Smart deduplication uses Jaccard token similarity to prevent redundant memories
  • Relevance-ranked retrieval combines overlap, substring match, recency, and importance
  • Prompt injection defense blocks malicious or irrelevant content from being stored
  • Fully local storage keeps memory data inside Zotero's SQLite database

🎨 Rich Rendering

  • Full Markdown rendering, including headings, lists, code blocks, and tables
  • LaTeX math support via KaTeX
  • Syntax highlighting for code blocks
  • Smooth streaming responses

🌍 Interface Languages

The plugin interface now supports 12 UI languages: English, 简体中文, 繁體中文, 日本語, 한국어, Français, Deutsch, Español, Русский, Português, العربية, and हिन्दी. Full-document translation keeps its broader target-language list independent from the UI language list.


📦 Installation

Requirements

  • Zotero 7 or later
  • Node.js, required for OpenAI and Gemini, can be installed automatically by the plugin when needed

Install the Plugin

  1. Download the latest AIdea-x.x.x.xpi from Releases
  2. In Zotero, go to Tools → Add-ons
  3. Click the gear icon ⚙️ and choose Install Add-on From File...
  4. Select the downloaded .xpi file
  5. Restart Zotero

Upgrade

Install the newer .xpi package over the existing one. Chat history, stored memory, and local settings are preserved.


🚀 Getting Started

1. Open Settings

Go to Tools → Add-ons → AIdea → Settings. On older Zotero builds, the path may appear under Edit → Settings → AIdea.

2. Choose a Connection Mode

AIdea supports two connection modes. You can use either one or combine both.

Option A: OAuth Login

For each provider card, the typical setup order is:

Install/Update EnvOAuth LoginRefresh Models

Button What it does
Install/Update Env Installs and configures the required CLI tools and runtime, including Node.js and npm when needed. GitHub Copilot does not require this step.
OAuth Login Starts the provider-specific login flow. OpenAI and Gemini open the browser directly. GitHub Copilot shows a device code, copies it, and opens the browser for authorization.
Refresh Models Loads the list of available models for the provider after login.
Remove Auth Clears the locally stored OAuth token for that provider.

OAuth providers and model management

💡 Tip: Each provider only needs to be configured once. The login session is stored locally and remains available after Zotero restarts.

Option B: OpenAI-Compatible API Endpoint

AIdea can also connect to any OpenAI-compatible chat endpoint, including local, self-hosted, or third-party services such as Ollama, LM Studio, vLLM, DeepSeek, OpenRouter, or Groq.

In Settings, switch to API Mode and fill in:

Field Required Description
API Base URL Yes The base URL of the compatible endpoint, such as https://api.openai.com/v1 or http://localhost:11434/v1
API Key No Required only when the endpoint expects authentication
Model Yes Enter the model manually or click Auto Fetch Models to detect available models

API mode custom endpoint

Note: API mode targets compatible /chat/completions endpoints. It does not guarantee support for provider-specific features beyond standard chat completion.

3. Start Chatting

  • In the Library Panel, select an item and use the AIdea panel in the right sidebar
  • In the PDF Reader, open a PDF and use the AIdea panel in the reader sidebar
  • Type your question and press Send or hit Enter

4. Use Quick Actions

Click shortcut buttons such as Summarize, Explain, or Translate for one-click actions. Right-click a shortcut to edit or remove it.


⚙️ Configuration

Setting Description Default
UI Language Plugin interface language Auto-detected, fallback EN
System Prompt Custom instructions for the model Empty
Show "Add Text" Show the Add Text option in the reader selection popup On
Selection Translation Translate selected reader text in the popup and reuse local cold-start context On
Selection Translation Model Dedicated model for reader selection translation First available model unless changed
Show All Models Show all available models instead of a curated subset Off
Tab Bar Show or hide the tab navigation bar Hidden

🔒 Privacy & Security

  • OAuth tokens are stored locally only
  • API requests are sent directly to the selected provider or configured endpoint
  • AIdea does not collect usage telemetry or user data
  • Chat history and memory remain in Zotero's local database
  • The code is fully available for inspection on GitHub

🗺️ Roadmap

Planned directions for future releases include:

  • One-click architecture diagrams, for generating structural visualizations from paper content

💡 Feature requests are welcome through Issues.


🛠️ Development

# Install dependencies
npm install

# Development mode
npm start

# Build production XPI
npm run build

# Run tests
npm run test:unit

📄 License

AGPL-3.0-or-later

This project is derived from llm-for-zotero by Yile Wang. See THIRD_PARTY_NOTICES.md for attribution details.


⭐ Star History

Star History Chart


Author: zhile

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 1,848
Method 106
Class 32
Interface 25

Languages

TypeScript94%
Python6%

Modules by API surface

src/modules/contextPanel/setupHandlers.ts193 symbols
src/utils/oauthCli.ts178 symbols
src/modules/preferenceScript.ts111 symbols
addon/scripts/aidea_bridge.py96 symbols
src/modules/contextPanel/chat.ts88 symbols
src/utils/llmClient.ts79 symbols
src/modules/pdfTranslator/translateTabController.ts57 symbols
src/utils/chatStore.ts55 symbols
test/customEndpointSettings.test.ts53 symbols
src/modules/contextPanel/prefHelpers.ts52 symbols
src/modules/contextPanel/index.ts39 symbols
src/utils/markdown.ts35 symbols

For agents

$ claude mcp add aidea-zotero \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page