mendeley-mcp

mendeley-mcp

MCP server for Mendeley reference manager - search, retrieve, and manage your academic library from Claude and other MCP clients

Category
访问服务器

README

<p align="center"> <img src="mendeley-mcp.png" alt="Mendeley MCP Logo" width="200"> </p>

Mendeley MCP Server

An MCP (Model Context Protocol) server that connects your Mendeley reference library to LLM applications like Claude Desktop, Cursor, and other MCP-compatible clients.

License: MIT Python 3.10+ PyPI version Docker

<a href="https://glama.ai/mcp/servers/@pallaprolus/mendeley-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@pallaprolus/mendeley-mcp/badge" alt="Mendeley MCP server on Glama" /> </a>

Features

  • Search your library - Find papers by title, author, abstract, or notes
  • Browse folders - Navigate your collection structure
  • Get full metadata - Retrieve complete document details including abstracts
  • Search global catalog - Access Mendeley's 100M+ paper database
  • DOI lookup - Find papers by their DOI
  • Add documents - Create new entries in your library

Prerequisites

  1. Mendeley Account - Sign up at mendeley.com (uses Elsevier authentication)
  2. Mendeley API App - Register at dev.mendeley.com/myapps.html
    • Sign in with your Elsevier credentials
    • Click "Register a new app"
    • Set redirect URL to http://localhost:8585/callback
    • Select "Authorization code" flow (not Legacy)
    • Note your Client ID and Client Secret

Installation

Using pip

pip install mendeley-mcp

Using uv (recommended)

uv tool install mendeley-mcp

Using Docker

docker run -it \
  -e MENDELEY_CLIENT_ID="your-client-id" \
  -e MENDELEY_CLIENT_SECRET="your-client-secret" \
  -e MENDELEY_REFRESH_TOKEN="your-refresh-token" \
  ghcr.io/pallaprolus/mendeley-mcp

Or build locally:

git clone https://github.com/pallaprolus/mendeley-mcp.git
cd mendeley-mcp
docker build -t mendeley-mcp .

From source

git clone https://github.com/pallaprolus/mendeley-mcp.git
cd mendeley-mcp
pip install -e .

Quick Start

1. Authenticate with Mendeley

Run the authentication wizard:

mendeley-auth login

This will:

  1. Prompt for your Client ID and Client Secret
  2. Open your browser to authorize the app
  3. Save your credentials securely in your system keyring

2. Add to Claude Desktop

Edit your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Linux: ~/.config/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "mendeley": {
      "command": "mendeley-mcp"
    }
  }
}

If installed with uv:

{
  "mcpServers": {
    "mendeley": {
      "command": "uvx",
      "args": ["mendeley-mcp"]
    }
  }
}

3. Restart Claude Desktop

The Mendeley tools should now be available in Claude.

Available Tools

Tool Description
mendeley_search_library Search documents in your library
mendeley_get_document Get full details of a specific document
mendeley_list_documents List documents, optionally filtered by folder
mendeley_list_folders List all folders/collections
mendeley_search_catalog Search Mendeley's global paper database
mendeley_get_by_doi Look up a paper by DOI
mendeley_add_document Add a new document to your library

Example Usage

Once configured, you can ask Claude things like:

  • "Search my Mendeley library for papers about transformer architectures"
  • "What papers do I have in my 'Machine Learning' folder?"
  • "Find the paper with DOI 10.1038/nature14539 and summarize it"
  • "Search the Mendeley catalog for recent papers on protein folding"
  • "Add this paper to my library: [title, authors, etc.]"

Configuration

Environment Variables

If you prefer not to use mendeley-auth login, you can configure credentials via environment variables:

# Required
export MENDELEY_CLIENT_ID="your-client-id"
export MENDELEY_CLIENT_SECRET="your-client-secret"

# One of the following (refresh token recommended - access tokens expire quickly)
export MENDELEY_REFRESH_TOKEN="your-refresh-token"
# OR
export MENDELEY_ACCESS_TOKEN="your-access-token"

Or in your MCP config:

{
  "mcpServers": {
    "mendeley": {
      "command": "mendeley-mcp",
      "env": {
        "MENDELEY_CLIENT_ID": "your-client-id",
        "MENDELEY_CLIENT_SECRET": "your-client-secret",
        "MENDELEY_REFRESH_TOKEN": "your-refresh-token"
      }
    }
  }
}

Auth Commands

# Check authentication status
mendeley-auth status

# Show environment variables for manual config
mendeley-auth show-env

# Remove saved credentials
mendeley-auth logout

Development

Setup

git clone https://github.com/pallaprolus/mendeley-mcp.git
cd mendeley-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Testing

# Run tests
pytest

# Run with coverage
pytest --cov=mendeley_mcp

# Type checking
mypy src/mendeley_mcp

# Linting
ruff check src/

Testing with MCP Inspector

# Install MCP inspector
npm install -g @modelcontextprotocol/inspector

# Run your server with inspector
npx @modelcontextprotocol/inspector mendeley-mcp

Architecture

┌─────────────────┐     ┌──────────────────┐     ┌───────────────────┐
│  Claude Desktop │────▶│  mendeley-mcp    │────▶│   Mendeley API    │
│  (MCP Client)   │◀────│  (MCP Server)    │◀────│ api.mendeley.com  │
└─────────────────┘     └──────────────────┘     └───────────────────┘
                               │
                               ▼
                        ┌──────────────────┐
                        │  Local Keyring   │
                        │  (credentials)   │
                        └──────────────────┘

Important: This server runs locally on your machine. Your credentials and data never pass through any third-party servers - all communication is directly between your computer and Mendeley's API.

Credential Storage: Your OAuth tokens and client secret are stored securely in your system's native keyring (macOS Keychain, Windows Credential Locker, or Linux Secret Service). Only the non-sensitive client ID is stored in ~/.config/mendeley-mcp/credentials.json.

Rate Limits

Mendeley API rate limits are per-user. If you hit rate limits:

  • The server implements automatic token refresh
  • Wait a few minutes and retry
  • For heavy usage, consider spreading requests over time

Troubleshooting

"No credentials found"

Run mendeley-auth login to authenticate.

"Token expired"

Your access token has expired. The server will attempt to refresh it automatically using your refresh token. If this fails, run mendeley-auth login again.

"401 Unauthorized"

Your app may have been deauthorized. Re-authenticate with mendeley-auth login.

Server not appearing in Claude

  1. Check the config file path is correct for your OS
  2. Ensure JSON is valid (no trailing commas)
  3. Restart Claude Desktop completely
  4. Check Claude's logs for errors

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests and linting
  5. Submit a pull request

License

MIT License - see LICENSE file.

Disclaimer

This project is not affiliated with, endorsed by, or sponsored by Mendeley or Elsevier. Mendeley is a trademark of Elsevier B.V.

Acknowledgments

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选