Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions content/_types/doc-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schema:
type: string
minLength: 1
section:
enum: [sdk, mcp, editor, reader, writer]
enum: [sdk, mcp, editor, reader, writer, guides]
collection:
display:
name_field: title
Expand All @@ -36,13 +36,14 @@ address, so `apps/reader/index.md` is `/apps/reader/`.
`section` is the documentation set the page belongs to, which picks its
sidebar.

The body is ordinary Markdown with four additions the site understands:
The body is ordinary Markdown with the additions the site understands:

- A heading can keep a fixed anchor: `## Saved views {#views}`.
- A code block can name its file: ` ```ts title="src/mdbase.ts" `. With
`file="examples/worklog/src/mdbase.ts"` it shows that file from the site's
repository instead of its own contents; `pick="scripts"` keeps one key of a
JSON file.
- A standalone screenshot pointing to a registered light capture in `/images/apps/` uses the same themed frame and phone crop as the app pages.
- An image whose address is a recording in `/videos/` is shown as that
recording, with its captions and text description.
- A heading marked `{.cards}` shows the list under it as cards, two to a row.
Expand Down
2 changes: 2 additions & 0 deletions content/apps/editor/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ Open the collection switcher from the rail. It lists collections you opened befo
## The Connect workspace {#connect}

[editor.mdbase.dev/connect](https://editor.mdbase.dev/connect) is where you manage your mdbase Connect account: collections, storage and sync, sharing, connected applications, devices, sign-in methods and browser sessions. It uses your account session, not a collection grant, so it can list your collections but cannot read their contents.

For the folder setup and a worked edit, see [Edit an Obsidian vault in your browser](/guides/obsidian-browser/).
2 changes: 2 additions & 0 deletions content/apps/mcp/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ Your approval travels with the collection, so every copy checks it before it ans
For a **Cloud copy** collection, requests go to the readable copy mdbase keeps, so tools work while your devices are off.

For a **Private** collection, requests travel from the MCP server through the mdbase relay to one of your devices. They are encrypted end to end between the MCP server and that device, and the relay cannot read them. One of your devices must be online. If none is, tools return `connector_offline`. A new approval for a Private collection takes effect once one of your signed-in devices has recorded it. See [Troubleshooting](/apps/mcp/troubleshooting/).

For a read-only setup in ChatGPT, see [Connect ChatGPT to your Markdown notes](/guides/chatgpt-markdown/).
2 changes: 2 additions & 0 deletions content/apps/mcp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ The client should call `list_connections` and then `describe_collection`. `list_
- [Working with records](/apps/mcp/working-with-records/) covers queries, edits and safe retries.
- [Tool reference](/apps/mcp/tools/) lists every tool and its inputs.
- [Data handling](/apps/mcp/data-handling/) describes what the MCP server stores and what it can see.
- [Connect Claude to your Obsidian vault](/guides/claude-obsidian/) walks through read-only access and checks the result against a note on disk.
- [Compare local and hosted MCP servers for an Obsidian vault](/guides/obsidian-mcp-servers/) to choose where requests run.
4 changes: 4 additions & 0 deletions content/apps/reader/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ The experimental exporter includes all of **My Library**, not a selected collect

Reader checks every payload file against its checksum before collection writes. Selecting a folder needs a supporting browser such as Chrome. Export bundles contain private notes and attachment content; keep them private.

See the [Zotero annotations guide](/guides/zotero-annotations/) for a complete example with a PDF highlight.

## From Readwise Reader {#readwise}

Readwise imports bring Reader documents and files, plus highlights from classic Readwise sources such as Kindle, Apple Books and Instapaper. Classic sources import as metadata and highlights, without the book text.
Expand All @@ -46,3 +48,5 @@ Imported files are stored under `files/reader/imports`. When the import finishes
Choose **Stop safely** to pause an active import. Everything already written is kept, and **Resume import** continues the confirmed job. The job stays bound to its destination; switching collections cannot redirect it.

After reloading, reselect the same export folder or reconnect Readwise, choose the same collection and scan again. Check the destination before resuming. Records already imported are kept; review the completion warnings for missing or unavailable content.

For a worked example with a book, a highlight and the resulting file, see [Export Readwise highlights to Markdown](/guides/readwise-markdown/).
2 changes: 2 additions & 0 deletions content/apps/writer/citations.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ Preview and Word export use the same citation metadata and style, with separate
## Missing or unknown sources {#missing}

An unknown citekey appears in Problems and may offer a similar known key. Check its spelling, the selected collection and the source's citation data. Editing a source citekey can leave older manuscript citations unresolved; update those references as well.

[Write a thesis in Markdown with citations](/guides/markdown-thesis/) follows one source from the library into a downloadable manuscript and bibliography.
60 changes: 60 additions & 0 deletions content/guides/chatgpt-markdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: Connect ChatGPT to your Markdown notes
description: Add mdbase as a custom MCP server in ChatGPT, approve one collection and ask for the paths and contents of matching Markdown notes.
section: guides
---

You need a ChatGPT workspace that allows custom MCP servers, an mdbase account and a synced collection. An Obsidian vault can be that collection. Choose a folder whose entire contents you’re comfortable making available to ChatGPT.

## 1. Sync the folder that holds your notes

Use one sync service for a given folder. If you already sync this vault, decide which service will own that job before you turn on mdbase sync. The [mdbase plugin for Obsidian](https://github.com/mdbase-dev/mdbase-obsidian#sync) can sync the vault in place of the desktop app.

In the [mdbase Connect desktop app](/downloads/), open **Collections → Add existing** and select the folder. In the folder’s actions menu, choose **Turn on sync**. If the folder already syncs with mdbase, use that collection. Write down its name. You’ll select it again during approval.

**Cloud copy** makes a readable copy available while your computer is off. For **Private**, select end-to-end encryption under **Advanced**. A computer serving the Private collection must be online when ChatGPT requests a note.

![The desktop app explains the availability of the Field research collection when end-to-end encryption is selected.](/images/apps/vault-sync-light.webp)

## 2. Add the remote MCP server

In ChatGPT, open **Plugins**. Choose the plus button and **Add custom MCP server**. Give the plugin the name `mdbase` and a description such as “Read my field notes.” Under **Connection**, select the public endpoint option and enter:

```text title="MCP server URL"
https://mcp.mdbase.dev/mcp
```

Choose OAuth authentication. Review the warning, select **I understand and want to continue**, then **Create as a plugin**. Check the discovered tools for `list_connections`, `query_records` and `read_record`. Install the resulting plugin. If the custom-server option is missing, check your workspace’s policy with its owner. [OpenAI’s connection instructions](https://developers.openai.com/plugins/deploy/connect-chatgpt#add-the-mcp-server)

## 3. Choose the collection and permissions

When ChatGPT asks you to connect, sign in to mdbase. Check the collection name. The approval screen identifies the service as **mdbase** at `https://mcp.mdbase.dev`. For searches and quotations, keep read access and clear the optional create, edit, delete and definition permissions. Choose **Allow access**.

![The mdbase approval screen shows the required read permission and the optional write permissions cleared.](/images/apps/mcp-permissions-light.webp)

![Review and approve one collection in Connect.](/videos/mcp-read.mp4)

## 4. Find a note by its properties

Save the following file in your synced folder. In an Obsidian vault, `status` is a property of the note. Its value gives ChatGPT a field it can search even when the file name contains no mention of the count.

```markdown title="surveys/east-bank.md"
---
title: East bank survey
status: awaiting-count
---

Return at low tide to count the nesting pairs.
```

In a new ChatGPT conversation, type `@` and select **mdbase**. Replace “Field research” with your collection name:

> In Field research, find notes where the status is awaiting-count. Give me their relative paths. Read surveys/east-bank.md and quote its field instruction.

Check for `surveys/east-bank.md` and the instruction about low tide. You can open the same file on disk and compare the text.

![The local Markdown file, read with the mdbase CLI, contains the same status and field instruction.](/images/apps/survey-note-light.webp)

## Access after the chat

Closing the chat leaves the collection approval in place. [Revoke the application grant in Connect](/apps/mcp/collections/#revoke) to stop further reads. A Private collection protects the synced copy. The MCP gateway and ChatGPT still receive the content you ask them to read. See [MCP data handling](/apps/mcp/data-handling/) or [connect Claude to the same vault](/guides/claude-obsidian/).
69 changes: 69 additions & 0 deletions content/guides/claude-obsidian.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: Connect Claude to your Obsidian vault
description: Sync your vault folder with mdbase Connect, then give Claude read access through MCP. Try it with one note whose answer you can check.
section: guides
---

You need an [Obsidian vault folder](https://obsidian.md/help/vault), the [mdbase Connect desktop app](/downloads/), an mdbase account and access to connectors in Claude. If only a few notes should be visible to Claude, put them in a separate vault. Approval covers the whole collection.

## 1. Connect the vault folder

Use one sync service for a given folder. If you already sync this vault, decide which service will own that job before you turn on mdbase sync. The [mdbase plugin for Obsidian](https://github.com/mdbase-dev/mdbase-obsidian#sync) can sync the vault in place of the desktop app.

Sign in to the desktop app. Under **Collections**, choose **Add existing** and select the folder that contains your notes. Open the actions menu beside that folder and choose **Turn on sync**. If the vault already syncs with mdbase, use its existing collection.

The default, **Cloud copy**, keeps a copy readable by mdbase. Claude can use it while your computer is off. For **Private**, open **Advanced** and select **Encrypt end to end so mdbase cannot read it**. Keep a computer with Connect and that collection online when you use Claude. Confirm with **Turn on sync**.

![The desktop app with the encryption option selected for the Field research folder. The dialog explains when agents can reach it.](/images/apps/vault-sync-light.webp)

## 2. Add mdbase in Claude

In Claude on the web, open **Customize → Connectors**. On a personal account, choose **+ Add → Add custom connector**, enter `mdbase` as the name and paste this server URL.

```text title="Remote MCP server URL"
https://mcp.mdbase.dev/mcp
```

Choose **Continue**. Review the detected authentication settings and continue. Choose **Sign in now** and **Register automatically** for the OAuth client. Choose **Add**. If Claude shows **Connect** beside mdbase, select it to start sign-in. A managed workspace may need an owner to add the connector first. [Claude’s connector instructions](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp)

## 3. Approve read access

In the mdbase sign-in window, choose the collection that matches your vault folder. On the review screen, check the app address and collection name. Keep the required read permission. Clear the optional permissions for creating, editing and deleting records and files, and for managing definitions. Choose **Allow access**.

![Connect lists the required read permission and optional write permissions for the mdbase MCP connector.](/images/apps/mcp-permissions-light.webp)

![Review the collection permissions and approve read access.](/videos/mcp-read.mp4)

## 4. Read a note you can check

Save this file as `surveys/east-bank.md` in your vault. The lines between the two sets of dashes are its properties. The sentence below them is its body.

```markdown title="surveys/east-bank.md"
---
title: East bank survey
status: awaiting-count
---

Return at low tide to count the nesting pairs.
```

Once the folder has synced, open a chat. In **+ → Connectors**, enable mdbase. Ask:

> List my connected collections. In Field research, read surveys/east-bank.md. Give me the status and quote the field instruction.

Substitute your collection name. Claude can use `list_connections` to find it and `read_record` to read the file. Check for **awaiting-count** and the sentence about low tide. A read leaves the file as you wrote it.

![The mdbase CLI reads the saved survey note, including its status and field instruction.](/images/apps/survey-note-light.webp)

## What Claude can see

<svg class="guide-route" viewBox="0 0 540 60" role="img" aria-label="A read request goes from Claude through mdbase MCP to the vault collection.">
<rect x="1" y="8" width="118" height="44" rx="6"/><text x="60" y="36">Claude</text>
<path class="request" d="M119 30h58 M331 30h56"/><path d="m169 25 8 5-8 5m210-10 8 5-8 5"/>
<rect x="179" y="8" width="151" height="44" rx="6"/><text x="254" y="36">mdbase MCP</text>
<rect x="390" y="8" width="149" height="44" rx="6"/><text x="464" y="36">Vault collection</text>
</svg>

Private encrypts the synced collection. When you ask Claude to read a note, the gateway processes the result and sends it to Claude. The read permission also covers other records in that collection. To stop access, revoke the grant in [Connect’s Applications screen](/apps/mcp/collections/#revoke).

See [MCP data handling](/apps/mcp/data-handling/) for what leaves your device, or [connection errors](/apps/mcp/troubleshooting/) if the collection is offline.
61 changes: 61 additions & 0 deletions content/guides/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Markdown guides
description: Follow a task from the first setting to the Markdown file on your computer.
section: guides
---

## Work with your notes {.cards}

- **Connect Claude to your Obsidian vault**

Give Claude read access to a vault and check its answer against a note on disk.

[Connect Claude to a vault](/guides/claude-obsidian/)

- **Export Readwise highlights to Markdown**

Import saved highlights and find the quotation, comment and source link on disk.

[Import Readwise highlights](/guides/readwise-markdown/)

- **Edit an Obsidian vault in your browser**

Edit the body and properties of a note, then check the file in your vault.

[Open a vault in Editor](/guides/obsidian-browser/)

- **Connect ChatGPT to your Markdown notes**

Ask for notes that match a property and check the quoted text against the file.

[Connect ChatGPT](/guides/chatgpt-markdown/)

- **Save Zotero annotations as Markdown notes**

Bring a marked-up passage, your comment and the original attachment into the same collection.

[Import Zotero annotations](/guides/zotero-annotations/)

- **Obsidian MCP servers compared**

Choose where the server reads your notes and see which computer must stay online.

[Compare local and hosted MCP](/guides/obsidian-mcp-servers/)

- **Write a thesis in Markdown with citations**

Insert a source from Reader, check the bibliography and download the manuscript with its references.

[Write and cite a thesis](/guides/markdown-thesis/)

- **Query YAML frontmatter from the command line**

Filter a folder of Markdown notes by status and read a matching file.

[Run a frontmatter query](/guides/query-frontmatter/)

- **Build a personal web app without a backend**

Run a work log, save a browser record and check where its data lives.

[Build a browser work log](/guides/local-first-web-app/)
57 changes: 57 additions & 0 deletions content/guides/local-first-web-app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Build a personal web app without a backend
description: Run a local-first work log with React and the mdbase SDK. Save entries in your browser, check they survive a reload and see how one maps to Markdown.
section: guides
---

You can build a personal work log as a static web app. The mdbase SDK stores entries in the browser before sign-in. If you later want the same records in a folder or on another device, Connect can sync them to a collection.

## 1. Run the working example

You need Git, npm, Node.js 24 or later and a browser. Clone the example and install its locked dependencies.

```sh title="Terminal"
git clone --depth 1 https://github.com/mdbase-dev/mdbase.dev.git
cd mdbase.dev/examples/worklog
npm ci
npm run dev
```

Open `http://localhost:5173` in your browser. Keep the hostname and port as written. The development script puts that exact address in the app’s manifest.

![A terminal reports the installed SDK version and generates the development manifest for localhost on port 5173.](/images/apps/worklog-setup-light.webp)

## 2. Save an entry and reload

Set a date, enter a summary such as “Counted shorebirds at low tide,” and enter `45` for minutes. Choose **Add**. The dated summary appears below the form. The list shows the summary and date. The record also holds the minutes.

![Worklog’s form contains a date, the shorebird count summary and 45 minutes.](/images/apps/worklog-form-light.webp)

Reload the page at the same address. Your entry is still there, with **Saved only in this browser** above it. Clearing site data removes that local copy. A different browser profile starts with its own storage.

![The same entry appears below Worklog’s empty form after reloading, with the browser-only storage notice above.](/images/apps/worklog-reload-light.webp)

![Add an entry in Worklog and find it again after reloading.](/videos/worklog-save.mp4)

## 3. Trace the form to a Markdown record

Open `src/Worklog.tsx`. The form calls `db.create()` with three things: the type `worklog-entry`, a file path and the frontmatter fields. The path includes the date and eight characters from a random UUID, so two entries on one day get different filenames. A live query for that type updates the list.

The generated path in this run was `worklog/2026-11-24-c8633a7f.md`. Here is the same record written to a collection folder. The browser-only app keeps the record in site storage. You won’t find a new file in the project folder when you press **Add**.

```markdown title="worklog/2026-11-24-c8633a7f.md"
---
date: "2026-11-24"
minutes: 45
summary: Counted shorebirds at low tide
type: worklog-entry
---
```

To adapt the form, change its inputs and the frontmatter passed to `db.create()` together. Update `mdbase/types/worklog-entry.md` if you add a field that needs validation. Run `npm run check` to regenerate the manifest and typecheck the app. [The complete example and its source files](/sdk/connect-quickstart/)

## 4. Choose where your entries live

For one browser, you can keep using the app without an account. For collection storage, use **Connect to sync your work**. Sign in, choose a collection and review the proposed type setup and transfer of existing entries. A collection synced to a computer gives you the Markdown files there. [How browser records move into a collection](/sdk/unsynced/#transfer)

To build static files, run `WORKLOG_ORIGIN=https://worklog.example.com npm run build`, substituting your own HTTPS origin. Vite writes the site to `dist/`. Choose an app ID under your own domain before publishing. The published origin has separate browser storage, so opening it won’t bring across entries saved under localhost. [Manifest and origin requirements](/sdk/local-development/)
Loading