notion-mcp

v0.5.2
io.github.shck-dev/notion-mcp Checked 2 days ago Published 5 months ago

Notion MCP server — search, export, and import pages as markdown

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

notion_export_page

Export a Notion page as clean markdown. Converts headings, lists, code blocks, tables, bold/italic, links, images, and nested content into standard markdown. Image links resolve to viewable URLs; pass image_dir to download images locally and link to the files instead.

ParameterTypeDescription
page_id *stringNotion page ID (32-char hex) or full Notion URL
image_dirstringOptional absolute directory: download images here and link to the local files (markdown should be saved beside this folder). Without it, image links are public CDN URLs.

notion_import_page

Write markdown content to a Notion page. DESTRUCTIVE: replaces ALL existing blocks on the page with content parsed from the markdown string. To add content without removing what is already there, use notion_append_to_page instead. Supports headings, lists, to-do checkboxes, code blocks, tables, and inline formatting (bold, italic, strikethrough, code, links).

ParameterTypeDescription
markdown *stringMarkdown content to write to the page
page_id *stringNotion page ID (32-char hex) or full Notion URL

notion_import_page_from_file

Write a local markdown file to a Notion page. DESTRUCTIVE: reads the file and replaces ALL existing page blocks with the parsed content. To add content without removing what is already there, use notion_append_to_page_from_file instead.

ParameterTypeDescription
file_path *stringAbsolute path to a local .md file
page_id *stringNotion page ID (32-char hex) or full Notion URL

notion_append_to_page

Append markdown content to the END of a Notion page, after the existing blocks. Non-destructive — existing content is left untouched. Supports headings, lists, to-do checkboxes, code blocks, tables, and inline formatting (bold, italic, strikethrough, code, links).

ParameterTypeDescription
markdown *stringMarkdown content to append to the page
page_id *stringNotion page ID (32-char hex) or full Notion URL

notion_append_to_page_from_file

Append a local markdown file to the END of a Notion page, after the existing blocks. Non-destructive — existing content is left untouched.

ParameterTypeDescription
file_path *stringAbsolute path to a local .md file
page_id *stringNotion page ID (32-char hex) or full Notion URL

notion_create_page

Create a new Notion page as a child of an existing page. Optionally populate it with markdown content. Returns the URL of the created page.

ParameterTypeDescription
parent_page_id *stringParent page ID (32-char hex) or full Notion URL
title *stringTitle of the new page
iconstringOptional page icon (emoji like "📄" or URL)
markdownstringOptional markdown content for the page body

notion_create_page_from_file

Create a new Notion page and populate it from a local markdown file. Returns the URL of the created page.

ParameterTypeDescription
file_path *stringAbsolute path to a local .md file
parent_page_id *stringParent page ID (32-char hex) or full Notion URL
title *stringTitle of the new page
iconstringOptional page icon (emoji like "📄" or URL)

notion_add_image

Add an image to the END of a Notion page. `image_path` is either an absolute path to a local image file (uploaded to Notion) or an http(s) URL (referenced as an external image). Non-destructive — appended after existing blocks.

ParameterTypeDescription
image_path *stringAbsolute path to a local image file, or an http(s) image URL
page_id *stringNotion page ID (32-char hex) or full Notion URL
captionstringOptional caption (also used as markdown alt text on export)

notion_list_comments

List all open comment discussions on a page (and its child blocks). Returns discussion IDs, anchored text context, authors, timestamps, and comment bodies. Use this to read feedback/review threads on any page.

ParameterTypeDescription
page_id *stringNotion page ID (32-char hex) or full Notion URL
include_resolvedbooleanInclude resolved discussions (default: false)

notion_add_comment

Start a new comment discussion on a block. If `anchor_text` is provided, the comment is anchored inline to that exact substring of the block's text (the Notion UI highlights it yellow). Without `anchor_text`, the discussion attaches at the block level. Supports markdown **bold**, *italic*, `code`, and [links](url) in the comment body.

ParameterTypeDescription
block_id *stringNotion block ID (32-char hex) — the block containing the text to comment on. A page ID also works (block-level only).
text *stringComment body (supports markdown inline formatting)
anchor_textstringOptional: substring of the block's text to anchor the comment to (inline comment). Must match exactly.

notion_reply_comment

Reply to an existing comment discussion thread. Use the discussion ID returned from notion_list_comments or notion_add_comment.

ParameterTypeDescription
discussion_id *stringDiscussion ID (32-char hex) from list_comments or add_comment
text *stringReply body (supports markdown inline formatting)

notion_init

Set up Notion credentials by pasting a "Copy as cURL" of any notion.so/api/v3 request from your browser DevTools (Network tab → right-click a request → Copy as cURL). Extracts the token/user/workspace and saves them to ~/.notion-mcp/config.json. If you have multiple workspaces, it lists them — call again with space_id. Runs without existing credentials.

ParameterTypeDescription
curl *stringThe full "Copy as cURL" string from DevTools → Network → a /api/v3 request
space_idstringOptional workspace id (when you have more than one)