Generates text embeddings locally for semantic search using Ollama models like nomic-embed-text, all-minilm, or mxbai-embed-large.
Generates text embeddings for semantic search using OpenAI's embedding models (text-embedding-3-small, text-embedding-3-large, or text-embedding-ada-002).
Uses PostgreSQL with pg-vector extension for storing and performing efficient vector similarity searches on document embeddings.
Provides comprehensive access to Zotero libraries including searching items, managing collections and tags, extracting full text and annotations from PDFs, managing notes, and AI-powered semantic search across research materials.
Zotero MCP Server
A Model Context Protocol (MCP) server for Zotero that provides semantic search capabilities using PostgreSQL with pg-vector and OpenAI/Ollama embeddings.
This is a fork of the
THIS IS NOT THE OFFICIAL PROJECT AND MY MODIFICATIONY MAY HAVE BUGS. I just use this version for my personal research projects.
At the moment I use the version in this repository against my own OpenAI compatible API gateway.
Features
Full Zotero Integration: Access your Zotero library through MCP tools
Semantic Search: AI-powered semantic search using PostgreSQL + pg-vector
Multiple Embedding Providers: Support for OpenAI and Ollama embeddings
Lightweight Architecture: Removed heavy ML dependencies (torch, transformers)
High Performance: PostgreSQL backend with optimized vector operations
Flexible Configuration: Support for local and remote database instances
Quick Start
Prerequisites
Python 3.10+
PostgreSQL 15+ with pg-vector extension
Zotero desktop application or Zotero Web API credentials
OpenAI API key or Ollama installation
Installation
PostgreSQL Setup
If you have access to a PostgreSQL instance with pg-vector:
Configuration
Run the interactive setup:
Usage with Claude Desktop
Configuration
Database Configuration
Create ~/.config/zotero-mcp/config.json:
Available Tools
Core Zotero Tools
zotero_search_items- Search items by text queryzotero_search_by_tag- Search items by tagszotero_get_item_metadata- Get item details and metadatazotero_get_item_fulltext- Extract full text from attachmentszotero_get_collections- List all collectionszotero_get_collection_items- Get items in a collectionzotero_get_recent- Get recently added itemszotero_get_tags- List all tagszotero_batch_update_tags- Bulk update tags
Semantic Search Tools
zotero_semantic_search- AI-powered semantic searchzotero_update_search_database- Update embedding databasezotero_get_search_database_status- Check database status
Advanced Tools
zotero_get_annotations- Extract annotations from PDFszotero_get_notes- Retrieve noteszotero_search_notes- Search through noteszotero_create_note- Create new noteszotero_advanced_search- Complex multi-criteria search
Semantic Search
The semantic search uses PostgreSQL with pg-vector for efficient vector similarity search:
Database Population
Embedding Providers
OpenAI (Recommended)
Models Available:
text-embedding-3-small(1536 dimensions) - Fast and efficienttext-embedding-3-large(3072 dimensions) - Higher qualitytext-embedding-ada-002(1536 dimensions) - Legacy model
Ollama (Local)
Popular Models:
nomic-embed-text- Good general purpose embeddingsall-minilm- Lightweight and fastmxbai-embed-large- High quality embeddings
To install Ollama models:
Architecture
Component Overview
Database Schema
License
MIT License - see LICENSE file for details.