Skip to main content
Glama

note-draft-mcp

Claude などの MCP クライアントから、自分の note.com アカウントに記事を「下書き保存」する MCP サーバーです(stdio)。

Markdown を note のエディタ用の HTML に変換し、ローカル画像のアップロード、見出し画像の設定までを行います。

WARNING
  • note の非公式 API を使っています。 note に公式の投稿 API はありません。ブラウザのエディタが使っている内部 API を呼んでいるため、仕様が変わると予告なく動かなくなります。

  • note の利用規約上のリスクがあります。 規約は自動化された手段でのアクセスを制限しています。アカウントの利用停止などの可能性も含め、ご利用規約 を自分で確認し、自己責任で使ってください。使うのは自分のアカウントだけにし、短時間に大量のリクエストを送らないでください。

  • 公開はできません。 このサーバーは下書き保存専用です。公開・削除・価格設定の API は、コード上で呼べないように制限しています。公開は、note の画面で内容を確認してから手で行ってください。

ツール

ツール

内容

create_draft

Markdown から新しい下書きを作る。ローカル画像は自動でアップロードして埋め込む。eyecatch_path で見出し画像も設定できる。dry_run: true なら何も送らずに内容だけ返す

update_draft

既存の下書きのタイトルと本文を丸ごと置き換える。下書き一覧にある ID だけを受け付ける(公開済みの記事は更新しない)

upload_image

画像をアップロードし、URL を返す

set_eyecatch

既存の下書きに見出し画像を設定する

list_drafts

自分の下書きの一覧(ID・タイトル・編集画面の URL)

create_draft / update_draft の引数:

  • title: 省略すると、Markdown の先頭にある # 見出し をタイトルにし、本文からは除きます。

  • markdown または markdown_path: どちらか一方を指定します。

  • base_dir: 画像の相対パスの基準です。省略時は markdown_path のあるディレクトリになります。

  • eyecatch_path: 見出し画像のファイルです。

  • dry_run: 送信前に内容を確認するためのフラグです。タイトル、本文 HTML の先頭、画像の数、警告を返します。

画像は PNG / JPEG / GIF で、10MB までです。

Related MCP server: note.com MCP Server

必要なもの

  • Node.js 20 以上

  • note.com にログインしたブラウザ(Cookie を取り出すため)

インストール

git clone https://github.com/goodnasubi/note-mcp.git
cd note-mcp
npm ci
npm run build
  1. ブラウザで note.com にログインします。

  2. 開発者ツールを開きます(F12)。Chrome では「Application」→「Cookies」→ https://note.com を選びます。

  3. _note_session_v5 の 値 をコピーします。

  4. 環境変数 NOTE_SESSION_COOKIE に設定します。

export NOTE_SESSION_COOKIE='コピーした値'

NOTE_SESSION_COOKIE には、Cookie ヘッダー全体(_note_session_v5=...; XSRF-TOKEN=...)も入れられます。XSRF-TOKEN が含まれていれば、X-XSRF-TOKEN ヘッダーとして自動で送ります。別に指定したい場合は NOTE_XSRF_TOKEN を使ってください。

CAUTION

この Cookie はパスワードと同じ です。持っている人は、あなたとして note を操作できます。

  • リポジトリ、Issue、チャット、スクリーンショットに貼らないでください。.env は .gitignore 済みです。

  • 漏れたと思ったら、note からログアウトしてください。セッションが無効になります。

  • Cookie には有効期限があります。期限が切れると、ツールは NoteAuthError を返します。取り直して設定し直してください。

MCP クライアントへの登録

Claude Code

Cookie を設定ファイルに書かずに済むよう、シェルの環境変数から渡す方法をおすすめします。

export NOTE_SESSION_COOKIE='...'   # シェルの設定や direnv などで設定しておく
claude mcp add note-draft -- node /path/to/note-mcp/dist/index.js

-e で渡すこともできますが、その場合は Cookie が Claude Code の設定ファイルに保存されます。

claude mcp add note-draft -e NOTE_SESSION_COOKIE='...' -- node /path/to/note-mcp/dist/index.js

Claude Code on the web(クラウドセッション)

  1. 環境設定のシークレットに NOTE_SESSION_COOKIE を登録します。

  2. ネットワークの許可リストに note.com、editor.note.com、assets.st-note.com、note-cakes-web-dev.s3.ap-northeast-1.amazonaws.com(画像のアップロード先)を追加します。

Claude Desktop

claude_desktop_config.json に追加します。Cookie は設定ファイルに平文で保存されるので、ファイルの扱いに注意してください。

{
  "mcpServers": {
    "note-draft": {
      "command": "node",
      "args": ["/path/to/note-mcp/dist/index.js"],
      "env": { "NOTE_SESSION_COOKIE": "..." }
    }
  }
}

使い方の例

Claude に、たとえば次のように頼みます。

docs/articles/2026-09-26-example.md を、見出し画像 docs/articles/images/header.png で note に下書き保存して。先に dry_run で確認して。

返ってきた edit_url を開いて内容を確認し、問題がなければ note の画面から公開します。

Markdown の変換

Markdown

note

# / ##

大見出し

###

小見出し

#### 以下

太字の段落

段落・段落内の改行

段落・改行

**太字**

太字

[リンク](https://...)

リンク(http / https / mailto のみ)

- / 1.

箇条書き / 番号付きリスト

>

引用

```

コードブロック

![説明](images/x.png)

画像(アップロードして埋め込む。説明はキャプションになる)

---

区切り線

表

非対応。1行ずつ「見出し: 値」の箇条書きに変換し、警告を返す

生の HTML

削除して警告を返す(HTML コメントは警告なしで削除)

*斜体*、~~取り消し~~、`コード`

装飾を外し、文字だけ残す

外部 URL の画像

アップロードせず、リンクにして警告を返す

YAML front matter

削除する

使っている API(非公式)

用途

API

認証の確認

GET /api/v2/current_user

記事の作成

POST /api/v1/text_notes

下書き保存

POST /api/v1/text_notes/draft_save?id={id}&is_temp_saved=true

下書き一覧

GET /api/v2/note_list/contents?status=draft

画像アップロード

POST /api/v3/images/upload/presigned_post → ストレージへ POST

見出し画像

POST /api/v1/image_upload/note_eyecatch

呼べる API は src/note-client.ts の ALLOWED_ENDPOINTS に限定しています。

2026年9月27日に、上の API すべてで下書きの作成・本文画像の埋め込み・見出し画像の設定ができることを確認しました(本文の <figure><img> も消されずに保存されます)。

エンドポイントは、次の MIT ライセンスの実装を参考に調べました。

開発

npm test          # 単体テスト・結合テスト(HTTP はモック。note には接続しない)
npm run typecheck
npm run build

ライセンス

MIT

Available Tools

5 tools
create_draftnote に下書きを作成A

Markdown を note 用の HTML に変換し、自分の note アカウントに新しい下書きとして保存する。公開はしない(公開は note の画面から手動で行う)。ローカル画像は自動でアップロードして埋め込む。まず dry_run: true で内容を確認することを勧める。

ParametersJSON Schema
NameRequiredDescriptionDefault
titleNo記事タイトル。省略すると Markdown 先頭の「# 見出し」を使い、本文からは除く。
dry_runNotrue なら note に何も送らず、送る予定の内容(タイトル・本文 HTML の先頭・画像数・警告)だけを返す。
base_dirNo画像の相対パスの基準ディレクトリ。省略時は markdown_path のディレクトリ、なければカレントディレクトリ。
markdownNo本文の Markdown。markdown_path と同時には指定できない。
eyecatch_pathNo見出し画像にするファイル(PNG / JPEG / GIF、10MB まで)。base_dir 基準。
markdown_pathNo本文の Markdown ファイルのパス(.md)。

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=false, idempotentHint=false and openWorldHint=true, and the description adds real value on top: no publishing occurs, local images are auto-uploaded and embedded, and a dry-run mode previews what would be sent. It stops short of stating auth requirements or the non-idempotent effect of re-running with the same Markdown.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four compact sentences: conversion/save first, then the no-publish constraint, then image handling, then the dry-run recommendation. Nothing is wasted; it could only be tighter by folding the image note into the first sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter, zero-required mutation-adjacent tool with no output schema, the description covers conversion, storage target, side effects (image upload), and safety (no publish, dry-run preview). Only authentication/credential expectations and the fact that repeated runs create duplicates (idempotentHint=false) are unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all six parameters (including dry_run, markdown/markdown_path exclusivity, base_dir, eyecatch_path) are already documented in the schema. The description only re-mentions dry_run and adds no syntax or format detail beyond it, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Markdown を note 用の HTML に変換し…新しい下書きとして保存する') with the medium and destination. The emphasis on a NEW draft distinguishes it from the sibling update_draft without needing to open either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It recommends the dry_run-first workflow and clarifies that publishing is out of scope, which is useful guidance. However, it never explicitly states when to prefer create_draft over update_draft/list_drafts or what prerequisites (e.g. authentication) apply, so routing remains partly inferential.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_drafts自分の下書き一覧B
Read-only

自分の note の下書きを新しい順に返す(ID・タイトル・編集画面の URL)。

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNoページ番号(1 から)。

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description usefully adds the sort order (newest first) and the fields returned — valuable context given there is no output schema — but it says nothing about pagination behavior despite the page parameter.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One compact sentence that front-loads the verb, scope, ordering, and return contents with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only list tool with annotations covering safety, the description adequately covers the return shape since no output schema exists. The only gap is that it does not explain pagination or how many drafts appear per page.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the single 'page' parameter is fully documented in the schema (range and default). The description adds nothing about pagination semantics, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('返す' / '下書き') plus the ordering and returned fields, so it is clearly distinguishable from create_draft and update_draft. It stops short of explicitly naming those siblings as alternatives, but the verb makes the distinction obvious.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description says what is returned but never says when to reach for this tool versus create_draft/update_draft, nor any prerequisite such as being logged in. Usage is only implied by the read-only listing nature.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

set_eyecatch下書きの見出し画像を設定A
DestructiveIdempotent

既存の下書きに見出し画像(アイキャッチ)を設定する。下書き一覧にある ID だけ受け付ける。

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes下書きの ID。
pathYes画像ファイルのパス(PNG / JPEG / GIF、10MB まで)。

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, so the mutation and repeat-call profile is covered. The description adds the ID-validity constraint, but does not disclose the key behavioral risk implied by destructiveHint — whether an existing eyecatch is overwritten and how that interacts with idempotency. With annotations carrying the safety profile, a 3 is appropriate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with zero waste; the core action is front-loaded and the ID constraint follows immediately. Nothing extraneous.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter mutation tool with no output schema, the description covers purpose and the ID constraint. It omits the overwrite/destructive behavior and any note on whether path must reference an already-uploaded image, which matters given destructiveHint=true.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema documents both id (pattern ^\d+$) and path (PNG/JPEG/GIF, 10MB limit). The description adds only the constraint that id must come from the draft list, which is marginal over the schema. Baseline 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (設定する) and resource (見出し画像/アイキャッチ) scoped to an existing draft, so the action is unambiguous. It does not explicitly distinguish itself from sibling upload_image, which likely handles the upload step, leaving the boundary to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase '下書き一覧にある ID だけ受け付ける' gives a validity constraint (the ID must exist in the draft list) that implies when the tool is applicable. However, it names no alternative and gives no explicit when-to-use vs upload_image or update_draft, nor any prerequisites like uploading the image first.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_draftnote の下書きを更新A
DestructiveIdempotent

既存の下書きのタイトルと本文を、指定した Markdown で丸ごと置き換える。公開済みの記事は更新できない(下書き一覧にある ID だけ受け付ける)。公開はしない。

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes下書きの ID(create_draft / list_drafts が返す数字の id)。
titleNo記事タイトル。省略すると Markdown 先頭の「# 見出し」を使い、本文からは除く。
dry_runNotrue なら note に何も送らず、送る予定の内容(タイトル・本文 HTML の先頭・画像数・警告)だけを返す。
base_dirNo画像の相対パスの基準ディレクトリ。省略時は markdown_path のディレクトリ、なければカレントディレクトリ。
markdownNo本文の Markdown。markdown_path と同時には指定できない。
eyecatch_pathNo見出し画像にするファイル(PNG / JPEG / GIF、10MB まで)。base_dir 基準。
markdown_pathNo本文の Markdown ファイルのパス(.md)。

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, so the safety profile is largely covered. The description adds real value on top: the update is a wholesale replacement (丸ごと置き換える), not a patch, and it will not publish — useful specifics about what is destroyed and what side effect is deliberately absent. Remaining gaps (auth requirements, error behavior) are minor given annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences with the core action front-loaded, then the scope constraint, then the non-publish guarantee. No filler and nothing an agent must scan past.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a seven-parameter mutation tool with no output schema, the description covers the essential action, the destructive full-replacement semantics, and the eligibility constraint; dry_run return behavior is documented in the schema. It could still say more about failure modes or image handling, but nothing critical is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and all seven parameters (including the markdown/markdown_path mutual exclusion and dry_run semantics) are documented in the schema itself. The description adds no parameter-level detail of its own, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb and resource: replaces an existing draft's title and body wholesale with the given Markdown. It also bounds the scope by noting published articles cannot be updated and that only draft-list IDs are accepted, which cleanly separates it from create_draft/list_drafts and from any publish step. An agent can tell exactly what this tool does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear when-not condition (公開済みの記事は更新できない, only IDs present in the draft list are accepted) and clarifies it will not publish. It does not, however, explicitly name an alternative (e.g. create_draft for new drafts or a publish action), so the routing guidance is contextual rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

upload_imagenote に画像をアップロードA

ローカルの画像(PNG / JPEG / GIF、10MB まで)を note にアップロードし、本文に埋め込める URL を返す。通常は create_draft が自動で行うので、単体で使う必要はあまりない。

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes画像ファイルのパス。

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations cover the safety profile (destructiveHint=false, idempotentHint=false, openWorldHint=true), and the description adds real behavioral context: accepted MIME types, the 10MB limit, and that the output is an embeddable URL. It does not mention auth requirements or what happens on oversized/unsupported files, so it falls just short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences, with the core purpose and constraints front-loaded and the routing guidance following immediately. No redundant filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter upload tool with no output schema, the description covers the resource, constraints, return value (embeddable URL), and when not to use it. Everything an agent needs to call it correctly is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the single 'path' parameter is documented there. The description's 'ローカルの画像' clarifies the path refers to a local file, adding minor value, but the format/size constraints are resource-level rather than parameter-level, so this stays at baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (upload a local image to note) plus accepted formats and size cap, and clarifies it returns an embeddable URL. It is clearly differentiated from siblings like create_draft, which it names.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells the agent that create_draft normally performs this automatically and that standalone use is rarely needed — a direct when-not-to-use statement naming the alternative tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.1.0
    • First observedcreate_draft
    • First observedlist_drafts
    • First observedset_eyecatch
    • First observedupdate_draft
    • First observedupload_image

TDQS

A4/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct action on a distinct concern: creating a new draft, replacing an existing draft, uploading a standalone image, setting an eyecatch, and listing drafts. The only mild overlap is upload_image being auto-invoked by create_draft, but the description explicitly clarifies when to use it, eliminating confusion.

Naming Consistency5/5

All five tools follow a strict verb_noun snake_case pattern (create_draft, update_draft, upload_image, set_eyecatch, list_drafts). The convention is uniform and predictable throughout.

Tool Count5/5

Five tools is well-scoped for a note draft management server, with each tool earning its place around a clear draft lifecycle. No bloat or redundancy beyond the intentional upload_image helper.

Completeness4/5

The surface covers create, update, list, image upload, and eyecatch setting, but lacks a delete_draft operation and a get-single-draft fetch (list only returns summary fields). Publishing being manual is a deliberate design choice, so the gap is minor and workable around.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers