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
Visit Server

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>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured