Skip to main content

Overview

Cleve runs an MCP (Model Context Protocol) server at:
It uses the Streamable HTTP transport and OAuth sign-in. Once connected, an agent can work with the same docs, folders, comments, sharing, skills and memory you can reach in Cleve, with your permissions.
Docs are called notes in tool names and parameters, for example cleve_create_note and noteId. Notes and docs are the same thing.

Connect to Cleve

Follow Use Cleve in other AI apps for Claude, ChatGPT, Cursor and other agents. The same steps are in Cleve under Settings → Integrations → AI assistants.

Authentication

The server uses OAuth 2.0. On first connection:
  1. Your client opens the Cleve sign-in page.
  2. You sign in with your Cleve account.
  3. Your client stores the access token and sends it as a Bearer token on every request.
The server reads your identity and workspace memberships from the token. MCP doesn’t use the REST API keys, and you don’t need to create one.

Workspaces

Docs, folders and skills live in workspaces, and an account can belong to several. Every doc, folder, comment, sharing and skill tool accepts an optional organization parameter: a workspace’s id or exact name.

How a call picks its workspace

Calls about one doc (any tool that takes a noteId) run in the workspace that doc belongs to, wherever you have access to it. organization isn’t needed and doesn’t change which doc is used. Every other call runs in exactly one workspace, chosen in this order:
  1. The organization parameter, matched exactly by id, or by name ignoring case. An unknown name returns an error that lists your workspaces.
  2. The workspace saved for this MCP client with cleve_switch_org. Selections are stored per client, so Claude and Cursor can target different workspaces on the same account. A selection lasts until you switch again, or until you leave that workspace.
  3. Your only workspace, if you belong to just one.
If you belong to several workspaces and none of these applies, the tool returns an error listing your workspaces instead of guessing. cleve_list_orgs then returns a hint saying no workspace is selected. Agents also receive these rules in the server’s instructions when they connect, so they know to call cleve_list_orgs first.

The workspace field

cleve_read_note returns a workspace field describing where the doc lives:
  • { orgId, name, member: true }: a workspace you belong to. Pass its orgId as organization to search, list or create related docs beside it.
  • { member: false, note }: the doc was shared with you from a workspace you aren’t a member of. You can read and edit the doc as shared, but you can’t search or create docs in that workspace, and its id isn’t returned.

Doc URLs

Every doc opens at https://app.cleve.ai/notes/<noteId>, and folders at https://app.cleve.ai/folders/<folderId>. Search, list, create and read results include a url field. A URL doesn’t grant access: existing sharing permissions still apply.

Docs

Writing doc content

  • A doc is Markdown whose title is its first # H1. In cleve_create_note and cleve_edit_note, title sets that H1. If content already starts with an H1, title replaces it rather than adding a second one.
  • In cleve_edit_note, content replaces the whole doc, and an empty string clears it. title on its own renames the doc and leaves the body unchanged. Fields you leave out stay as they are.
  • For small changes, use cleve_view_note then cleve_replace_in_note or cleve_insert_in_note. They keep the rest of the doc, including tables, HTML blocks and comment threads. oldText must appear exactly once in the Markdown that cleve_view_note shows, without the line-number prefix.
  • A simple replacement inside one run of text is edited in place. Replacements that include Markdown syntax or cross formatting boundaries, and every insert, save the doc back through Markdown, so formatting Markdown can’t express (highlight colours, text alignment, merged table cells) may be simplified.
  • The doc’s name comes from its first # heading, wherever it sits. Keep a short # Title on line 1 when inserting at line 0 or replacing line 1.
  • viewRange is [startLine, endLine], inclusive and 1-indexed. Use -1 for the last line.
  • cleve_update_html_block identifies a block by blockId (the id in its html cleve-block fence, which stays the same when blocks are added above it), by index (0-based, counting only HTML blocks in document order, including nested ones) or by an exact title that matches one block. Pass exactly one of them. html is the complete replacement markup without a code fence.
Doc Markdown supports headings, bullet, numbered and task lists, tables, quotes, code blocks, images, links, callouts, toggles, Mermaid diagrams, interactive HTML blocks and links to other docs. The tool descriptions include the exact syntax for each.

Comments

These tools work on Cleve comment threads. They change comments and their status, not the doc’s content. Each accepts the optional organization parameter. In cleve_list_note_comments results, orphaned: true means the commented text has since been edited away, and truncated: true means the doc has more threads than one call returns.

Add a Comment

cleve_add_comment creates an AI comment anchored to a passage in a doc. It requires:
  • noteId: the ID of a doc you can access.
  • quote: text copied verbatim from the doc. It must match exactly once; a missing or ambiguous passage returns an error. A longer quote can disambiguate repeated text.
  • body: the comment text, in plain prose.
Read the doc with cleve_view_note or cleve_read_note before choosing the quote. The passage is highlighted in the editor, and the thread appears in the comments sidebar. A successful response includes success: true, the created threadId, and quotedText. To review a doc rather than edit it, leave a few comments anchored to the sentences they’re about, and change nothing in the doc.

Reply to a Comment

cleve_reply_to_comment adds a reply to a comment thread and leaves it open. It requires threadId and body. Get the thread ID from cleve_list_note_comments or cleve_view_note. A successful response contains success: true and the threadId. Replying doesn’t edit the doc or resolve the thread.

Resolve a Comment

cleve_resolve_comment marks a thread resolved. It requires threadId and optionally accepts body for a closing reply, such as what you changed. A successful response contains success: true and the threadId. Resolving doesn’t make the edit a comment asks for. To address comments, list them, make the edit for one thread with cleve_replace_in_note, then resolve that thread. Go thread by thread, and don’t resolve a thread you didn’t act on.

Sharing and publishing

Cleve keeps three things separate:
  • Share access: invite specific people by email, or let anyone with the link view or edit. This doesn’t list the doc on your profile or create a marketplace item.
  • Publish to your profile: cleve_publish_note makes the doc a publicly readable post on the owner’s Cleve profile, like a blog post. Only the owner can publish, and the owner needs a profile username. If it’s missing, the tool returns an error with a username setup link, plus a structured code: "profile_username_required" and setupUrl pointing to Settings → General. Set a username there, then publish again.
  • Publish to the marketplace: cleve_publish_note_template creates and publishes a separate copy as a Resource that anyone can find and install. It keeps the doc’s rich formatting. name defaults to the doc’s title. Later edits to the source doc don’t update the copy, and the source doc’s sharing and profile publication stay unchanged. The returned itemId identifies the marketplace copy, not the source doc.

Inspect access first

Start with cleve_get_note_sharing. It returns the owner’s ownerUserId, canManageSharing, isPublishedToProfile, collaborators (with userId, and whether access is direct or inherited from a folder), invitations (with _id and expiry), pending requests (with _id) and sharing activity. Invitations, requests and activity are returned only to people who can manage sharing. Link access includes direct and effective roles (viewer, editor or null), plus publishedViaFolder, so access inherited from a folder isn’t mistaken for a restricted doc. cleve_set_note_link_access matches General access in the share dialog: restricted, viewer (anyone with the link can view) or editor (anyone with the link can edit; editing requires signing in). cleve_share_note still works: isPublic: true sets the doc’s own link to viewer, including downgrading an editable link, and false restricts only its own link. Both tools leave collaborators, workspace access, inherited folder access and profile publication unchanged. Removing a direct collaborator doesn’t remove folder or workspace access; inherited access has to be changed where it’s granted. cleve_get_note_link returns the /notes/<noteId> URL without making anything public. Someone without access has to request it.

Invitations, requests and ownership

  • Sharing by email returns invited: true when the recipient hasn’t joined Cleve yet. That’s a pending invitation, not immediate access. Use the invitation _id to resend or withdraw it.
  • Approving a request grants the permission that was requested unless you pass permission. Approving or denying may email the requester.
  • Ownership transfer is a handover, not an editor permission. The recipient must already have access, and the previous owner keeps editor access.

Unpublishing

Unpublishing removes only the doc’s own profile post. It doesn’t turn off link sharing, remove collaborators, unpublish a folder or remove marketplace copies, so on its own it doesn’t make a doc private. The same is true of setting link access to restricted.

Folders

cleve_delete_folder moves the folder to the Bin with its docs and subfolders, as deleting a folder in the app does. cleve_restore_folder brings the whole folder back. No tool deletes anything for good; that happens 30 days after something is binned, or from the Bin page.

Skills

model is a Cleve model ID to prefer when the skill runs.

Installing Skills

cleve_install_skill supports two sources:
  • Cleve marketplace: pass skillId from cleve_search_marketplace to install that skill.
  • SKILL.md import: pass url containing a GitHub owner/repo, a GitHub repository or skill-folder URL, a skills.sh page, or a direct HTTPS link to a SKILL.md file. Cleve downloads and imports the skill into your account.
For a repository containing several skills, slugs selects which ones to import; omit it to import every valid skill found. slugs only applies to repository imports and is ignored for marketplace IDs and direct SKILL.md links. Provide either skillId or url. If both are supplied, url takes precedence. A call with neither returns an error. The marketplace path returns a success message; the URL import returns details of the imported skills. Installing a skill doesn’t run its instructions. Treat third-party skill content as untrusted and review it before use. Like other skill tools, this tool accepts the optional organization parameter.

Memory

Memory belongs to your account rather than a workspace, so these tools don’t take organization. See Memory.

Web content

This tool requires a signed-in MCP connection but doesn’t take organization or read your docs.

Fetching URLs

cleve_fetch_url reads a public HTTP or HTTPS URL. It extracts the main content of HTML pages as Markdown and returns text-based files as text. Binary files return a description rather than extracted content. It doesn’t save a doc or write anything to Cleve. Parameters:
  • url (required): an absolute HTTP or HTTPS URL.
  • maxLength: maximum characters of content to return, default 5000, capped at 50000.
  • startIndex: character offset, default 0. Use the returned nextStartIndex to read the next page of a long result.
  • raw: default false; set to true to return the response text without HTML-to-Markdown extraction. Binary files still return a description.
The result includes the requested URL, the final URL after redirects when different, the content type, the title when available, the total content length and pagination information. Downloaded content is marked as untrusted data, not instructions. Private, local and internal network addresses are blocked, including redirects to them. The tool doesn’t use your Cleve session to sign in to other websites and has no headers, method or request-body parameters. It’s a web page reader, not a general-purpose HTTP client.

Example prompts

Use Cleve in other AI apps

Step-by-step setup for Claude, ChatGPT, Cursor and more.

REST API

Read and write docs and folders with an API key.

Sharing docs and folders

How access, link sharing and inherited access work.

Publishing

Publish to your profile or the marketplace.