@feniix/pi-notion4.0.1
Notion API extension for pi — read, search, and manage Notion pages, databases, and content
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
@feniix/pi-notion
Notion MCP for pi. It registers Notion's hosted MCP server with pi's built-in MCP support and adds what is specific to Notion.
Features
- Notion MCP server: registers
https://mcp.notion.com/mcpas thenotionserver. pi's built-in MCP support handles sign-in, token refresh, reconnects, and tool exposure. - Deferred tools: Notion's tools (57 at the time of writing) are not declared to the model until
tool_searchloads the ones it needs. - Skill:
workspace-explorerteaches the model Notion's search modes, database schemas, and write operations.
Install
pi install npm:@feniix/pi-notion
Ephemeral (one-off) use:
pi -e npm:@feniix/pi-notion
Sign in
/mcp login notion
or, from a shell:
pi mcp login notion
pi opens Notion's authorization page and waits for approval. Over SSH, or when the browser runs on another machine, paste the URL the browser was redirected to into the sign-in screen. /notion prints these instructions.
pi stores the credentials in ~/.pi/agent/mcp-auth.json and refreshes them on its own. /mcp shows the connection status and tools; /mcp logout notion signs out. See "MCP Servers" (docs/mcp.md) in pi's documentation for the details.
Tools
Tools are named mcp__notion__<tool>, with - replaced by _: Notion's notion-search is mcp__notion__notion_search. Run /mcp to list them.
Configuration
The notion server uses deferred exposure. To change it, or to configure the server yourself, add a notion entry to ~/.pi/agent/mcp.json; an mcp.json entry takes precedence over the one this extension registers:
{
"mcpServers": {
"notion": {
"url": "https://mcp.notion.com/mcp",
"exposure": "deferred",
"toolExposure": { "notion-search": "direct", "notion-fetch": "direct" }
}
}
}
Multiple workspaces
Each Notion sign-in grants access to one workspace. For another workspace, add a server under another name to ~/.pi/agent/mcp.json, with the same URL:
{
"mcpServers": {
"notion-work": {
"url": "https://mcp.notion.com/mcp",
"exposure": "deferred",
"description": "Notion: work workspace"
}
}
}
Sign in with /mcp login notion-work and pick that workspace on Notion's consent screen. pi stores credentials per server name, so each server keeps its own sign-in. Its tools are named mcp__notion_work__<tool>. The description helps the model pick the right workspace.
Upgrading from 3.x
- Sign in again with
/mcp login notion. The 3.x auth file is not read. Delete it once you have signed in:~/.pi/agent/notion-mcp-auth.json(or the path inNOTION_MCP_AUTH_FILE) and~/.pi/agent/notion-oauth-url.txtif present. notion_mcp_connect,notion_mcp_disconnect, andnotion_mcp_statusare gone. Use/mcp,/mcp login notion, and/mcp logout notion.- Notion tools are renamed from
notion-searchtomcp__notion__notion_search, and so on. NOTION_MCP_AUTH_FILE,--notion-mcp-auth-file,NOTION_CONFIG_FILE,--notion-config-file, and their deprecated aliases are no longer read, and the session-start auth status line is gone.- The
setup-oauthskill is removed; sign-in needs no skill. - The tool call guardrail warnings and numeric property coercion are removed.
Requirements
- pi 1.1.0 or later (built-in MCP support)
License
MIT