npm.io
0.0.9 • Published 2d agoCLI

notion-mcp-cli

Licence
MIT
Version
0.0.9
Deps
3
Size
16 kB
Vulns
0
Weekly
0

notion-mcp-cli

CLI for Notion MCP with OAuth support.

Installation

npm install -g notion-mcp-cli

Usage

# Login (saves MCP URL, auth happens on first command)
notion-mcp-cli login

# Run any Notion MCP tool
notion-mcp-cli notion-search --query "meeting notes"
notion-mcp-cli notion-get-page --pageId "abc123"

# Check status
notion-mcp-cli status

# Logout
notion-mcp-cli logout

How it works

  1. On first command, opens browser for Notion OAuth
  2. Caches tools and session for 1 hour
  3. Auto-refreshes tokens when needed

Packages

This monorepo contains:

Package Description
notion-mcp-cli CLI for Notion MCP
@goke/mcp Generate CLI commands from any MCP server
goke cac-inspired CLI framework with space-separated subcommands

@goke/mcp

Use @goke/mcp to build your own MCP CLI:

import { goke } from 'goke'
import { addMcpCommands } from '@goke/mcp'

const cli = goke('mycli')

await addMcpCommands({
  cli,
  commandPrefix: 'mcp',
  getMcpUrl: () => 'https://your-mcp-server.com/mcp',
  oauth: {
    clientName: 'My CLI',
    load: () => loadConfig().oauth,
    save: (state) => saveConfig({ oauth: state }),
  },
  loadCache: () => loadConfig().cache,
  saveCache: (cache) => saveConfig({ cache }),
})

cli.parse()

License

MIT

Keywords