{"id":50289539,"url":"https://github.com/shck-dev/notion-mcp","last_synced_at":"2026-05-28T05:00:59.819Z","repository":{"id":344206356,"uuid":"1180934437","full_name":"shck-dev/notion-mcp","owner":"shck-dev","description":"MCP server for Notion using internal API — no workspace admin needed","archived":false,"fork":false,"pushed_at":"2026-04-22T19:04:50.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-22T21:09:25.522Z","etag":null,"topics":["ai","claude","markdown","mcp","mcp-server","model-context-protocol","notion","notion-api"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shck-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-13T15:11:50.000Z","updated_at":"2026-04-22T19:04:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shck-dev/notion-mcp","commit_stats":null,"previous_names":["shck-dev/notion-mcp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shck-dev/notion-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shck-dev%2Fnotion-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shck-dev%2Fnotion-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shck-dev%2Fnotion-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shck-dev%2Fnotion-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shck-dev","download_url":"https://codeload.github.com/shck-dev/notion-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shck-dev%2Fnotion-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33594851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","claude","markdown","mcp","mcp-server","model-context-protocol","notion","notion-api"],"created_at":"2026-05-28T05:00:33.008Z","updated_at":"2026-05-28T05:00:59.808Z","avatar_url":"https://github.com/shck-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n[![MCP Badge](https://lobehub.com/badge/mcp/shck-dev-notion-mcp)](https://lobehub.com/mcp/shck-dev-notion-mcp)\n\n# @shck-dev/notion-mcp\n\n**Notion MCP Server — search, export, and import pages as markdown**\n\n[![npm version](https://img.shields.io/npm/v/@shck-dev/notion-mcp)](https://www.npmjs.com/package/@shck-dev/notion-mcp)\n[![npm downloads](https://img.shields.io/npm/dm/@shck-dev/notion-mcp)](https://www.npmjs.com/package/@shck-dev/notion-mcp)\n[![license](https://img.shields.io/npm/l/@shck-dev/notion-mcp)](https://github.com/shck-dev/notion-mcp/blob/main/LICENSE)\n\nNo workspace admin. No OAuth. No page sharing.\\\nJust paste 3 values from your browser and go.\n\n[Blog Post](https://shck.dev/blog/notion-mcp) | [GitHub](https://github.com/shck-dev/notion-mcp) | [npm](https://www.npmjs.com/package/@shck-dev/notion-mcp)\n\n\u003c/div\u003e\n\n---\n\n## Features\n\n- **Search** — full-text search across your entire workspace\n- **Export** — download any page as clean markdown (headings, lists, to-do, code blocks, tables, links)\n- **Import** — write markdown back to Notion pages (replaces content), from a string or local file\n- **Append** — add markdown to the end of a page without touching existing content\n- **Create** — spin up new child pages, optionally prefilled from a markdown string or file\n- **Comments** — list open discussions, add new comments, reply to threads\n- **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\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `notion_search` | Full-text search across all pages in your workspace |\n| `notion_export_page` | Export any Notion page as markdown |\n| `notion_import_page` | Write markdown to a Notion page — **replaces** all existing content |\n| `notion_import_page_from_file` | Write a local `.md` file to a page — **replaces** all content |\n| `notion_append_to_page` | Append markdown to the **end** of a page (non-destructive) |\n| `notion_append_to_page_from_file` | Append a local `.md` file to the end of a page (non-destructive) |\n| `notion_create_page` | Create a new sub-page, optionally prefilled with markdown |\n| `notion_create_page_from_file` | Create a new sub-page from a local `.md` file |\n| `notion_list_comments` | List open discussion threads on a page |\n| `notion_add_comment` | Start a new discussion — inline (anchored to text) or block-level |\n| `notion_reply_comment` | Reply to an existing discussion thread |\n\n## Why not the official Notion API?\n\n| | This MCP server | Official Notion API |\n|---|----------|-------------------|\n| **Setup** | Paste 3 values from DevTools | Create integration, get admin approval, share pages |\n| **Page access** | Everything you can see | Only explicitly shared pages |\n| **Markdown** | Bidirectional (export + import) | Read-only blocks API |\n| **Auth** | Cookie (`token_v2`) | OAuth / integration token |\n\n**Trade-off**: The internal API is undocumented and may change. Token expires periodically (re-grab from browser).\n\n## Quick start\n\n### 1. Get credentials from your browser\n\n1. Open [notion.so](https://notion.so) in Chrome\n2. Press **F12** → **Application** → **Cookies** → `www.notion.so`\n3. Copy the `token_v2` cookie value → `NOTION_TOKEN`\n4. Press **F12** → **Network** tab, do any action in Notion\n5. Find a POST request to `api/v3/*`, click it\n6. From **Request Headers**: copy `x-notion-active-user-header` → `NOTION_USER_ID`\n7. From **Request Body** (Payload): find `spaceId` → `NOTION_SPACE_ID`\n\n### 2. Configure your MCP client\n\n#### Claude Code\n\n```bash\nclaude 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\n```\n\n#### Claude Desktop / Cursor / any MCP client\n\nAdd to your MCP config (`claude_desktop_config.json`, `.cursor/mcp.json`, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"notion\": {\n      \"command\": \"bunx\",\n      \"args\": [\"@shck-dev/notion-mcp\"],\n      \"env\": {\n        \"NOTION_TOKEN\": \"your_token_v2_value\",\n        \"NOTION_USER_ID\": \"your_user_id\",\n        \"NOTION_SPACE_ID\": \"your_space_id\"\n      }\n    }\n  }\n}\n```\n\n## Requirements\n\n- [Bun](https://bun.sh) runtime — `curl -fsSL https://bun.sh/install | bash`\n\n## Limitations\n\n- **Internal API** — undocumented, may break with Notion updates\n- **Token expiry** — `token_v2` expires periodically; re-grab from browser when auth fails\n- **Pages only** — no database queries (search, export, import work on pages)\n- **Block granularity** — import replaces all content, append adds to the end (no in-place editing of individual blocks)\n- **Lossy markdown** — some complex formatting may simplify during conversion (e.g. nested lists flatten on import)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshck-dev%2Fnotion-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshck-dev%2Fnotion-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshck-dev%2Fnotion-mcp/lists"}