使用说明
概念mcp快速
Notion的快速只读MCP服务器 -直接从本地SQLite缓存读取,不需要API调用。
为什么?
官方Notion MCP为每次读取操作调用API:
- 慢:每个请求的网络延迟
- 速率限制:适用API配额
- 上下文很重:详细的响应会占用AI上下文窗口
概念mcp快速 直接从Notion的本地SQLite缓存读取:
- 瞬间:无网络呼叫,响应时间<10ms
- 无限:没有API费率限制
- 最小化:简洁明了的回答
需求
- 仅限macOS (Notion将SQLite缓存存储在macOS特定的路径上)
- Notion桌面应用程序 已安装并登录
- Python 3.10+
安装
git clone https://github.com/lucid-jin/notion-mcp-fast.git
cd notion-mcp-fast
设置
克劳德代码
# Add MCP server (use absolute path)
claude mcp add notion-fast -- uvx --from /path/to/notion-mcp-fast notion-mcp-fast
# Example with home directory
claude mcp add notion-fast -- uvx --from ~/notion-mcp-fast notion-mcp-fast
克劳德桌面版
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"notion-fast": {
"command": "uvx",
"args": ["--from", "/path/to/notion-mcp-fast", "notion-mcp-fast"]
}
}
}
推荐:使用官方通告MCP
要完成设置,请同时使用以下两种方法:
- 概念快:从本地缓存快速读取
- MCP官方理念:写入和实时数据
{
"mcpServers": {
"notion-fast": {
"command": "uvx",
"args": ["notion-mcp-fast"]
},
"notion": {
"command": "npx",
"args": ["-y", "@notionhq/notion-mcp-server"],
"env": {
"NOTION_API_KEY": "your-api-key"
}
}
}
}
可用工具
| 工具 | 说明 |
|---|---|
list_pages |
列出具有可选搜索和筛选功能的页面 |
get_page |
获取包含子块的页面 |
list_databases |
列出所有数据库(集合) |
get_database |
获取数据库架构和详细信息 |
query_database |
从数据库查询行 |
list_users |
列出所有用户 |
get_user |
获取用户详细信息 |
list_spaces |
列出所有工作区 |
search |
按标题搜索所有页面 |
get_summary |
获取所有缓存实体的计数 |
运作原理
┌─────────────────────────────────────┐
│ Notion Desktop App │
│ │
│ Syncs data → SQLite database │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ ~/Library/Application Support/ │
│ Notion/notion.db │
│ │
│ SQLite with 162K+ blocks │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ notion-mcp-fast │
│ │
│ • Reads SQLite directly │
│ • 5-minute TTL cache │
│ • MCP protocol interface │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Claude / AI Assistant │
│ │
│ Instant access to Notion data! │
└─────────────────────────────────────┘
局限性
- 只读:无法创建或修改Notion内容
- 仅限macOS:SQLite路径特定于macOS
- 缓存延迟:数据反映了最后一次Notion应用程序同步(通常<1分钟)
- 需要Notion应用程序:必须安装并登录桌面应用程序
故障排除
“找不到Notion数据库”
- 确保已安装Notion桌面应用程序
- 打开Notion应用程序并让其同步
- 检查文件是否存在:
ls ~/Library/Application\ Support/Notion/notion.db
陈旧数据
Notion通过频繁同步在本地缓存数据。如果数据似乎过时:
- 打开Notion应用程序
- 导航到页面/数据库
- 等待几秒钟进行同步
- 通过MCP重新查询
许可证
麻省理工学院
受启发于
- 线性mcp快速 -线性的概念相同
韩语
用于Notion的高速只读MCP服务器 -直接从本地SQLite缓存读取,无需API调用。
为什么要制作呢?
官方Notion MCP每次调用API:
- 缓慢:每个请求的网络延迟
- 限制:应用API调用限制
- 沉重:响应较大,需要AI上下文窗口
概念mcp快速直接从本地SQLite缓存读取:
- 立即响应:无网络呼叫,<10 ms响应
- 无限:无API限制
- 轻巧:简洁明了的回答
要求
- 仅限MacOS (Notion将SQLite缓存存储在特定的MacOS路径中)
- Notion桌面应用程序 需要安装和登录
- Python 3.10+
安装
git clone https://github.com/lucid-jin/notion-mcp-fast.git
cd notion-mcp-fast
设置
克劳德代码
# MCP 서버 추가 (절대 경로 사용)
claude mcp add notion-fast -- uvx --from /path/to/notion-mcp-fast notion-mcp-fast
# 홈 디렉토리 예시
claude mcp add notion-fast -- uvx --from ~/notion-mcp-fast notion-mcp-fast
克劳德桌面版
~/Library/Application Support/Claude/claude_desktop_config.json 编辑:
{
"mcpServers": {
"notion-fast": {
"command": "uvx",
"args": ["--from", "/path/to/notion-mcp-fast", "notion-mcp-fast"]
}
}
}
交付工具
| 工具 | 说明 |
|---|---|
list_pages |
页面列表(支持搜索/筛选器) |
get_page |
页面详细信息+子块 |
list_databases |
数据库列表 |
get_database 查询数据库模式 |
|
query_database 查询数据库行 |
|
list_users |
用户列表 |
get_user |
用户详细信息 |
list_spaces |
工作空间列表 |
search |
按标题搜索全部内容 |
get_summary |
缓存统计信息 |
工作原理
Notion 데스크톱 앱
↓ (로컬 동기화)
~/Library/Application Support/Notion/notion.db (SQLite)
↓ (직접 읽기)
notion-mcp-fast (5분 TTL 캐시)
↓ (MCP 프로토콜)
Claude / AI 어시스턴트 → 즉시 응답!
性能
| 状况 | 响应时间 |
|---|---|
| Cold cache(第一个请求)~5秒 | |
| Warm cache(后续请求) | <1ms |
限制
- 只读:无法创建/修改Notion内容
- 仅限MacOS:SQLite路径固定在macOS上
- 缓存延迟:同步Notion应用程序后反映(通常<1分钟)
- 需要应用程序:需要安装Notion桌面应用程序
故障排除
“Notion database not found”错误
- 验证Notion桌面应用程序的安装
- 打开Notion应用程序,等待同步
- 确认文件存在:
ls ~/Library/Application\ Support/Notion/notion.db
数据已过期
- 打开Notion应用程序
- 转到相应的页面/数据库
- 等待几秒钟(同步)
- 重新查看MCP
