Metadata-Version: 2.4
Name: zotero-mcp
Version: 0.1.3
Summary: Model Context Protocol server for Zotero
Project-URL: Repository, https://github.com/kujenga/zotero-mcp
Project-URL: Issues, https://github.com/kujenga/zotero-mcp/issues
Author-email: Aaron Taylor <pypi@ataylor.io>
License: MIT License
        
        Copyright (c) 2025 Aaron Taylor
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: mcp,zotero
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Requires-Dist: mcp[cli]>=1.2.1
Requires-Dist: pydantic>=2.10.6
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: pyzotero>=1.6.8
Description-Content-Type: text/markdown

# Model Context Protocol server for Zotero

This project is a python-based server that implements the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) for [Zotero](https://www.zotero.org/).

## Features

This MCP server provides the following tools:

- `zotero_search_items`: Search for items in your Zotero library using a text query
- `zotero_item_metadata`: Get detailed information about a specific Zotero item
- `zotero_item_fulltext`: Get the full text of a specific Zotero item

These can be discovered and accessed through the [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector) or any other [MCP client](https://modelcontextprotocol.io/clients).

Each tool returns formatted text containing relevant information from your Zotero items.

## Installation

To use this with Claude Desktop, add the following to the `mcpServers` configuration:

```json
    "zotero": {
      "command": "uvx",
      "args": ["zotero-mcp"],
      "env": {
        "ZOTERO_LOCAL": "true"
      }
    }
```

The following environment variables are supported:

- `ZOTERO_LOCAL=true`: Use the local Zotero API (default: false)
- `ZOTERO_LIBRARY_ID`: Your Zotero library ID (not required for the local API)
- `ZOTERO_LIBRARY_TYPE`: The type of library (user or group, default: user)
- `ZOTERO_API_KEY`: Your Zotero API key (not required for the local API)

You can find your library ID and create an API key in your Zotero account settings: https://www.zotero.org/settings/keys

The [local Zotero API](https://groups.google.com/g/zotero-dev/c/ElvHhIFAXrY/m/fA7SKKwsAgAJ) can be used with Zotero 7 running on the same machine.

> n.b. An upcoming Zotero release is needed to support the fulltext API locally: https://github.com/zotero/zotero/pull/5004

## Development

1. Clone this repository
1. Install dependencies with [uv](https://docs.astral.sh/uv/) by running: `uv sync`
1. Create a `.env` file in the project root with the environment variables above

Start the [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector) for local development:

```bash
npx @modelcontextprotocol/inspector uv run zotero-mcp
```

### Running Tests

To run the test suite:

```bash
uv run pytest
```

## Relevant Documentation

- https://modelcontextprotocol.io/tutorials/building-mcp-with-llms
- https://github.com/modelcontextprotocol/python-sdk
- https://pyzotero.readthedocs.io/en/latest/
- https://www.zotero.org/support/dev/web_api/v3/start
