Docs

MCP server

Applies to monthlet 0.13.1 and later

monthlet can act as an MCP server, so an agent outside the app — Claude Code, for example — can read and write the notes in your vault through monthlet itself rather than touching the files behind its back. This page lists what is published and what each tool guarantees. For the steps inside the app, see Help in the app.

What it is

When you turn it on, monthlet listens for MCP connections and offers a fixed set of tools: searching and listing notes, reading a note as Markdown, reading spreadsheet cells and chart values, and — separately opt-in — creating and rewriting notes, and moving and renaming notes and folders.

The app has to be running. Agents connect only while monthlet is open, and the vault they see is the one you have open. Switching vaults switches what is published.

Everything goes through monthlet, which stays the single writer of your files. That is what keeps the note history, the search index, and the open editor in step with what an agent does.

Setting it up

  1. In monthlet, open Settings → Connectors → Publish to external agents and turn on Publish.
  2. Under Setup, press Copy command and run what you copied in a terminal. It registers monthlet with Claude Code.
  3. To let agents write as well, turn on Allow writing in the same place. It is off by default.
  4. To let agents move and rename notes and folders too, turn on Allow moving and renaming below it. It is off by default and works only while writing is allowed.

The command looks like this. Copy the real one from the settings screen — the path depends on where the app is installed.

claude mcp add --scope user monthlet -- \
  /Applications/monthlet.app/Contents/Resources/bin/monthlet-mcp

This is the newer of two ways to connect, and it needs monthlet 0.13.3 or later, which is where the command started being bundled. You can also tell from the settings screen: if Setup offers both Copy command and Direct HTTP (with token), you have it. If there is only one button, use the HTTP method below instead.

Connecting over HTTP instead

Clients that cannot launch a command, or that only speak streamable HTTP, can connect to the endpoint directly. Copy this one from Direct HTTP (with token) on the same screen — it carries your token, and the port differs when the default one is taken.

claude mcp add --scope user --transport http monthlet \
  http://127.0.0.1:27180/mcp --header "Authorization: Bearer <token>"

Tools

Reading

ToolWhat it doesMain argumentsReturns
search_notesFull-text search over notes and spreadsheets: titles, bodies, and tags.query (required), tags, includeArchived, limit (20, up to 199 from monthlet 1.1.0)Matches by relevance in `results`, each with path, title, kind, updated date, tags, and a short snippet. From monthlet 1.1.0, also `truncated` (true when more matches exist beyond `limit`) and the `limit` that was applied. If `truncated` is true, raise `limit` or narrow the query.
grep_notesSearches note bodies for an exact string or a regular expression, the way grep does. It searches the same Markdown that read_note returns. Spreadsheets are not covered. monthlet 1.1.0 and later.pattern (required), regex, ignoreCase, path (a folder, or a glob such as dev/**/*.html), outputMode (lines or files), context (0–5), includeArchived, limit (100, up to 500)Matching lines with path, line number, and text, or match counts per note with `files`. Also `totalMatches` and `totalFiles` counted regardless of `limit`, `truncated`, and `skipped` (notes that could not be read). Check that `skipped` is 0 before concluding there is no match.
list_notesLists notes and spreadsheets, most recently updated first.folder, includeExcerpt, includeArchived, limit (200)Path, folder, title, kind (note or sheet), updated date, tags, pinned, archived, and the first 160 characters when asked for.
read_noteReads a note body as Markdown. Spreadsheets are not covered — use read_sheet_range.path (required), offset (first line, from 1), limit (number of lines)Path, title, tags, updated date, the body as Markdown, and its `version`. From monthlet 1.1.0, the body starts with a frontmatter block between `---` lines: `type` from OKF (Open Knowledge Format; `Note` unless the note sets its own), followed by the note’s own keys (anything besides title, tags, pinned, archived, and the dates monthlet keeps). Also `startLine`, `endLine`, `totalLines`, and `partial` (whether only part of the note was returned). When only part is returned, there is no `version`. `offset` and `limit` are in monthlet 1.1.1 and later.
read_sheet_rangeReads cells from a spreadsheet in the vault.path (required over this connection), range (A1 notation), sheet_idThe cell values. Without a range, an overview of the used area.
read_chart_dataReads the numbers behind a chart in a note.path (required), idLabels and series values per chart. For charts bound to a sheet, the source path and range as well.
list_foldersReturns the folder tree of the vault, empty folders included. Use it to see the structure before choosing where to create or move a note. monthlet 1.1.1 and later.path (start folder), depth (1 = direct children)For each folder: path, name, `documents` (notes and spreadsheets directly in it), `totalDocuments` (everything below it), and its subfolders. Up to 2,000 folders; folders cut off by `depth` or the limit are marked `truncated`.
list_filesLists the files in a folder, whatever notes they belong to: attachments such as images, PDFs, video, and audio by default. To get only the files attached to one note, use `list_attachments`. monthlet 1.1.1 and later.path, recursive (true), include (files, notes, or all)Path, kind (note, image, video, audio, or other), and size of each file.
get_backlinksLists the notes that link to a note. Notes in cloud storage that have not been downloaded yet are not included. monthlet 1.1.1 and later.path (required)The path and title of each linking note.
list_attachmentsLists the files attached to one note: those referenced in the body (`where: body`) and those only in the attachments panel (`where: panel`). To list the files in a folder regardless of notes, use `list_files`. monthlet 1.1.1 and later.path (required)For each attachment: `path` (pass it as is to the tool in `readWith`), the reference as written in the note, `where`, `kind` (image, pdf, text, video, audio, or other), `exists`, `size`, and `readWith` — the tool that reads its content (`view_image`, `read_pdf`, or `read_file`; empty when it cannot be read).
view_imageReturns an image in the vault (PNG, JPEG, GIF, or WebP) so the agent can see it. monthlet 1.1.1 and later.path (required; the path from list_attachments works as is)The image as MCP image content.
read_pdfExtracts the text of a PDF in the vault. Figures and layout are not included, and a scanned PDF with no text layer returns an error. monthlet 1.1.1 and later.path (required)The text of the PDF.
read_fileReads a plain-text file in the vault, such as .md, .txt, .csv, or .json. Use `read_note` for notes and `read_pdf` for PDFs. monthlet 1.1.1 and later.path (required)The content of the file.

Writing

These appear only while Allow writing is on. Paths are relative to the vault, the same ones the reading tools return.

ToolWhat it doesMain argumentsReturns
create_noteCreates a note from Markdown. Missing folders are created along the way. From monthlet 1.1.0, a frontmatter block at the start sets the note’s tags and any other keys; the title comes from the `title` argument. From monthlet 1.1.1, `[[Note name]]` in the body becomes an internal link.title (required), markdown (required), folder, tags (monthlet 1.1.1 and later)The path and title of the new note. A number is appended when the title is already taken. From monthlet 1.1.1, also its tags and `unresolvedWikilinks` — the `[[...]]` names that matched no note and were left as text.
update_noteReplaces the body of a note with Markdown. Pass the `version` that `read_note` returned. From monthlet 1.1.0, a frontmatter block at the start is saved as the note’s frontmatter: leave it out to keep the current one, or send an empty `---` `---` block to remove it. From monthlet 1.1.1, `[[Note name]]` in the body becomes an internal link.path (required), markdown (required), version (required from 1.0.2)The path, the title, the placeholders that survived, any that were dropped, and the new `version`. `ignoredFrontmatterKeys` lists keys monthlet manages itself, such as title and tags, which frontmatter cannot change here. From monthlet 1.1.1, also `unresolvedWikilinks`.
edit_noteReplaces part of a note’s body (monthlet 1.1.0 and later). The text `old_string` in the body that `read_note` returned becomes `new_string`; everything else stays as it was. Pass the `version` that `read_note` returned.path (required), old_string (required), new_string (required; "" to delete), replace_all, version (required)The same as `update_note`, plus `replacements`, the number of places replaced. From monthlet 1.1.1, `[[Note name]]` in `new_string` becomes an internal link, and `unresolvedWikilinks` lists the names that matched no note.
create_folderCreates an empty folder, intermediate levels included.path (required)The folder that was created.
create_sheetCreates a spreadsheet from rows of text. Formulas and formatting are not set at creation.title (required), rows (required), folderThe path and title of the new spreadsheet.
update_tagsAdds or removes tags on a note or spreadsheet without touching the body. Tags that differ only in case or full-width/half-width form count as the same tag, and a leading # is optional. monthlet 1.1.1 and later.path (required), add, remove, versionThe path and the tags it now has. When the `version` you passed still matches, also the new `version`, so you can go on to `update_note` without reading again.
add_attachmentAdds an attachment to a note. Pass the content as base64 to save it next to the note (a number is appended instead of overwriting an existing file), or pass a file already in the vault to refer to it without copying. Paths outside the vault are not accepted; send the content instead. Only images, video, audio, PDF, and text files (txt, md, csv, tsv, json, log), up to 20 MB. monthlet 1.1.1 and later.path (required), data and filename, or file; placement (body or panel; by default images, video, and audio go at the end of the body and other files in the attachments panel), versionThe path of the attachment, the reference written into the note, where it was placed, and whether it was copied. When it went to the attachments panel and the `version` you passed still matches, also the new `version`.

Moving and renaming

These appear only while both Allow writing and Allow moving and renaming are on (monthlet 1.1.0 and later). Internal links in other notes are updated to the new location. A note open in monthlet with unsaved changes is not moved or renamed, and neither is a folder that contains one. Deleting is not offered.

ToolWhat it doesMain argumentsReturns
move_noteMoves a note to another folder. The filename stays the same.path (required), to_folder (required; "" or . for the top of the vault)The new path. A number is appended when the destination already has a file with that name.
move_folderMoves a folder, with everything in it, under another folder. A folder cannot be moved into itself or one of its subfolders.path (required), to_folder (required; "" or . for the top of the vault)The new path.
rename_noteChanges the title of a note. The filename follows the title.path (required), new_title (required)The new title and path.
rename_folderRenames a folder where it is. The paths of the notes inside change with it. To put it under another folder, use move_folder.path (required), new_name (required)The new path.

What the tools guarantee

Not exposed, on purpose

These exist in the app but are not offered over the connection.

Security

Compatibility