Metadata-Version: 2.4
Name: iflow-mcp_lrriver-zotero_mcp
Version: 0.1.0
Summary: A Model Context Protocol (MCP) server for interacting with Zotero libraries
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: fastmcp>=2.8.1
Requires-Dist: python-dotenv>=1.1.0
Requires-Dist: pyzotero>=1.6.11
Description-Content-Type: text/markdown

# zotero_mcp
[English](./README.md) | [中文](./README_zh.md)

Support connecting Zotero via MCP with a custom server and client, without the need for tools like the Claude app or Cursor.

## Environment configuration
```
conda create -n mcp python=3.12 -y
conda activate mcp
pip install -r requirements.txt
```

## Run MCP

First, create a `.env` file and fill in the following variables. `zotero_api_key` needs to be obtained from the Zotero official website, and `api_key` is your LLM's API key:

```
zotero_api_key=''
api_key=""
```
First, create a `.env` file and fill in the following variables:

```  
model=""  
llm_api_base = ""  
llm_api_key=""  
zotero_api_key=''  
library_id=''  
```  

`model` is the name of the LLM, `llm_api_base` is the URL of the LLM, and `llm_api_key` is the API Key for the LLM. The `zotero_api_key` can be created by visiting the [Zotero](https://www.zotero.org/settings/keys), and your [library_id](https://www.zotero.org/settings/keys) is shown below:  
![library_id](./img/user_id.png)


Then start the server:
```bash
python ./server.py
```

Open a new terminal window and run the client:
```bash
python ./client.py
```

Here's the testing result:

Upload files in Zotero in advance:

![Zotero upload screenshot](./img/image.png)

Query document content via MCP:

![Query document content screenshot](./img/image-1.png)
