KM

kaliaboi/mcp-zotero

API 开发

本页由 AI 翻译,技术细节请以原文为准。 查看原文

163 stars 19 forks 质量 65 趋势 0MIT

kaliaboi/mcp-zotero 是从 https://github.com/kaliaboi/mcp-zotero. 导入的 MCP 服务器候选

概览

kaliaboi/mcp-zotero 是从 https://github.com/kaliaboi/mcp-zotero. 导入的 MCP 服务器候选

概述(AI 翻译)

一个用于Zotero集成的模型上下文协议服务器,允许Claude与你的Zotero库交互。

布置

  1. 获取你的Zotero账号:

回复内容如下:

你需要的是userID值。

  1. 设置环境变量:

  2. 核实您的资质:

你应该能在回复中看到你的催收列表。

  1. 安装并运行:

与 Claude Desktop 的集成

要将此服务器与 Claude Desktop 一起使用,请在您的 Claude Desktop 配置中添加以下内容:

可用工具

  • get_collections:列出你库中的所有收藏
  • get_collection_items:获取特定集合中的物品
  • get_item_details:获取论文的详细信息
  • search_library:搜索整个库
  • get_recent:获取最近添加的论文

故障排除

如果你遇到任何问题:

  1. 验证你的环境变量是否被设置:

  2. 检查安装情况:

  3. 尝试重新安装:

本页由 AI 翻译,技术细节请以原文为准。

README

MCP Zotero

A Model Context Protocol server for Zotero integration that allows Claude to interact with your Zotero library.

Setup

  1. Get your Zotero credentials:

    # First, create an API key at https://www.zotero.org/settings/keys
    # Then use it to get your user ID:
    curl -H "Zotero-API-Key: YOUR_API_KEY" https://api.zotero.org/keys/current
    

    The response will look like:

    {
      "userID": 123456,
      "username": "your_username",
      "access": {
        "user": {
          "library": true,
          "files": true,
          "notes": true,
          "write": true
        }
      }
    }
    

    The userID value is what you need.

  2. Set environment variables:

    export ZOTERO_API_KEY="your-api-key"
    export ZOTERO_USER_ID="user-id-from-curl"
    
  3. Verify your credentials:

    # Test that your credentials work:
    curl -H "Zotero-API-Key: $ZOTERO_API_KEY" \
         "https://api.zotero.org/users/$ZOTERO_USER_ID/collections"
    

    You should see your collections list in the response.

  4. Install and run:

    # Install globally (recommended)
    npm install -g mcp-zotero
    mcp-zotero
    
    # Or run directly with npx
    npx mcp-zotero
    

Integration with Claude Desktop

To use this server with Claude Desktop, add the following to your Claude Desktop configuration:

{
  "mcpServers": {
    "zotero": {
      "command": "mcp-zotero",
      "env": {
        "ZOTERO_API_KEY": YOUR_API_KEY,
        "ZOTERO_USER_ID": YOUR_USER_ID
      }
    }
  }
}

Available Tools

  • get_collections: List all collections in your library
  • get_collection_items: Get items in a specific collection
  • get_item_details: Get detailed information about a paper
  • search_library: Search your entire library
  • get_recent: Get recently added papers

Troubleshooting

If you encounter any issues:

  1. Verify your environment variables are set:

    echo $ZOTERO_API_KEY
    echo $ZOTERO_USER_ID
    
  2. Check the installation:

    npm list -g mcp-zotero
    
  3. Try reinstalling:

    npm uninstall -g mcp-zotero
    npm install -g mcp-zotero
    
在 GitHub 查看完整 README

安装

npx mcp-zotero
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "zotero": { "command": "mcp-zotero", "env": { "ZOTERO_API_KEY": YOUR_API_KEY, "ZOTERO_USER_ID": YOUR_USER_ID } } } }