Notion MCP

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Integrates with Notion's API to manage personal todo lists, providing functions to show all tasks, add new tasks, and update existing tasks in a Notion workspace.

notion-mcp

一个简单的模型上下文协议 (MCP) 服务器,与 Notion 的 API 集成来管理我的个人待办事项列表。

演示

视觉指南

Notion MCP 查询 1

Notion MCP 查询 2

Notion MCP 查询 3

先决条件

  • Python 3.11 或更高版本
  • 具有 API 访问权限的 Notion 帐户
  • Notion 集成代币
  • 您想要管理待办事项列表的 Notion 页面
  • 克劳德桌面克林特

设置

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 Notion MCP:

npx -y @smithery/cli install @Badhansen/notion-mcp --client claude
  1. 克隆存储库:
git clone https://github.com/Badhansen/notion-mcp.git cd notion-mcp
  1. 设置Python环境:
uv venv source .venv/bin/activate uv pip install -e .
  1. 创建 Notion 集成:
  2. 通过集成共享您的数据库/页面:
    • 使用数据库/表或页面打开您的概念工作区。
    • 点击“…”菜单→“添加连接”
    • 选择您的集成(按名称搜索)

配置

  1. 创建.env文件:
cp .env.example .env
  1. .env中配置 Notion 凭证:
NOTION_TOKEN=<your-notion-api-token> PAGE_ID=<your-notion-page-id> NOTION_VERSION="2022-06-28" NOTION_BASE_URL="https://api.notion.com/v1"
  1. 要按预期将其与 Claude Desktop 一起使用,您需要调整claude_desktop_config.json文件。前往Claude Desktop -> Settings -> Developer -> Edit Config 。现在添加Notion服务器配置。
{ "mcpServers": { "notion-mcp": { "command": "uv", "args": [ "--directory", "/Users/username/Projects/Python/notion-mcp/src" /* Path to your project */, "run", "server.py" ] } } }

发展

项目结构:

notion-mcp/ ├── docs/ ├── src/ │ └── server.py ├── .env ├── .python-version ├── README.md ├── pyproject.toml └── uv.lock

支持功能

显示任务

要显示 Notion 工作区中的所有任务,请使用show_all_todos函数:

{ "name": "show_all_todos", "arguments": {} }

添加任务

要向 Notion 工作区添加新任务,请使用add_todo函数:

{ "name": "add_todo", "arguments": { "task": "Your task description" } }

更新任务

要更新 Notion 工作区中的现有任务,请使用complete_todo函数:

{ "name": "complete_todo", "arguments": { "task_id": "your-task-id" } }

贡献

  1. 分叉存储库
  2. 创建功能分支
  3. 提交拉取请求

执照

MIT 许可证。详情请参阅 LICENSE 文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

模型上下文协议服务器与 Notion 的 API 集成以管理个人待办事项列表,允许用户直接从 Claude 查看、添加和更新任务。

  1. Demo
    1. Visual Guide
      1. Notion MCP Query 1
      2. Notion MCP Query 2
      3. Notion MCP Query 3
    2. Prerequisites
      1. Setup
        1. Installing via Smithery
      2. Configuration
        1. Development
          1. Support Functions
            1. Show Tasks
            2. Add Task
            3. Update Task
          2. Contributing
            1. License
              ID: 02p0quowuj