Skip to main content

second-brain-joplin

CI PyPI

An MCP server that turns your Joplin knowledge base into searchable memory for any MCP-capable AI client — Claude Code, Cursor, and others.

Inspired by second-brain-mcp (for Obsidian). This project covers the same use case for Joplin: your AI assistant reads, searches, and files notes directly, without leaving the tool you already use.

Status: stable. From 1.0 the tools (names, arguments, results), the settings and the command line follow semantic versioning: nothing you rely on changes without a new major version. Tested on Linux, macOS and Windows.


How it works

Joplin Desktop exposes a local REST API on localhost:41184 (the Web Clipper service). This server wraps that API as MCP tools, so your AI client can read your notes in real time, and add new ones where you allow it — no export step, no sync lag.

Claude Code / Cursor
       │  MCP
       ▼
second-brain-joplin (this server)
       │  HTTP + token
       ▼
Joplin Desktop (localhost:41184)
       │
       ▼
Your notes

Prerequisites

  • Joplin Desktop running with the Web Clipper service enabled:
    Tools → Options → Web Clipper → Enable Web Clipper Service
  • API token — copy it from the Web Clipper settings panel
  • uvx (recommended — no install needed), or Python ≥ 3.11

Quickstart

Claude Code

claude mcp add -s user second-brain-joplin \
  -e JOPLIN_API_TOKEN=your-token-here \
  -- uvx second-brain-joplin serve

Other MCP clients

Setting Value
Command uvx second-brain-joplin serve
JOPLIN_API_TOKEN token from Joplin Web Clipper settings
JOPLIN_BASE_URL http://localhost:41184 (default)

See docs/install.md for step-by-step setup, including Claude Desktop and Cursor, and docs/troubleshooting.md if something doesn't work.

Remote: a Claude custom connector

serve --transport http runs the server over streamable HTTP so Claude's custom connectors (claude.ai, the Claude apps, Cowork) can reach it through a tunnel. See docs/remote-access.md.


MCP Tools

Tool Description Writes?
joplin_overview List all notebooks with note counts No
joplin_search Keyword search with Joplin's search words; each hit says its notebook and where the match is (limit 1–100) No
joplin_read Read a note by ID or link, a page at a time (offset, max_chars up to 100,000), or its outline, or one section (outline, section); with its notebook, tags, to-do state, attachments and a checksum No
joplin_read_notes Read up to 20 notes in one call, sharing 40,000 characters No
joplin_list_notes List the notes in one notebook, a page at a time (limit 1–100, newest first or by title) No
joplin_changes List the changes the server made to notes, with no text No. Only with SBJ_EDIT_NOTEBOOKS
joplin_recent Notes modified in the last N days (days 1–3650, limit 1–100) No
joplin_semantic_search Find notes by meaning (embeddings; limit 1–50) No
joplin_reindex Build/refresh the semantic index The local index only, never Joplin
joplin_create_note Add a new markdown note to a notebook you allow (title, body, notebook by title or id) A new note, nothing else. Off by default
joplin_create_notes Add up to 20 new notes in one call New notes, nothing else. Off by default (SBJ_CREATE_NOTES_MAX)
joplin_edit_note Change part of a note (exact text replaced), or add to a section, its start or its end Changes a note, after keeping a copy of it. Off by default (SBJ_EDIT_NOTEBOOKS)
joplin_replace_note Replace the whole text of a short note that is rebuilt each time Rewrites a note, after keeping a copy of it. Off by default (SBJ_EDIT_NOTEBOOKS and SBJ_REPLACE)

docs/tools.md describes each tool's arguments, results and errors. Every tool carries MCP annotations (read-only; for joplin_reindex local and non-destructive; for joplin_create_note and joplin_create_notes a write that only adds; for joplin_edit_note and joplin_replace_note a destructive write, since a change can remove text), so clients can tell what each one does.

joplin_create_note exists only once you set SBJ_WRITE_NOTEBOOKS to the notebooks that may receive notes (ids or titles, or * for every visible one). Your client's approval prompt is the check on each note, and the call carries the note in readable form so the prompt shows what will be written. Clients differ in when they ask: see Who confirms each note and Creating notes.

To limit which notebooks these tools can see, set SBJ_NOTEBOOKS (only these) or SBJ_EXCLUDE_NOTEBOOKS (not these) to notebook ids or titles; second-brain-joplin notebooks lists the ids and shows what a filter hides. See Choosing which notebooks are exposed.

Semantic search (joplin_semantic_search / joplin_reindex) needs the optional [semantic] extra (see Semantic search).


Semantic search finds notes by meaning, complementing the keyword joplin_search. It embeds your notes locally and stores the vectors in a persistent on-disk index; queries return the closest notes with a similarity score.

It ships behind an optional extra so the base install stays light:

# Claude Code (note the quotes around the package+extra)
claude mcp add -s user second-brain-joplin \
  -e JOPLIN_API_TOKEN=your-token-here \
  -- uvx --python 3.13 --from "second-brain-joplin[semantic]" second-brain-joplin serve

Keep --python 3.13: the embedding runtime has no build for Python 3.15 yet, so without it the install fails on a computer whose own Python is 3.15 (Which Python).

The default stack is FastEmbed (ONNX, no PyTorch) with sqlite-vec. You can swap either backend via env vars (e.g. bge-m3 via sentence-transformers, or a ChromaDB store) — see docs/semantic-search.md.

Build the index once with second-brain-joplin reindex (or the joplin_reindex tool); this downloads the embedding model the first time. After that, joplin_semantic_search keeps the index fresh incrementally — only notes changed since the last sync are re-embedded.


vs. Joplin's built-in MCP server

Since 3.7, Joplin Desktop has an MCP server of its own (Settings → AI → "Enable MCP server", a beta feature, off by default). If your AI client runs on the same computer as Joplin and may see every notebook, it is the simplest choice: nothing to install, and it can already edit notes, move them to the trash and manage tags. second-brain-joplin is for the cases it doesn't cover:

Joplin's built-in server second-brain-joplin
Where the client can be The same computer only The same computer, or anywhere: a Claude custom connector for the web and phone apps
Sign-in Joplin's Web Clipper token, in the address of each request The token locally; remotely, GitHub sign-in limited to the accounts you list
Which notebooks All of them The ones you choose; hidden notebooks are left out of every tool
Where it can write Anywhere, one switch per tool Only the notebooks you list
What it can change Create, edit, trash, tags, notebooks New notes, and edits to notes in the notebooks you list, each checked against the version read, with a copy kept first and a daily limit
A record of calls Joplin's Web Clipper log has one line per request: its address, token included, not which tool ran. No rate limit In HTTP mode, one log line per call (tool, caller, outcome, time), never the token, and a rate limit per caller. On any transport, a kept copy of every changed note, listed by joplin_changes and put back with second-brain-joplin restore
Search by meaning Joplin's AI features must be on A local index of its own
Clients Ones that speak MCP over HTTP stdio and HTTP

Compared with Joplin 3.7.24 (November 2026). Joplin's server is in beta and changing quickly, so check its own documentation. The two can run side by side.

The aim is that everything the built-in server can do, this one can do too, under the same filter, sign-in and log. Editing, richer search and reading by section came in 1.2; the trash, moving notes, tags, to-dos and new notebooks come in 1.5 (see the Roadmap).


vs. second-brain-mcp (Obsidian)

second-brain-mcp second-brain-joplin
Note app Obsidian Joplin
Storage Plain .md files on disk Joplin REST API
Requires app running No Yes (Joplin + Web Clipper)
Semantic search Yes (bge-m3) Yes (FastEmbed / bge-m3)
Write support Human-gated New notes and edits, where you allow, with a copy kept before each change
Install uvx second-brain-mcp uvx second-brain-joplin

Notebook structure

The PARA method works well with Joplin. See docs/notebook-structure.md for a recommended setup, and templates/ for project, area, resource and weekly-review notes to import.


Documentation

Guide What it covers
Installation Joplin's local API, each client's setup, which Python, updating
Tool reference Every tool: arguments, results, errors
Configuration Every setting and where it is read from; the command line
Troubleshooting What each error means and what to do
Semantic search Searching by meaning: install, index, backends
Remote access A Claude custom connector: HTTP mode, sign-in, notebook filter, creating notes
Notebook structure and templates A PARA layout and starter notes
Changelog · Security · Contributing

Roadmap

Milestone Theme Status
v0.1 — Bootstrap Repo, CI, package skeleton Done
v0.2 — Core Read Tools All read MCP tools working Done
v0.3 — Semantic Search Embedding index, semantic search Done
v0.4 — Remote Access Streamable HTTP, GitHub sign-in, Claude custom connector Done
v0.5 — Write Workflow Notebook filter; note creation you allow and approve Done
v1.0 — Publish PyPI, full docs, templates Done
v1.2 — Edit Change notes safely; search results that say where the match is; reading by section Done
v1.3 — Core Sign-in, logging, serving and the search engine shared with the other Second Brain servers; the client named in the log Done
v1.4 A setting for the longest note the write tools accept (SBJ_MAX_NOTE_CHARS) Done
v1.5 — Organise Move, trash, tags, to-dos, notebooks and attachments Planned

Security & privacy

By default (stdio) this server keeps your notes local: it talks only to Joplin's Web Clipper REST API on localhost and runs on your own machine. HTTP mode, for a Claude custom connector, deliberately sends what Claude reads to Anthropic, behind GitHub sign-in limited to your account (remote access). Anything an MCP client can read, the connected AI can read — so apply least privilege and don't expose notebooks with credentials or other sensitive data; a notebook filter (SBJ_NOTEBOOKS / SBJ_EXCLUDE_NOTEBOOKS) keeps chosen notebooks out of every tool. The server is read-only until you list the notebooks that may receive notes (SBJ_WRITE_NOTEBOOKS) or whose notes may change (SBJ_EDIT_NOTEBOOKS). A change is checked against the version of the note that was read, the note is copied to the server's disk first, and a daily limit bounds the changes (Changing notes); your client's approval prompt, where the client asks, is the check on each call.

Two caveats apply once you enable semantic search: it writes a local index (under your XDG data dir by default) that stores note text excerpts and titles alongside the embeddings, and it downloads the embedding model once over the network on the first reindex. Your note content is embedded locally and never leaves your machine. See SECURITY.md for details and how to report a vulnerability.


Contributing

See CONTRIBUTING.md. Issues and PRs welcome — especially for testing against different Joplin versions and OS platforms.


License

Copyright (C) 2026 John McKenzie

second-brain-joplin is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE for the full text.

In short: run it and change it as you like. If you pass copies on, or change it and let other people use your version over a network, you must offer them the source under the same license.

  • Releases up to 1.1.0 were published under the MIT License and stay under it.
  • The note templates in templates/ are not under the AGPL. They are dedicated to the public domain (CC0 1.0), so the notes you make from them carry no conditions.

Metadata

Release files for second-brain-joplin 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for second-brain-joplin 1.4.0
File Size Uploaded Provenance Actions
second_brain_joplin-1.4.0.tar.gz 590.4 kB With provenance Details for second_brain_joplin-1.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for second-brain-joplin 1.4.0
File Interpreter ABI Platform Actions
second_brain_joplin-1.4.0-py3-none-any.whl Python 3 none any Details for second_brain_joplin-1.4.0-py3-none-any.whl

Total release size: 678.4 kB

Release files / second_brain_joplin-1.4.0.tar.gz

Download URL second_brain_joplin-1.4.0.tar.gz
Size 590.4 kB
Tags Source
SHA-256 checksum
How to use checksums
86befbe01ae449c6736315f5fe5ba6553ea98663fc382e50573d7a4ddf5f2bb9
BLAKE2b-256 checksum
How to use checksums
ff4e432bf4b03ad6a82b1df19b37869d1f006dbc80e87576bc11da8e4fde664c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / second_brain_joplin-1.4.0-py3-none-any.whl

Download URL second_brain_joplin-1.4.0-py3-none-any.whl
Size 88.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c2d1f4555a5e2158749772ad3352ce578d7a72751ca4c2fb09f65b0a3f1d774
BLAKE2b-256 checksum
How to use checksums
a9627dd6fda21125834a7f85d0bafeac7ecb19a2af98fb7ce2b0aef000cf7a9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for second-brain-joplin 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for second_brain_joplin-1.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page