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

@feniix/pi-notion

v1.2.1

Published

Notion API extension for pi — read, search, and manage Notion pages, databases, and content

Readme

@feniix/pi-notion

Notion API extension for pi — read, search, and manage Notion pages, databases, and content.

Features

  • Page Operations: Create, read, update, archive pages
  • Database Operations: Query, create, update databases
  • Block Operations: Read and update block content
  • Search: Search pages and databases
  • Comments: Read and create comments
  • Users: Get user information
  • MCP Client: Connect to official Notion MCP server with OAuth
  • Direct API: Direct Notion API access with integration token

Install

pi install npm:@feniix/pi-notion

Ephemeral (one-off) use:

pi -e npm:@feniix/pi-notion

Setup

Option 1: Notion MCP Server (Recommended - No integration needed!)

This connects directly to Notion's official MCP server, similar to how Claude Code or Cursor connect to Notion MCP. No Notion integration creation required.

# Just connect - it will open browser for OAuth
Use notion_mcp_connect to connect to Notion via MCP

MCP Tools:

| Tool | Description | |------|-------------| | notion_mcp_connect | Connect to Notion MCP server (opens browser) | | notion_mcp_disconnect | Disconnect from Notion MCP | | notion_mcp_status | Check connection status | | notion_mcp_call | Call a Notion MCP tool |

Option 2: Direct API with Integration Token

Requires creating a Notion integration, but works with direct API calls.

Prerequisites:

  1. Create an internal Notion integration at notion.so/profile/integrations
  2. Copy the integration token
  3. Share pages/databases with the integration

Configuration:

Environment Variable:

export NOTION_TOKEN="secret_xxx"

JSON Config File:

{
  "token": "secret_xxx"
}

CLI Flag:

pi --notion-token=secret_xxx

Option 3: Direct API with OAuth (Advanced)

Requires creating a public Notion integration.

Create ~/.pi/agent/extensions/notion.json:

{
  "oauth": {
    "clientId": "your-client-id",
    "clientSecret": "your-client-secret",
    "redirectUri": "http://localhost:3000/callback"
  }
}

Direct API Tools

Pages

| Tool | Description | |------|-------------| | notion_get_page | Retrieve a page by ID | | notion_create_page | Create a new page | | notion_update_page | Update page properties | | notion_archive_page | Archive a page |

Databases

| Tool | Description | |------|-------------| | notion_query_database | Query a database with filters/sorts | | notion_get_database | Get database metadata | | notion_create_database | Create a new database |

Blocks

| Tool | Description | |------|-------------| | notion_get_block_children | Get page/block children | | notion_append_blocks | Append blocks to a page |

Search

| Tool | Description | |------|-------------| | notion_search | Search pages and databases |

Users

| Tool | Description | |------|-------------| | notion_get_user | Get user by ID | | notion_get_me | Get current user |

OAuth (Direct API)

| Tool | Description | |------|-------------| | notion_oauth_setup | Start OAuth authorization flow | | notion_oauth_status | Check OAuth connection status | | notion_oauth_logout | Clear OAuth tokens and logout |

Which Option Should I Use?

| Option | Requires Integration | OAuth Flow | Tool Count | |--------|---------------------|------------|------------| | Notion MCP Server | ❌ No | Browser-based | Full MCP tools | | Direct API + Token | ✅ Internal | None | Custom tools | | Direct API + OAuth | ✅ Public | Browser-based | Custom tools |

Recommendation: Start with Option 1 (Notion MCP Server) if you just want to use Notion with pi. It works like Claude Code's Notion integration.

Tips

  • Page IDs: Found in Notion URLs (notion.so/workspace/Title-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
  • Database IDs: Same format as page IDs, found in database URLs

Requirements

  • pi v0.51.0 or later
  • For Direct API: Notion integration token
  • For MCP Server: Nothing additional needed!

License

MIT