notion-agent-hub

notion-agent-hub

An MCP server that connects AI assistants to Notion, enabling automated research, GitHub tracking, and content pipelines with human-in-the-loop approval via a Notion task queue.

Category
访问服务器

README

🤖 Notion Agent Hub

AI Agent Hub for Notion — orchestrate AI agents through Notion databases with human-in-the-loop approval. Built with MCP.

<!-- Hero Banner --> <div align="center">

Notion MCP TypeScript

Turn your Notion workspace into an AI command center.

Quick Start · Architecture · Tools · Agents · Setup Guide

</div>


✨ What It Does

Notion Agent Hub is an MCP server that connects AI assistants (Claude, GPT, etc.) to your Notion workspace. It provides:

  1. 🔍 Research Agent — Search the web, compile findings, and write structured research pages to Notion
  2. 🔄 GitHub Tracker — Monitor GitHub PRs and sync their status to a Notion database
  3. 📝 Content Pipeline — Read outlines from Notion, generate drafts, and submit for human review

All tasks flow through a Notion-native task queue with human-in-the-loop approval — you stay in control.

🏗 Architecture

graph TB
    subgraph "AI Assistant"
        C[Claude / GPT / etc.]
    end

    subgraph "MCP Server — notion-agent-hub"
        direction TB
        S[Server Entry Point]

        subgraph "Tools Layer"
            NR[📖 notion-read]
            NW[✏️ notion-write]
            NQ[🔎 notion-query]
            WS[🌐 web-search]
            CR[💻 code-run]
        end

        subgraph "Agent Layer"
            RA[🔬 Research]
            GT[🔄 GitHub Tracker]
            CP[📝 Content Pipeline]
        end

        TQ[📋 Task Queue]
    end

    subgraph "Your Notion Workspace"
        TD[(Task Database)]
        RP[Research Pages]
        DP[Draft Pages]
        PR[(PR Tracker DB)]
    end

    C <-->|MCP Protocol| S
    S --> NR & NW & NQ & WS & CR
    TQ -->|Poll| TD
    RA -->|Write| RP
    GT -->|Sync| PR
    CP -->|Write| DP
    TD -->|Human creates tasks| TQ

🚀 Quick Start

1. Clone & Install

git clone https://github.com/tysoncung/notion-agent-hub.git
cd notion-agent-hub
npm install

2. Configure

cp .env.example .env

Edit .env with your keys:

NOTION_API_KEY=ntn_your_integration_secret
NOTION_DATABASE_ID=your_task_database_id
OPENAI_API_KEY=sk-your_openai_key  # Optional

📖 See the Setup Guide for detailed instructions on creating a Notion integration and task database.

3. Build & Run

npm run build
npm start

4. Connect to Claude Desktop

Add to your Claude Desktop config:

{
  "mcpServers": {
    "notion-agent-hub": {
      "command": "node",
      "args": ["/path/to/notion-agent-hub/dist/index.js"],
      "env": {
        "NOTION_API_KEY": "ntn_your_key",
        "NOTION_DATABASE_ID": "your_db_id"
      }
    }
  }
}

🛠 Tools

notion-read

Read pages, databases, and blocks from Notion.

Input:  { page_id?: string, database_id?: string, block_id?: string }
Output: Page content with properties and child blocks

notion-write

Create or update Notion pages with rich content.

Input:  { action: "create" | "update" | "append", parent_id?, page_id?, title?, blocks? }
Output: { id, url, created/updated/appended: true }

Supported block types: paragraph, heading_1/2/3, bulleted_list_item, numbered_list_item, toggle, quote, callout, divider, code

notion-query

Query databases with filters and sorting.

Input:  { database_id, filter?, sorts?, page_size? }
Output: { results: [...pages], has_more, next_cursor }

web-search

Search the web using Brave Search (or DuckDuckGo fallback).

Input:  { query: string, count?: number }
Output: { results: [{ title, url, snippet }], source }

code-run

Execute JavaScript in a sandboxed environment (Node.js vm module).

Input:  { code: string, timeout_ms?: number }
Output: { success, result?, stdout, stderr }

🤖 Agent Workflows

🔬 Research Agent

Input: Topic + parent page ID
Process: Web search → compile sources → create structured Notion page
Output: Research page with sources, findings, and review checklist

🔄 GitHub Tracker

Input: GitHub repo + Notion database ID
Process: Fetch PRs → compare with existing entries → create/update pages
Output: Synced PR database in Notion

📝 Content Pipeline

Input: Outline page ID + parent page ID
Process: Read outline → (optional research) → generate draft → create page
Output: Draft page with review checklist, ready for human editing

🔄 Human-in-the-Loop

The task queue uses your Notion database as the control plane:

You create a task          →  Status: Pending
Agent picks it up          →  Status: Running
Agent writes results       →  Status: Done ✅
Something went wrong?      →  Status: Failed ❌ (with error details)

You're always in control. Tasks only run when you create them. Results are always written back to Notion for your review.

Task Database Schema

Property Type Description
Name Title Task description
Status Status Pending → Running → Done/Failed
Type Select research / github-tracker / content-pipeline
Input Text JSON input parameters
Output Text JSON results
Error Text Error message (if failed)

📸 Demo

<!-- TODO: Add demo GIF showing the workflow --> Demo

🧪 Development

# Run tests
npm test

# Watch mode
npm run test:watch

# Type checking
npm run lint

# Build
npm run build

# Dev mode (watch + rebuild)
npm run dev

📜 License

MIT — see LICENSE.


<div align="center">

Built for the Notion MCP Challenge 🏆

Powered by Model Context Protocol

</div>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选