npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

notion-guest-mcp

v0.1.1

Published

MCP server for Notion guest accounts, using the unofficial API via token_v2

Readme

notion-guest-mcp

An MCP server that lets AI assistants read Notion with a guest account, using Notion's internal API through the token_v2 session cookie.

⚠️ This uses an undocumented API. It can break at any time and may be against Notion's Terms of Service. token_v2 gives full access to your Notion account, so treat it like a password and never commit it.

Setup

Get token_v2: open Notion in the browser → F12 → Application (Storage in Firefox) → Cookies → the Notion domain → copy the value of token_v2.

Get root page URLs: copy the links of the pages under "Shared" in the sidebar (••• → Copy link).

Claude Code

claude mcp add mcp_notion --scope user \
  -e NOTION_TOKEN_V2=<token_v2> \
  -e NOTION_ROOT_PAGES="<url 1>,<url 2>" \
  -- npx -y notion-guest-mcp

Codex

codex mcp add mcp_notion \
  --env NOTION_TOKEN_V2=<token_v2> \
  --env NOTION_ROOT_PAGES="<url 1>,<url 2>" \
  -- npx -y notion-guest-mcp

Or add it to ~/.codex/config.toml:

[mcp_servers.mcp_notion]
command = "npx"
args = ["-y", "notion-guest-mcp"]
env = { NOTION_TOKEN_V2 = "<token_v2>", NOTION_ROOT_PAGES = "<url 1>,<url 2>" }

JSON config

For clients configured with an mcpServers JSON file (Claude Desktop, Cursor, ...):

{
  "mcpServers": {
    "mcp_notion": {
      "command": "npx",
      "args": ["-y", "notion-guest-mcp"],
      "env": {
        "NOTION_TOKEN_V2": "<token_v2>",
        "NOTION_ROOT_PAGES": "<url 1>,<url 2>"
      }
    }
  }
}

With all of the above, the token is stored in plain text in the client's config file.

Tools

| Tool | Description | |---|---| | search | Search pages under an ancestor page (ancestor, defaults to every page in NOTION_ROOT_PAGES) | | get_page | Get a page or database as markdown, including breadcrumb, properties and comment threads. Child pages, child databases, rows and relations are rendered as links /<page_id>; files as notion-file:<block_id> | | get_file | Download a Notion-hosted file (image, video, PDF, comment attachment) to a temp folder. Images are also returned inline so the AI can see them |

All tools are read-only for now.

Configuration

Values are read from environment variables, or from .env in the project root when running from source. Environment variables take precedence.

| Variable | Required | Description | |---|---|---| | NOTION_TOKEN_V2 | ✅ | Notion session cookie. Get it from DevTools → Application → Cookies → token_v2 | | NOTION_ROOT_PAGES | | URLs of your root pages (the "Shared" section in the sidebar), comma separated. search looks in all of them by default |

Troubleshooting

| Symptom | Fix | |---|---| | NOTION_TOKEN_V2 is required | The variable is not set, or .env is missing or empty | | invalid url in NOTION_ROOT_PAGES | One of the URLs has no page ID. Copy the link again from Notion | | Requests fail with 401 | The token expired (logging out ends the session). Copy a fresh token_v2 | | search returns nothing | The page you are looking for is not under any root in NOTION_ROOT_PAGES | | Old behavior after an update | npx may reuse a cached version. Use notion-guest-mcp@latest |