elipexx318 downloadsSync your Mendeley library into reading notes with citekeys, folders and on-demand PDFs. Citations and annotations coming soon.
A desktop-only Obsidian plugin that syncs your Mendeley library into reading notes in your vault, using the official Mendeley API (OAuth2 + REST).
(Una versión de este README en español está en README.es.md.)
Current status: Phase 1 (MVP) plus on-demand PDFs.
citekey, title, authors, year, journal, DOI, URL, abstract, tags, Mendeley folders, mendeley_id, and last-modified date.citation_key if present; otherwise authorYear+firstTitleWord, with automatic disambiguation). A reference keeps its citekey once it has a note.modified_since) and pagination.mendeley_id in their frontmatter, never by file name or location, and sync never renames or moves an existing note.{{citekey}}, {{title}}, {{year}}, {{author}}). New notes are created in subfolders mirroring Mendeley's folder hierarchy (including nested ones). If a document belongs to several Mendeley folders, the note goes under the alphabetically first one (the full list is kept in mendeley_folders); if it's in none, it goes at the root.<!-- mendeley:start -->...<!-- mendeley:end -->); anything you write outside that block (e.g. under ## My notes) is never touched or deleted.Attachments/Mendeley) and embedded in the note. Nothing is downloaded during sync, so your vault doesn't fill up with PDFs you don't need.citekey.md and citekeya.md), it moves the extra copies to the trash after asking for confirmation. Copies that contain text you wrote are never touched.[@citekey], Pandoc format), importing the highlights you made in Mendeley.Known limitation: if you delete a document in Mendeley, the corresponding local note is not deleted automatically (by design: the plugin never deletes your content). You'll need to clean it up by hand if you want to.
isDesktopOnly: true.dev.mendeley.com/myapps.html) and register a new application.obsidian://mendeley-auth-callback). It must match character for character.⚠️ If the registration form rejects
obsidian://mendeley-auth-callback(some OAuth providers only accepthttp(s)as a redirect URI for desktop apps): in practice we already confirmed Mendeley accepts this custom scheme end-to-end (authorization → token exchange → success), so this shouldn't come up. If it ever does for a different setup, the plugin's auth module is designed so the redirect URI can be swapped for a local loopback server (http://127.0.0.1:<port>/callback, the IETF-recommended mechanism for native apps) without reworking the rest of the plugin.
This plugin is listed in Obsidian's official Community Plugins directory: in Obsidian, go to Settings → Community plugins → turn off "Restricted mode" if it's on → Browse → search for "Mendeley Integration" → install it → enable it.
Every user still needs to complete step 2 above (create your own Mendeley application) and step 4 below (configure and connect) — that part is the same for everyone, since each person needs their own Mendeley Client ID/Secret (see the security note in section 6 for why this can't be shared or bundled into the plugin).
Mendeley) and, if you like, the note template.obsidian://mendeley-auth-callback?..., Obsidian activates itself, and the plugin captures the authorization code automatically.---
citekey: garcia2022microbiota
title: "Gut microbiota and cognitive decline"
authors:
- "García, Ana"
- "Smith, Jordan"
year: 2022
journal: "Journal of Neuroscience"
doi: "10.1000/xyz"
url: "https://example.com/paper"
abstract: "..."
tags: ["microbiota", "alzheimer"]
mendeley_folders: ["Thesis", "Alzheimer"]
mendeley_id: "abc-123"
mendeley_modified: "2024-01-01T00:00:00.000Z"
---
<!-- mendeley:start -->
## Gut microbiota and cognitive decline
**Authors:** García, Ana, Smith, Jordan
...
<!-- mendeley:end -->
## My notes
(write whatever you want here — it's never overwritten)
On every later sync, only the content inside <!-- mendeley:start -->...<!-- mendeley:end --> and the frontmatter keys the plugin manages (citekey, title, authors, year, journal, doi, url, abstract, tags, mendeley_folders, mendeley_id, mendeley_modified) get updated. Any other frontmatter key you add by hand is preserved.
The Client Secret and the access/refresh tokens are stored in data.json, inside the plugin's folder in your vault (.obsidian/plugins/mendeley-integration/data.json). They are not encrypted. Obsidian doesn't give community plugins access to the OS keychain, so this limitation is shared with most integration plugins (Google Calendar, GitHub Sync, etc.).
If you share or sync your vault (e.g. with Git or another service), make sure to exclude .obsidian/plugins/mendeley-integration/data.json or avoid sharing that folder.
The "Disconnect" button in the settings deletes the locally stored tokens (it doesn't revoke access on Mendeley's side; for that, check the authorized apps in your Mendeley account).
Besides api.mendeley.com, the plugin contacts Mendeley's file storage (a short-lived signed URL) only when you download a PDF. Your Mendeley token is never sent to that storage.
npm install
npm run dev # watch-mode build (esbuild)
npm run build # type-check with tsc + minified production build
npm test # run the unit tests (vitest)
Code layout in src/: auth/ (OAuth2), api/ (HTTP client + endpoints), sync/ (sync orchestration + delimited blocks), citekey/ (citekey generation), templates/ (frontmatter mapping + template rendering), settings/, and commands/.
The tests cover citekey generation, mapping Mendeley documents to frontmatter, and the delimited-block logic — the logic most prone to silent mistakes, since it runs on every sync against your real notes.