New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

milanote-api-mcp

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

milanote-api-mcp

Self-hosted Milanote API and MCP server on your own Chrome session. Noncommercial use (PolyForm Noncommercial 1.0.0).

Source
pipPyPI
Version
1.0.4
Weekly downloads
614
Maintainers
1
Created

Milanote API and MCP server, self-hosted

A Milanote API and a Milanote MCP server you run on your own computer, in Python, on the session of your own Google Chrome. 30 of the 31 Milanote tools we run in production at Cotlet: boards, notes, links, to-do lists with due dates, columns, labels, trash, comments, sharing and export.

Milanote has no public API and no official MCP server. This repo gives you both:

  • MCP server for Claude Code, Claude Desktop, Cursor, Codex and any MCP client, over stdio or HTTP. Setup
  • REST API on http://127.0.0.1:8787/api/v1/milanote, with OpenAPI docs at /docs. Setup
  • Python: call("get_board", board_id="1XiqwC1Mir4d4N"), plus 9 ready scripts in examples/.

It is for technical people who want to run it themselves, for noncommercial use only (license). If you want it running 24/7 on a server, kept working when Milanote changes its app, for a team or a business, use the hosted version at cotlet.dev.

Milanote MCP server Python 3.11+ License: PolyForm Noncommercial 1.0.0 MCP Badge

uv tool install milanote-api-mcp                  # or: pip install milanote-api-mcp
milanote-mcp connect                               # reads your Milanote session from Chrome
milanote-mcp call list_boards
claude mcp add milanote -- uvx milanote-api-mcp mcp

Contents

How it works

AI agent (MCP) / script (REST, Python) ──▶ milanote-mcp on your computer ──your Milanote cookies──▶ milanote.com
                                                     ▲
                         milanote-mcp connect ───────┘ reads them once from your Chrome (DevTools Protocol)
  • You sign in to Milanote in your own Chrome, the way you always do.
  • milanote-mcp connect attaches to that Chrome through the Chrome DevTools Protocol, reads the milanote.com cookies and your browser's time zone, and saves them to ~/.config/milanote-api-mcp/session.json, readable by your user only. It never sees or stores your password.
  • Reads are requests to the JSON endpoints of the Milanote web app on app.milanote.com/api. Changes go over the same socket.io channel the web app uses, sent as plain HTTP polling. Everything goes out with your cookies through curl_cffi, which copies Chrome's TLS fingerprint. No headless browser runs.

Milanote's session cookie lasts about a month. When Milanote signs you out, the server reads the cookies from Chrome again, if Chrome is open with remote debugging on.

Requirements

  • Python 3.11 or newer.
  • Google Chrome 144 or newer, signed in to Milanote. Any Chrome or Chromium works with a debugging port.
  • macOS, Linux or Windows.
  • Any Milanote plan. A free account stops at 100 cards, and the tools say so when Milanote refuses. Changing a board someone shared with you needs edit access to it.

Install

From PyPI:

uv tool install milanote-api-mcp       # or: pipx install milanote-api-mcp, or: pip install milanote-api-mcp
milanote-mcp --version

MCP clients can also run it with no install: uvx milanote-api-mcp mcp.

From source:

git clone https://github.com/cotletdev/milanote-api-mcp-server.git
cd milanote-api-mcp-server
python3 -m venv .venv
. .venv/bin/activate              # Windows: .venv\Scripts\activate
pip install -e .
milanote-mcp --version

With uv: uv venv && uv pip install -e ., then uv run milanote-mcp ....

Setting it up with an AI agent (Claude Code, Codex, Cursor)? Open it in this folder and ask it to set up the repo: AGENTS.md tells it every step, and it asks you only for the steps in Chrome.

To update: uv tool upgrade milanote-api-mcp (or pip install -U milanote-api-mcp), from source git pull && pip install -e .. We copy every change of the hosted Milanote tools into this repo.

Connect your Chrome

  • Open chrome://inspect/#remote-debugging in Chrome and switch remote debugging on. Chrome then accepts DevTools connections from programs on this computer, and asks you before each one.

  • Make sure you are signed in at app.milanote.com.

  • Run:

    milanote-mcp connect
    
  • Chrome asks whether to allow the connection. Click Allow.

Saved 8 Milanote cookies to /Users/you/.config/milanote-api-mcp/session.json
Signed in to Milanote as Ana Lopez

You can switch remote debugging off again afterwards. Leave it on if you want the server to pick up a new session by itself after Milanote signs you out.

connect looks for Chrome's DevToolsActivePort file in the default profile folder. For Chrome Beta, Canary or a custom profile folder, pass --profile-dir "<folder>".

Option B: a Chrome with a debugging port

Chrome does not open a debugging port on your default profile, so start a separate one, sign in to Milanote there once, and connect to it:

# macOS
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --remote-debugging-port=9222 --user-data-dir="$HOME/.chrome-milanote"
# Linux
google-chrome --remote-debugging-port=9222 --user-data-dir="$HOME/.chrome-milanote"
# Windows
"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="%USERPROFILE%\.chrome-milanote"

milanote-mcp connect --cdp http://127.0.0.1:9222

--cdp also takes a ws:// DevTools URL, for example of a Chrome on another machine reached over an SSH tunnel.

For a server with no Chrome: in Chrome open DevTools on app.milanote.com, Application > Cookies > https://app.milanote.com, copy the value of __Secure-milanote.session_token, then:

milanote-mcp connect --token       # paste it, input is hidden
# or, without a session file:
export MILANOTE_AUTH_TOKEN=...

A pasted token is not refreshed on its own. Paste a new one when Milanote signs you out. Times then come in this machine's time zone.

Check the session at any time:

milanote-mcp status

MCP server

The MCP server lists every tool with its input schema, a description written for agents, and hints: read tools are marked read-only, and tools that comment, invite, publish or trash are marked so your client asks before running them.

Claude Code

claude mcp add milanote -- uvx milanote-api-mcp mcp
# read only:
claude mcp add milanote -- uvx milanote-api-mcp mcp --read-only

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "milanote": {
      "command": "uvx",
      "args": ["milanote-api-mcp", "mcp"]
    }
  }
}

Cursor

~/.cursor/mcp.json, the same block as Claude Desktop. A ready copy is in mcp.json.

Codex

~/.codex/config.toml:

[mcp_servers.milanote]
command = "uvx"
args = ["milanote-api-mcp", "mcp"]

Over HTTP

milanote-mcp serve also serves MCP over streamable HTTP at http://127.0.0.1:8787/mcp, for clients that take a URL:

milanote-mcp serve
claude mcp add --transport http milanote http://127.0.0.1:8787/mcp

Then ask your agent things like:

Put these 12 reference links on the Moodboard sub-board of Brand refresh and skip the ones already there.

Export my Novel outline board and each chapter sub-board as Markdown into ./outline.

Here are my call notes. Add the action items as a to-do list on Q1 campaign with the dates we agreed.

Where did I save that note about the color palette?

REST API

milanote-mcp serve                 # http://127.0.0.1:8787, MCP at /mcp, docs at /docs

Each tool has its own route under /api/v1/milanote, the same paths as the hosted API at cotlet.dev, so code written against one works with the other. Path parts and the query string are arguments, and a JSON body adds the rest.

curl 'http://127.0.0.1:8787/api/v1/milanote/boards'
curl 'http://127.0.0.1:8787/api/v1/milanote/boards/1XiqwC1Mir4d4N'
curl -X POST http://127.0.0.1:8787/api/v1/milanote/boards/1XiqwC1Mir4d4N/notes \
  -H 'Content-Type: application/json' \
  -d '{"text": "Kickoff moved to Tuesday."}'

Any tool by name, body as its arguments:

curl -X POST http://127.0.0.1:8787/api/v1/milanote/tools/export_board -d '{"board_id": "1XiqwC1Mir4d4N", "format": "markdown"}'
  • GET /api/v1/milanote/tools: every tool with its route, input schema and an example answer.
  • GET /docs: interactive OpenAPI docs, GET /openapi.json the schema, for n8n, Postman or a generated client.
  • Answers are JSON. Lists that stop early return has_more: true; raise limit to get the rest.

The server listens on 127.0.0.1 only. To reach it from another device of yours, set a token, and every request then needs Authorization: Bearer <token>:

MILANOTE_MCP_TOKEN=$(openssl rand -hex 24) milanote-mcp serve --host 0.0.0.0

Python and the example scripts

Straight from Python, no server needed:

from milanote_api_mcp import call

boards = call("list_boards")["boards"]
board = call("get_board", board_id=boards[0]["id"])
call(
    "add_todo_list",
    board_id=board["board_id"],
    title="This week",
    tasks=[{"text": "Send the brief", "due_date": "2026-10-28"}, {"text": "Book the photographer"}],
)

Or one tool from the shell: milanote-mcp call get_board board_id=1XiqwC1Mir4d4N, or with a JSON object.

Ready scripts in examples/. Each takes --help, and the ones that list things print JSON or save --out file.csv / --out file.json:

ScriptWhat it does
list_boards.pyYour boards as a tree, from Home or any board, --depth levels down.
search_boards.pySearches all your boards and prints each matching card with its board and path.
export_boards.pyA board and its sub-boards to Markdown, text, Word, PDF or PNG, one file per board, folders following the nesting.
board_card_counts.pyCards on each board by type, biggest first, and your use of the free plan's limit.
open_tasks.pyUnticked tasks from every to-do list on a board and its sub-boards, soonest due first. --due-before.
save_links.pySaves a list of URLs as link cards, skipping the ones already on the board. --dry-run first.
add_todo_list.pyA to-do list from a text file, one task per line, with optional YYYY-MM-DD HH:MM due dates.
add_note.pyA note card from --text, a file or standard input.
publish_board.pyTurns a board's read-only link on and prints it, or --off.
python examples/export_boards.py --board 1XiqwC1Mir4d4N --dir ./outline
python examples/save_links.py --board 1XiqwC1Mir4d4N --file links.txt --dry-run

On a schedule, cron on your own computer works while it is on: 0 18 * * 5 cd ~/milanote-api-mcp-server && .venv/bin/python examples/export_boards.py --board 1XiqwC1Mir4d4N --dir ~/backups/milanote.

All 30 tools

board_id is the ID from list_boards, or the board's URL (https://app.milanote.com/1XiqwC1Mir4d4N/...). Cards the tools add land in the board's Unsorted panel, the same place Milanote puts uploads, so they never cover cards on the canvas. milanote-mcp tools prints this list, milanote-mcp tools --json adds the input schemas.

Boards

ToolAccessREST routeWhat it does
list_boardsreadGET /boardsBoards inside one board, by default the boards on your Home, with title, ID and link.
list_recent_boardsreadGET /boards/recentBoards you opened lately, newest first, wherever they sit in your board tree.
search_boardsreadGET /boards/searchFind boards and cards by text across your boards, like the Search icon in Milanote.
get_boardreadGET /boards/{board_id}Every card on a board: notes, links, images, files, to-do lists, columns and sub-boards.
create_boardwritePOST /boardsNew board on your Home or nested inside another board.
rename_boardwritePATCH /boards/{board_id}Change a board's title.
duplicate_boardwritePOST /boards/{board_id}/duplicateCopy a board with everything on it, sub-boards included, as a template.
export_boardreadGET /boards/{board_id}/exportExport a board as Markdown, plain text, Word, PDF or PNG, as the Export menu does.

Cards

ToolAccessREST routeWhat it does
add_notewritePOST /boards/{board_id}/notesNote card with plain text, added to a board's Unsorted panel.
edit_notewritePATCH /boards/{board_id}/notes/{card_id}Replace the text of a note card.
add_linkwritePOST /boards/{board_id}/linksLink card for a web address, with the page's title and preview, added to Unsorted.
add_todo_listwritePOST /boards/{board_id}/todo-listsTo-do list card with tasks, each with an optional due date and time, added to Unsorted.
set_task_donewritePUT /boards/{board_id}/cards/{card_id}/tasks/{task}/doneTick or untick one task in a to-do list.
add_columnwritePOST /boards/{board_id}/columnsEmpty column on a board, to group cards in a stack.

Arrange cards

ToolAccessREST routeWhat it does
move_cardwritePOST /boards/{board_id}/cards/{card_id}/moveMove a card or a sub-board to another board, or into or out of a column.
set_card_colorwritePUT /boards/{board_id}/cards/{card_id}/colorColour the bar on top of a note, to-do list, link, file or column, or clear it.
add_labelwritePOST /boards/{board_id}/cards/{card_id}/labelsPut a label on a card, creating the label when the name is new.
list_labelsreadGET /labelsThe labels you can put on cards, with name and colour.

Trash

ToolAccessREST routeWhat it does
trash_cardswritePOST /boards/{board_id}/cards/trashMove cards or sub-boards to the trash, as the Delete key does.
list_trashreadGET /trashCards and boards you moved to the trash, with the board each one came from.
restore_cardwritePOST /trash/{card_id}/restoreTake a card or board out of the trash and put it back where it was.

Comments

ToolAccessREST routeWhat it does
add_commentwritePOST /boards/{board_id}/commentsComment card on a board, or a reply in a comment thread, posted under your name.
edit_commentwritePATCH /boards/{board_id}/comments/{comment_id}Replace the text of a comment you wrote.
delete_commentwriteDELETE /boards/{board_id}/comments/{comment_id}Delete a comment you wrote, for everyone.

Sharing

ToolAccessREST routeWhat it does
get_sharingreadGET /boards/{board_id}/sharingWho can open a board: owner, editors and the read-only link with its settings.
invite_editorwritePOST /boards/{board_id}/editorsInvite someone by email to edit a board and the boards inside it.
remove_editorwriteDELETE /boards/{board_id}/editorsTake away someone's access to a board, or cancel an invite they have not accepted.
publish_boardwritePOST /boards/{board_id}/publishTurn on a board's read-only link, which anyone can open without signing up.
unpublish_boardwriteDELETE /boards/{board_id}/publishTurn off a board's read-only link; people who had it can no longer open the board.

Account

ToolAccessREST routeWhat it does
get_usagereadGET /usageHow many cards your account uses against the free plan's limit, by card type.

Not in this version

ToolWhy
upload_imageOn the hosted version it takes the image as a link, an upload or base64 through Cotlet's file handling, which this repo does not have yet. Upload images in Milanote, or use the hosted tool.

Never built, on purpose: your Milanote sign-in, email, password and profile settings, and plans and billing.

Configuration

VariableDefaultWhat it does
MILANOTE_MCP_HOME~/.config/milanote-api-mcpFolder of session.json.
MILANOTE_AUTH_TOKENMilanote __Secure-milanote.session_token cookie, instead of milanote-mcp connect.
MILANOTE_PROXYProxy for every request to Milanote, e.g. http://user:pass@host:port.
MILANOTE_MCP_READ_ONLY1 hides and refuses every tool that changes Milanote (same as --read-only).
MILANOTE_MCP_TOKENBearer token required by serve; needed to listen beyond 127.0.0.1.
MILANOTE_MCP_HOST, MILANOTE_MCP_PORT127.0.0.1, 8787Address of serve.

Security and your Milanote account

  • Your password never reaches this code. Only cookies are read, and only those of milanote.com.
  • The session file is yours. session.json is created with mode 0600. Anyone who has it can act as you on Milanote, so keep it out of git and shared folders.
  • Local by default. serve binds to 127.0.0.1 and refuses another address without MILANOTE_MCP_TOKEN.
  • milanote.com only. Requests and redirects outside milanote.com are refused.
  • Read-only mode. --read-only or MILANOTE_MCP_READ_ONLY=1 exposes the 9 read tools only.
  • Some actions reach other people. Comments carry your name, invite_editor emails the person you invite, and publish_board makes a board readable by anyone with the link. MCP clients ask before running them; a script does not.
  • Trash is reversible, comments are not. trash_cards moves cards to the board's trash, and restore_card brings them back. delete_comment deletes for everyone.

Errors

The REST API answers {"error": "<code>", "message": "..."}. The MCP server returns the same code and message as a tool error.

StatusCodeWhat to do
401auth_required, auth_expiredNo session, or Milanote signed you out. Sign in to Milanote in Chrome and run milanote-mcp connect.
403scope_deniedThe server runs read-only.
403target_blockedMilanote refused the request or showed a bot check. Open app.milanote.com in Chrome once, then retry.
422invalid_inputAn argument is missing or wrong; the message names it.
429rate_limitedMilanote is limiting the account. Wait a few minutes.
502target_errorMilanote answered with an error, for example the free plan's card limit, or changed its app. git pull for the latest tools, or open an issue.
504timeoutMilanote did not confirm a change in time. Check the board before you retry, the change may have landed.

Self-hosted or hosted

This repoCotlet, hosted
Tools3031, upload_image included
Runson your computer, while it is onin the cloud, 24/7
Milanote sessionyour Chrome, cookies in a local fileyour own Cloud Browser in the EU, profile encrypted with AES-256-GCM
When Milanote changes its appgit pull once we have fixed itfixed for you, every tool tested daily
Approvalsyour MCP client asks per callcomments, invites, publishing and trash wait for your OK, switchable per tool
Works withMCP clients on your machine, local scriptsClaude.ai and ChatGPT connectors, n8n, Make, Zapier, any HTTP client
Who may use ityou, for noncommercial useteams, businesses, agencies
Pricefreefree 7-day trial with 2,000 credits, no card; then one-time packs from $29 for 5,000 credits

On the hosted version a successful call uses 20 to 30 credits (25 for most tools), failed calls are free, and the Cloud Browser uses 50 credits a day while it has an app enabled for agents. Full pricing.

FAQ

Does Milanote have an official API? No. Milanote has no public API, no webhooks and no official MCP server (checked October 2026). A public API and an MCP server are open requests on its public roadmap, and the only way to get content out is the Export button, one board at a time. Details: cotlet.dev/integrations/milanote-api-mcp-server.

Is there a Milanote MCP server for Claude, ChatGPT or Cursor? Yes, this one runs on your machine: milanote-mcp mcp for Claude Code, Claude Desktop, Cursor and Codex. ChatGPT and Claude.ai connectors need a public HTTPS URL, which the hosted Milanote MCP server gives you.

Can I export Milanote boards to Markdown? Yes, with sub-boards: python examples/export_boards.py --board <board URL> --dir ./outline writes one Markdown file per board, in folders that follow the nesting. Word, PDF, PNG and plain text work the same way with --format.

Can I back up all my boards? Run export_boards.py on each board of your Home, from cron. Images and files on a board stay in Milanote. Milanote's own Generate ZIP in the Export menu downloads the originals.

Can it add to boards someone shared with me? Yes, if your account can edit that board. Read-only boards can be read and exported, not changed.

Does it work on the free plan? Yes. The free plan's 100-card limit still applies: get_usage shows where you stand, and adding a card past it fails with Milanote's own message.

Why does it need my Chrome? To read your Milanote session without your password, and your time zone for due dates. Chrome is used once per sign-in, not for each call.

What happens when Milanote signs me out? Calls fail with auth_expired. With Chrome remote debugging on, the server reads the new cookies on the next call (click Allow when Chrome asks); otherwise run milanote-mcp connect again.

Can it run on a VPS or in Docker? Technically yes, with MILANOTE_AUTH_TOKEN. Milanote then sees your session from a datacenter IP, which looks less like you. For an always-on setup the hosted version keeps your session in your own Cloud Browser on a fixed IP.

Will my Milanote account get banned? Requests carry Chrome's fingerprint and go out one at a time, as you would click. Nobody can promise a platform never acts. Keep to your normal use.

Can I use it at work or for my clients? No, the license allows noncommercial use only. For a team, a company or client work, use Cotlet or write to contact@cotlet.dev.

Is it open source? The source is public, the license is not an open source license: noncommercial use only, no business use.

A tool broke or I need another one. Open an issue with the tool name and the error message.

License

PolyForm Noncommercial License 1.0.0. In short:

  • Allowed: noncommercial use: you, for your own personal purposes with your own Milanote account, or a charity, school, public research or government body. Changing the code, and sharing it under the same license.
  • Not allowed: any commercial use, your own business included; client work; selling or offering it, or a service built on it.

Cotlet

Maintained by Cotlet (@cotletdev). Milanote is a trademark of its owner. This project is unofficial and not affiliated with, endorsed or sponsored by Milanote.

Keywords

chatgpt

FAQs

Related posts