DEV Community

Cover image for NexusTriage: Turning Notion into an Autonomous, Self-Healing System 🧠
Sofia
Sofia

Posted on

NexusTriage: Turning Notion into an Autonomous, Self-Healing System 🧠

Notion MCP Challenge Submission 🧠

This is a submission for the Notion MCP Challenge

The Problem: The Notion Graveyard πŸͺ¦

We all love Notion. But let’s be honest: over time, every workspace falls victim to Workspace Decay. Quick ideas dumped into the "Inbox" stay there forever. Projects get abandoned. Duplicate pages multiply. Before you know it, your perfectly structured workspace becomes a messy graveyard of information where it’s impossible to separate the signal from the noise.

To fix this, we usually dedicate hours of manual "cleanup time." But what if your workspace could clean, organize, and triage itself?

What I Built πŸš€

I built NexusTriage: a custom Model Context Protocol (MCP) server that transforms Notion from a passive data repository into an active, self-healing system managed by AI.

NexusTriage acts as a proactive "Human-in-the-Loop" workspace manager. Built from the ground up using TypeScript and the official MCP SDK, it doesn't just read and write pages. It orchestrates the entire workspace by:

  1. Autonomously Triaging Inbox Tasks: Reading raw thoughts and routing them to the correct active projects.
  2. Generating Executive Summaries: Scraping project progress and injecting visual AI summaries at the very top of project pages.
  3. Preventing Workspace Decay: Identifying duplicates, empty pages, and stale tasks, and proposing soft-deletion cleanups.
  4. Providing Visual Cues: Dynamically changing page icons (🚨, 🟒, πŸ›‘) and covers based on real-time project health.

Video Demo πŸŽ₯

πŸ’»

I've open-sourced the entire MCP server. It's built cleanly with a modular tool architecture, meaning anyone can add new capabilities in minutes.

🧠 NexusTriage β€” Autonomous Semantic Workspace Orchestrator

Transform Notion from a passive data repository into an active, context-aware system.

NexusTriage is a custom MCP (Model Context Protocol) server that gives AI assistants deep, structured access to your Notion workspace β€” enabling autonomous task triaging, executive summary generation, and workspace decay prevention.

Built for the Notion MCP Challenge on DEV.to.


✨ Features

πŸ” Context Readers (6 tools)

Tool Description
list_databases Discover all databases in the workspace
search_pages Find pages by text query
get_page_content Read full block content of any page (with pagination)
get_inbox_items Query inbox for untriaged items
get_active_projects Fetch projects with active status
get_database_schema Inspect database structure (properties, types, options)

✏️ Context Mutators (6 tools)

Tool Description
create_page Create new pages in any database
update_page Update page properties via flexible JSON
link_task_to_project Link tasks to projects via Relation property
inject_executive_summary 🌟 Insert callout at page START (new API feature!)
move_to_trash
…

How I Used Notion MCP (The Deep Dive) πŸ› οΈ

To build a system capable of semantic reasoning, my MCP server does far more than simple CRUD (Create, Read, Update, Delete) operations. I utilized the full potential of the Model Context Protocol paired with the bleeding-edge Notion API (Version: 2026-03-11).

Here is how the magic happens under the hood.

1. The Full MCP Triad: Tools, Prompts, and Resources

Most MCP implementations stop at simply providing "Tools". NexusTriage implements the entire triad to give the AI context, capability, and autonomy.

14 Context Tools (Readers & Mutators): I built 14 incredibly specific tools. For example, get_database_schemaallows the AI to dynamically reverse-engineer any unknown database's structure (properties, types, select options) without hardcoded mappings. link_task_to_projecthandles complex Notion Relations. get_page_commentsallows the AI to read human replies inside Notion, maintaining contextual chat history.

3 Semantic Orchestrations (Prompts): Instead of forcing the user to type complex instructions, I built MCP Prompts (triage_inbox, weekly_report, cleanup_workspace). These act as pre-defined logical workflows. By invoking the weekly_report prompt, the AI is automatically instructed on exactly how to fetch active projects, analyze blockers, and where to put the results.

Global Guidelines (Resources): I exposed a static workspace_guidelinesURI using MCP Resources. This acts as the "Rules of Engagement" for the AIβ€”teaching it ground rules like "never permanently delete a page, use in_trash: true", and "always leave an audit-trail comment when moving a task."

2. Utilizing Unreleased & Brand New Notion Capabilities

To make NexusTriage feel like native magic, I had to use features that standard integrations don't touch:

✨ The position: start Callout Injector
When the AI generates a weekly status report, nobody wants it buried at the bottom of a 50-block project brief. Using the newly introduced position: { type: "start" } feature in the Notion API, the inject_executive_summarytool forces the AI's callout block to appear at the absolute top of the page. The moment a team member opens the project, they see the AI's health summary instantly.

🎨 The update_page_style Tool
AI shouldn't just write text; it should manipulate UI. This tool allows the AI to dynamically change page emojis and covers based on its findings. If the AI detects a project is blocked, it changes the project icon to 🚨. If a task is successfully triaged, it gets a ✨.

πŸ—£οΈ True Human-in-the-Loop Dialogues
Triage isn't always black and white. If the AI finds an ambiguous task, it uses the add_commenttool to ping the human: "I can't tell if this is marketing or dev. Leaving it here for review." The user can literally reply to that comment inside Notion, and the next time the AI scans, it will use the get_page_commentstool to read the human's instruction and execute it.

Conclusion

NexusTriage proves that with MCP, AI doesn't just need to "read and write" your notes as a passive chatbot. It can be an active, localized agent that manages, triages, and curates your organization's workflow while you sleep.

Top comments (0)