Notion轻量服务器

一个轻量级、只读的Notion MCP服务器,优化了令牌效率,适用于需要快速访问Notion数据的开发场景。

  • by corrupt952
  • TypeScript
  • 本地部署
  • 5 星标
  • 更新于
在 GitHub 查看 corrupt952/nooon

使用说明

没有

轻量级、只读的Notion MCP服务器,针对令牌效率进行了优化。

特性

  • 简单身份验证 NOTION_TOKEN 或OAuth 2.0+PKCE
  • 使用最小输出 TOON格式
  • 基于的智能缓存 last_edited_time
  • 在一次调用中获取递归块

安装

bunx nooon
Manual Install (Pre-built binaries)

下载自 发布:

# macOS (Apple Silicon)
curl -L https://github.com/corrupt952/nooon/releases/latest/download/nooon-darwin-arm64 -o nooon && chmod +x nooon

# macOS (Intel)
curl -L https://github.com/corrupt952/nooon/releases/latest/download/nooon-darwin-x64 -o nooon && chmod +x nooon

# Linux (x64)
curl -L https://github.com/corrupt952/nooon/releases/latest/download/nooon-linux-x64 -o nooon && chmod +x nooon

# Linux (arm64)
curl -L https://github.com/corrupt952/nooon/releases/latest/download/nooon-linux-arm64 -o nooon && chmod +x nooon

认证

选择以下方法之一:

API令牌(简单)

export NOTION_TOKEN=ntn_xxx

OAuth(交互式)

bunx nooon config --client-id <id> --client-secret <secret>
bunx nooon auth

从获取凭据 概念整合.

用法

注册克劳德代码:

eval $(bunx nooon mcp install)

检查状态:

bunx nooon status

MCP工具

工具 说明
nooon_search 按关键字搜索页面和数据库
nooon_page 使用嵌套块(缓存)获取页面内容
nooon_database 获取数据库架构和可用视图
nooon_data_source 获取数据源架构(属性定义)
nooon_query 使用筛选器/排序查询数据库
nooon_clear_cache 清除缓存页面

CLI参考

bunx nooon auth              Start OAuth flow
bunx nooon logout            Clear credentials
bunx nooon status            Show auth status
bunx nooon config            Configure OAuth credentials
bunx nooon cache clear       Clear page cache
bunx nooon mcp               Start MCP server
bunx nooon mcp install       Output claude mcp add command
bunx nooon mcp config        Output mcpServers JSON

从源头构建

bun install
bun run compile

对于团队分发(用户只需运行 bunx nooon auth,无需集成设置):

NOTION_CLIENT_ID=xxx NOTION_CLIENT_SECRET=xxx bun run compile

许可证

麻省理工学院