mendeley-mcp
Allows AI assistants to search and manage a Mendeley reference library, retrieve full-text PDFs and annotations, generate BibTeX citations, and query Mendeley's global catalog of research publications.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mendeley-mcpFind the PDF for 'Attention Is All You Need' in my library"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mendeley MCP Server for Antigravity & AI Assistants
Connect your Mendeley reference library to Google Antigravity (AGY), Claude Desktop, Cursor, and other Model Context Protocol (MCP) clients. Search your academic library, retrieve full-text PDF papers, access annotations, generate BibTeX citations, and query Mendeley's global catalog of 100M+ research publications using natural language prompts.
π Architecture
flowchart LR
A["Elsevier / Mendeley API<br/>(OAuth 2.0 & REST)"] <--> B["mendeley-mcp Server<br/>(Python Stdio)"]
B <--> C["MCP Protocol<br/>(JSON-RPC 2.0)"]
C <--> D["AI Assistant Client<br/>β’ Google Antigravity (AGY)<br/>β’ Claude Desktop<br/>β’ Cursor"]Related MCP server: Scopus MCP Server
π Key Features
Personal Library Search: Search papers by title, author, abstract, or keywords.
Full-Text PDF Extraction: Retrieve and read raw text from attached research papers directly into agent context.
Annotations & Highlights: Surface notes and highlights previously made on PDFs in Mendeley.
Global Catalog Search: Access Mendeley's 100M+ academic paper database.
DOI Lookup: Fetch metadata and papers instantly from any DOI.
Folder & Collection Management: Browse nested collections, create, rename, and organize references.
BibTeX Generation: Export formatted BibTeX citation entries for individual papers or whole folders.
Secure Token Management: OAuth 2.0 authentication with automatic refresh token persistence via system keyring.
π Prerequisites
Python 3.10+ (Tested on Python 3.12).
Mendeley Account: Register at mendeley.com.
Mendeley Developer Application:
Visit dev.mendeley.com/myapps.html and sign in.
Click Register a new app.
App Name:
Antigravity MCP(or similar).Redirect URL:
http://localhost:8080(orhttp://localhost:8585/callback).Flow: Select Authorization code flow (not Legacy).
Save your Client ID and Client Secret.
π Quick Start
1. Installation
Install via pip or uv:
pip install -r requirements.txt
# or directly
pip install mendeley-mcp2. Authentication (OAuth 2.0)
If your app was registered with the standard URI http://localhost:8585/callback, run:
mendeley-auth loginIf your app was registered with http://localhost:8080 (or a custom port), use the included mendeley_oauth.py script:
python mendeley_oauth.py --client-id <YOUR_CLIENT_ID> --client-secret <YOUR_CLIENT_SECRET> --port 8080You can also copy.env.example to .env and set your credentials:
cp .env.example .env
python mendeley_oauth.pyThis opens your browser to sign in to Elsevier/Mendeley. Once authorized, tokens are stored securely in your system keyring and ~/.config/mendeley-mcp/credentials.json.
Verify status anytime:
python -m mendeley_mcp.auth statusβοΈ MCP Client Configuration
1. Google Antigravity (AGY)
Add the mendeley server to your Antigravity configuration files:
Global Config:
~/.gemini/config/mcp_config.jsonIDE Config:
~/.gemini/antigravity-ide/mcp_config.json
{
"mcpServers": {
"mendeley": {
"command": "mendeley-mcp"
}
}
}On Windows, you can also specify the absolute executable path if needed:
{
"mcpServers": {
"mendeley": {
"command": "C:\\Users\\<YourUser>\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\mendeley-mcp.exe"
}
}
}Enable the server in ~/.gemini/mcp-server-enablement.json:
{
"mendeley": {
"enabled": true
}
}2. Claude Desktop
Add to your claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"mendeley": {
"command": "mendeley-mcp"
}
}
}π Available Tools (18 Tools)
Tool | Scope | Description |
| Library | Search papers in your personal library by title, author, or keyword |
| Library | Get comprehensive metadata, DOI, tags, and abstract for a known document ID |
| Library | Browse documents with optional folder filtering and sorting |
| Folders | View collections and folder hierarchy |
| Folders | Create a new collection or subfolder |
| Folders | Rename an existing folder |
| Folders | Delete a collection folder |
| Organization | Move/add an existing document to a folder |
| Organization | Remove document from folder without deleting it |
| Global | Search Mendeleyβs global database of 100M+ research publications |
| Global | Fetch publication details and citation by DOI |
| Management | Create and add a new reference to your library |
| Management | Update bibliographic fields of an existing reference |
| Management | Permanently delete a document from your library |
| Extract reader annotations, highlights, and notes | |
| Citation | Generate formatted BibTeX citation entries |
| Files | Download attached document files/PDFs |
| Text | Extract raw text from attached PDFs for agent reading |
π Verification & Testing
Verify that Mendeley MCP can initialize and communicate over stdio:
python -c "
import subprocess, json
proc = subprocess.Popen(['mendeley-mcp'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True)
proc.stdin.write(json.dumps({'jsonrpc': '2.0', 'id': 1, 'method': 'initialize', 'params': {'protocolVersion': '2024-11-05', 'capabilities': {}, 'clientInfo': {'name': 'test', 'version': '1.0'}}}) + '\n')
proc.stdin.flush()
print('Handshake Response:', proc.stdout.readline())
proc.terminate()
"π Security Best Practices
Never commit credentials to version control!
Ensure
.env,credentials.json, and any files containing your Client ID or Secret are included in.gitignore.Mendeley API keys should always remain local to your machine.
π License
This project is licensed under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
Academic literature search, retrieval, and private library management on top of OpenAlex.
Federated search of books and papers, BibTeX/RIS citations, open-access retrieval and reading.
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
Search 340M+ academic papers β citation graphs, semantic similarity, and AI literature reviews.
Related MCP Servers
- AlicenseBqualityFmaintenanceAllows AI to interact with your Zotero library.572 npm164MIT
- AlicenseAqualityDmaintenanceProvides access to the Elsevier Scopus API, enabling AI assistants to search for academic papers, retrieve detailed abstracts, and look up author profiles. It facilitates bibliometric research and scholarly data analysis through natural language commands.580 PyPI41MIT
- FlicenseBqualityDmaintenanceEnables AI assistants to search, cite, and manage research references directly from a Zotero library.97-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to search and retrieve metadata, abstracts, and notes from a user's Zotero library through tools like search, get item, and list collections.-