π
io.github.shck-dev/notion-mcp
Notion MCP server β search, export, and import pages as markdown
0 installs
Trust: 37 β Low
Search
Ask AI about io.github.shck-dev/notion-mcp
Powered by Claude Β· Grounded in docs
I know everything about io.github.shck-dev/notion-mcp. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
@shck-dev/notion-mcp
Notion MCP Server β search, export, and import pages as markdown
No workspace admin. No OAuth. No page sharing.
Just paste 3 values from your browser and go.
Features
- Search β full-text search across your entire workspace
- Export β download any page as clean markdown (headings, lists, code blocks, tables, links)
- Import β write markdown back to Notion pages, from a string or local file
- Create β spin up new child pages, optionally prefilled from a markdown string or file
- Comments β list open discussions, add new comments, reply to threads
- Zero setup friction β uses the same internal API as the Notion web app; if you can see it in your browser, this server can access it
Tools
| Tool | Description |
|---|---|
notion_search | Full-text search across all pages in your workspace |
notion_export_page | Export any Notion page as markdown |
notion_import_page | Write markdown content to a Notion page (replaces content) |
notion_import_page_from_file | Write a local .md file to a Notion page |
notion_create_page | Create a new sub-page, optionally prefilled with markdown |
notion_create_page_from_file | Create a new sub-page from a local .md file |
notion_list_comments | List open discussion threads on a page |
notion_add_comment | Start a new discussion β inline (anchored to text) or block-level |
notion_reply_comment | Reply to an existing discussion thread |
Why not the official Notion API?
| This MCP server | Official Notion API | |
|---|---|---|
| Setup | Paste 3 values from DevTools | Create integration, get admin approval, share pages |
| Page access | Everything you can see | Only explicitly shared pages |
| Markdown | Bidirectional (export + import) | Read-only blocks API |
| Auth | Cookie (token_v2) | OAuth / integration token |
Trade-off: The internal API is undocumented and may change. Token expires periodically (re-grab from browser).
Quick start
1. Get credentials from your browser
- Open notion.so in Chrome
- Press F12 β Application β Cookies β
www.notion.so - Copy the
token_v2cookie value βNOTION_TOKEN - Press F12 β Network tab, do any action in Notion
- Find a POST request to
api/v3/*, click it - From Request Headers: copy
x-notion-active-user-headerβNOTION_USER_ID - From Request Body (Payload): find
spaceIdβNOTION_SPACE_ID
2. Configure your MCP client
Claude Code
claude mcp add notion -- env NOTION_TOKEN=your_token NOTION_USER_ID=your_user_id NOTION_SPACE_ID=your_space_id bunx @shck-dev/notion-mcp
Claude Desktop / Cursor / any MCP client
Add to your MCP config (claude_desktop_config.json, .cursor/mcp.json, etc.):
{
"mcpServers": {
"notion": {
"command": "bunx",
"args": ["@shck-dev/notion-mcp"],
"env": {
"NOTION_TOKEN": "your_token_v2_value",
"NOTION_USER_ID": "your_user_id",
"NOTION_SPACE_ID": "your_space_id"
}
}
}
}
Requirements
- Bun runtime β
curl -fsSL https://bun.sh/install | bash
Limitations
- Internal API β undocumented, may break with Notion updates
- Token expiry β
token_v2expires periodically; re-grab from browser when auth fails - Pages only β no database queries (search, export, import work on pages)
- Replace-only import β import replaces all page content (no append/merge)
- Lossy markdown β some complex formatting may simplify during conversion
License
MIT
