Skip to main content
Glama

naver-blog-mcp

An MCP server that writes posts with formatting, images, tables, formulas, and places to Naver Blog. It directly controls SmartEditor ONE with Playwright.

Give it Markdown and it saves a draft; publishing is a separate tool.

## 오늘의 기록

**굵게** 와 [링크](https://naver.com) 가 들어간 문단.

- 목록도
- 됩니다

| 항목 | 지원 |
|------|------|
| 표   | O    |

![캡션](/path/photo.png)

:::file /path/report.pdf:::
:::formula x^2 + y^2 = z^2:::
:::place 강남역:::

Read this first

  • It automatically controls a browser logged in with your Naver account. Overuse can get your account restricted. It was not built for mass auto-posting, and don't add such features.

  • It does not store passwords. It only reads a cookie file created by a human logging in manually.

  • That cookie file (playwright-state/storage_state.json) is account access itself. It's in .gitignore, but be careful not to share it by mistake.

  • If Naver changes the editor, it may break. Then diagnose with verify_selectors.py (see "When selectors break" below).

Related MCP server: classby-blog-mcp

Requirements

  • Python 3.11+

  • uv

  • A Naver Blog account

Installation

git clone <이 저장소>
cd naver-blog-mcp
uv sync
uv run playwright install chromium

Login (first time only)

uv run python login_setup.py

When the browser opens, log in manually and navigate to your own blog home, then press Enter in the terminal. CAPTCHA, two-factor authentication, and device registration are all handled by a human. The cookie is saved to playwright-state/storage_state.json, and the server only reads that file.

If the session expires, run this command again.

MCP registration

Claude Code

claude mcp add naver-blog \
  -e NAVER_BLOG_ID=<블로그아이디> \
  -e NAVER_STATE=/절대경로/naver-blog-mcp/playwright-state/storage_state.json \
  -- /절대경로/naver-blog-mcp/.venv/bin/naver-blog-mcp

Claude Desktop

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

{
  "mcpServers": {
    "naver-blog": {
      "command": "/절대경로/naver-blog-mcp/.venv/bin/naver-blog-mcp",
      "env": {
        "NAVER_BLOG_ID": "<블로그아이디>",
        "NAVER_STATE": "/절대경로/naver-blog-mcp/playwright-state/storage_state.json"
      }
    }
  }
}

After saving, fully quit Claude Desktop (Cmd+Q) and reopen it.

The path must be an absolute path. GUI apps do not inherit the shell PATH and have a different working directory. If NAVER_STATE is omitted, the default is a relative path, so the session file won't be found.

Environment variables

Name

Default value

Description

NAVER_BLOG_ID

(required)

Blog ID. blog.naver.com/<here>

NAVER_STATE

playwright-state/storage_state.json

Cookie file path. Absolute path recommended

HEADLESS

false

If true, does not show a browser window

HEADLESS defaults to false intentionally — because if a CAPTCHA appears, a human must solve it. If set to true, it fails silently in such situations.

Tools

Tool

Description

check_session()

Check if the session is alive

list_categories()

Category list (subcategories are indented)

list_drafts()

List draft posts

create_draft(title, markdown, category, tags)

Write a post and save as draft. Does not publish

publish_draft(confirm, title, visibility)

Load a draft and publish

delete_draft(confirm, title)

Delete a draft

delete_post(url_or_log_no, confirm)

Delete a published post

The basic flow is draft → review visually → publish.

Destructive tools (publish_draft, delete_draft, delete_post) require confirm=True. The first two refuse and show candidates if the target is ambiguous (the title matches multiple posts, or there are 2+ drafts without a specified one).

visibility is one of public / neighbor / both_neighbor / private.

Markdown support scope

All verified by actually inserting into the editor.

Syntax

Result

# ## ### headings

Font size 24 / 19 / 15

**bold** *italic* ~~strikethrough~~

Supported

[text](url)

Supported within paragraphs and headings

> quote

Quote component

- list / 1. list

Ordered/unordered list

```code```

Source code component

---

Divider

GFM pipe table

Table component (cell formatting preserved)

![caption](local path)

Photo + caption

:::file local path:::

File attachment (10MB each)

:::formula ...:::

Formula

:::place search term:::

Place (first search result)

Images and files accept local paths only (URLs not allowed).

Known limitations

  • Links inside quotes and tables are lost. To add a link, it must go through the typing path, but typing cannot create quote or table components themselves. It keeps the block shape and drops the link.

  • Inline code (`code`) is not supported. Naver has no corresponding feature.

  • Places use the first search result. To specify precisely, give a specific search term (:::place Gangnam Station Line 2:::). Which place was chosen is shown in the result.

  • There is no way to specify language or style for formulas.

When selectors break

If Naver changes the editor, tools return "... not found". There is a diagnostic script.

export NAVER_BLOG_ID=<블로그아이디>
uv run python verify_selectors.py            # 창 띄움
HEADLESS=true uv run python verify_selectors.py   # 창 없이

It checks the editor's first screen and the publish layer in two steps and outputs OK / HIDDEN / MISS. If there is a MISS, it leaves dom_probe.txt (list of clickable/inputtable elements) and dom_dump.html, so you can fix selectors.py based on those.

All selector strings are in one file: src/naver_blog_mcp/selectors.py. Do not put them in other files.

Structure

src/naver_blog_mcp/
  selectors.py   셀렉터 격리 구역. 네이버가 바뀌면 여기만 고친다
  ir.py          마크다운 → 블록 IR → HTML. 붙여넣기 가능/불가능 라우팅
  editor.py      에디터 구동부 (붙여넣기, 업로드, 툴바 조작)
  session.py     쿠키 로드/저장. 비밀번호는 다루지 않는다
  server.py      MCP 툴 정의
login_setup.py   최초 1회 사람이 직접 로그인
verify_selectors.py  셀렉터 진단

The core design is documented with reasons in CLAUDE.md. In particular:

  • The body uses clipboard HTML paste as the primary path. It is much more stable than toolbar clicks.

  • Only what paste breaks (lists, code blocks, links) is created separately via toolbar/keyboard.

  • Images, files, formulas, and places cannot be pasted, so they go through the toolbar.

Contributing

If you find broken selectors, please open an issue with the verify_selectors.py output. The candidate list in selectors.py is ordered by semantic (data-click-area, data-testid, data-name, aria-label) → class prefix → obfuscated class. Naver's obfuscated classes often only rotate hashes, so class*= prefix matching holds up well.

License

MIT — LICENSE

Available Tools

7 tools
check_sessionA

세션이 살아있는지 확인. 만료면 login_setup.py 재실행이 필요하다.

Inputs: no named parameters. Returns: result

create_draftA

마크다운으로 글을 작성하고 임시저장한다. 발행하지 않는다.

지원 서식: 제목(1~3), 굵게, 기울임, 취소선, 인라인코드, 링크, 인용, 순서/비순서 목록, 코드블록, 구분선, 이미지, 표(GFM 파이프), 파일 첨부, 수식, 장소. 이미지는 캡션, 파일 첨부는 :::file 로컬경로::: 형식이다. 둘 다 로컬 파일 경로여야 한다 (URL 불가). 파일은 개당 10MB 제한. 수식은 :::formula x^2+y^2=z^2:::, 장소는 :::place 강남역::: 이다. 장소는 검색 결과 중 첫 번째를 쓰며, 무엇을 골랐는지 결과에 표시된다.

Inputs: title (required), markdown (required), tags, category. Returns: result

delete_draftA

임시저장 글을 삭제한다. 복구되지 않으므로 confirm=True 를 명시해야 한다.

title 규칙은 publish_draft 와 같다: 부분 일치 가능, 여러 글과 맞으면 거부, 비워두면 임시저장이 정확히 1건일 때만 동작한다.

Inputs: title, confirm. Returns: result

delete_postA

발행된 글을 삭제한다. 복구되지 않으므로 confirm=True 를 명시해야 한다.

임시저장 삭제(delete_draft)와는 다른 대상이다. 글 URL 이나 글 번호를 넘긴다. 대상을 반드시 명시해야 한다 — 제목으로 찾아주지 않는다.

Inputs: url_or_log_no (required), confirm. Returns: result

list_categoriesA

블로그 카테고리 목록을 조회한다. 발행하지 않는다.

발행 설정 레이어를 열어서 읽고 다시 닫는다. 하위 카테고리는 들여쓰기로 표시된다.

Inputs: no named parameters. Returns: result

list_draftsA

임시저장 글 목록을 조회한다. 최신순.

Inputs: no named parameters. Returns: result

publish_draftA

임시저장 글을 불러와서 발행한다. confirm=True 를 명시해야 동작한다.

글쓰기 화면은 임시저장 글을 자동 복구하지 않으므로 목록에서 명시적으로 불러온다. title 은 부분 일치도 되지만, 여러 글과 맞으면 거부한다. 비워두면 임시저장이 정확히 1건일 때만 동작한다 — 발행은 되돌리기 어려우니 대상을 사람이 정하게 한다.

visibility: public | neighbor | both_neighbor | private. 비우면 글에 이미 설정된 값을 그대로 쓴다.

Inputs: title, confirm, visibility. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool maps to a distinct resource and action: session check, category listing, draft creation, draft listing, draft deletion, published-post deletion, and draft publishing. delete_draft and delete_post are clearly separated by their descriptions and targets.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern: check_session, list_categories, create_draft, list_drafts, delete_draft, delete_post, publish_draft. The singular/plural variation is natural for list vs. single-item operations.

    Tool Count5/5

    Seven tools is a well-scoped size for a Naver blog management server. Each tool covers a meaningful part of the authoring workflow without redundancy or bloat.

    Completeness2/5

    The set covers draft creation, listing, deletion, and publishing, plus published-post deletion, but lacks any way to update a draft or published post. More critically, there is no tool to list or search published posts, so delete_post is a dead end unless the user already supplies a URL or post number.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      D
      maintenance
      Provides tools for creating and editing blog post drafts, attaching images, and automating Naver blog editor filling via Chrome.
      8
      -
    • F
      license
      B
      quality
      C
      maintenance
      Automates writing and publishing posts to velog.io via MCP, including login and session management.
      5
      -