DEV Community

Cover image for Jems - Your life, brilliantly organized
ABINJITH TK
ABINJITH TK

Posted on

Jems - Your life, brilliantly organized

Notion MCP Challenge Submission ๐Ÿง 

This is a submission for the Notion MCP Challenge

What I Built

Most AI assistants are a single chatbot trying to do everything. Jems flips that โ€” it's a group chat of four specialist AI agents that collaborate in real time, and they use Notion as their shared workspace.

You send one message. All four agents see it, discuss it internally, and the most relevant one responds โ€” like a WhatsApp group, except your friends are AI experts who never forget and always coordinate.

The agents:

๐ŸŸข Noor โ€” The Orchestrator. Your main point of contact. Routes messages, synthesizes responses, handles real-time voice streaming. Reads your Notion workspace for context โ€” meeting notes, project docs, personal wiki โ€” to ground every response in your actual life.

๐ŸŸก Kai โ€” The Planner. Owns your schedule, tasks, and reminders. When you say "plan my week," Kai creates structured task entries directly in your Notion Tasks database โ€” with due dates, priorities, time estimates, and status tracking. Not a text dump โ€” real, filterable, sortable database rows.

๐Ÿฉท Sage โ€” The Growth Coach. Tracks goals, monitors progress, nudges when things stall. Maintains a Goals dashboard in Notion with milestones, completion percentages, and weekly progress updates. Surfaces social briefings and peer accountability.

๐ŸŸฃ Echo โ€” The Memory Keeper. Journals your thoughts, remembers what you said weeks ago, spots mood patterns. Creates rich Notion pages for journal entries with metadata tags โ€” timestamps, mood indicators, topics โ€” making your inner life searchable and reflective.

The magic is shared context. When Kai creates a task, Echo remembers it. When Sage updates a goal, Kai adjusts the plan. And all of it is visible as structured data in Notion โ€” full transparency into how your AI team thinks and acts.

The Spatial UI

This isn't a chat app โ€” it's an operating system. Five screens connected by a floating glassmorphism dock:

Route Screen Agent What Happens in Notion
/hub Command Hub Noor Reads Notion context for grounded responses
/schedule Planner Kai Creates/updates tasks and reminders in Notion DBs
/journal Infinite Board Echo Writes journal entries as rich Notion pages
/lounge Social Room Sage Tracks goals and progress in Notion dashboards
/ecosystem Connections โ€” Manage Notion MCP connection with guided setup

Pure white aesthetic. Glassmorphism. 3D clay-style agent spheres with kawaii faces. No dark mode. No clutter. Just flow.

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    ๐Ÿ“ฑ Flutter App                         โ”‚
โ”‚          Spatial UI ยท Glassmorphism ยท 3D Spheres          โ”‚
โ”‚                                                           โ”‚
โ”‚   /hub      /schedule     /journal     /lounge            โ”‚
โ”‚   Noor       Kai           Echo         Sage              โ”‚
โ”‚                                                           โ”‚
โ”‚   /ecosystem โ†’ MCP Connections (Notion setup UI)          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚ WebSocket bidi-streaming
                     โ”‚ (real-time voice + text)
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               โ˜๏ธ FastAPI on Cloud Run                     โ”‚
โ”‚            Google ADK Multi-Agent Runtime                  โ”‚
โ”‚                                                           โ”‚
โ”‚   ๐ŸŸข Noor โ†โ†’ ๐ŸŸก Kai โ†โ†’ ๐Ÿฉท Sage โ†โ†’ ๐ŸŸฃ Echo              โ”‚
โ”‚          (Live Bidi Agent Loop โ€” Group Chat)               โ”‚
โ”‚                                                           โ”‚
โ”‚   Gemini 2.5 Flash (voice) + Pro (reasoning + tools)      โ”‚
โ”‚                                                           โ”‚
โ”‚   Tools: Firestore ยท Google Search ยท MCP ยท A2A            โ”‚
โ”‚   Infra: Terraform ยท 7 Cloud Scheduler cron jobs          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚ MCP (Model Context Protocol)
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               ๐Ÿ““ Notion Workspace                         โ”‚
โ”‚                                                           โ”‚
โ”‚   ๐Ÿ“‹ Tasks DB       โ†’ Kai writes/reads/updates tasks      โ”‚
โ”‚   ๐ŸŽฏ Goals DB       โ†’ Sage tracks milestones + progress   โ”‚
โ”‚   ๐Ÿ“” Journal Pages  โ†’ Echo creates rich entries           โ”‚
โ”‚   ๐Ÿ“ก Agent Log      โ†’ All agents log their activity       โ”‚
โ”‚   ๐Ÿ“„ Context Pages  โ†’ Noor reads for grounded responses   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Enter fullscreen mode Exit fullscreen mode

Tech Stack

Layer Technology
Frontend Flutter ยท Custom spatial design system ยท Glassmorphism ยท 3D agent spheres
Backend FastAPI on Google Cloud Run ยท Google ADK multi-agent orchestration
AI Models Gemini 2.5 Flash (voice + streaming) ยท Gemini 2.5 Pro (reasoning + tools)
Data Firestore (users, tasks, goals, reminders, journal, messages, connections)
Storage Google Cloud Storage (proof uploads, memory files)
Auth Firebase Auth (JWT tokens) ยท Per-request ID token verification
Protocols MCP (Notion + extensible tools) ยท A2A (agent-to-agent social) ยท WebSocket bidi-streaming
Infra Terraform-managed ยท Artifact Registry ยท Secret Manager ยท 7 Cloud Scheduler cron jobs
Payments RevenueCat (subscriptions)
Notion Notion MCP Server โ€” agents read/write databases and pages in real time

Video Demo

Demo flow:

  1. User opens Jems โ†’ Noor greets with a morning briefing pulled from Notion context
  2. User says "Plan my week around the marathon" โ†’ message enters the agent loop
  3. Kai creates structured tasks in the Notion Tasks DB (visible in real time)
  4. Echo logs a journal entry about the marathon goal as a Notion page
  5. Sage checks goal alignment and updates the Goals dashboard in Notion
  6. Noor synthesizes everything into one response โ€” streamed live over WebSocket
  7. User swipes to /ecosystem โ†’ Notion MCP connection shown as active with guided setup UI

Find the code and MVP apk here

The codebase spans three layers. Here's how they connect through Notion MCP:

1. Flutter App โ€” MCP Connection Management

Users connect Notion from the Ecosystem screen (/ecosystem). The MCP connections page provides a native UI for managing servers, with Notion getting a dedicated guided setup flow:

// mcp_connections_page.dart โ€” Notion-specific token setup
if (isNotion) ...[
  Container(
    padding: const EdgeInsets.all(12),
    decoration: BoxDecoration(
      color: SpatialColors.surfaceSubtle,
      borderRadius: BorderRadius.circular(12),
    ),
    child: Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        Text('Quick steps:'),
        Text(
          '1. Go to notion.so/profile/integrations\n'
          '2. Click "New integration"\n'
          '3. Give it a name and select a workspace\n'
          '4. Copy the Internal Integration Secret\n'
          '5. Share pages/databases with the integration',
        ),
      ],
    ),
  ),
],
Enter fullscreen mode Exit fullscreen mode

The token is stored securely via the backend and immediately activates the Notion MCP toolset for all four agents:

// mcp_provider.dart โ€” Token management
Future<bool> updateToken(String serverId, String token) async {
  await _api.post('/api/mcp/servers/$serverId/token', body: {'token': token});
  await load(); // Refresh server list โ€” agents now have Notion access
  return true;
}
Enter fullscreen mode Exit fullscreen mode

2. Backend โ€” Agent Loop with MCP Tool Access

The backend runs on FastAPI with Google ADK orchestrating four Gemini-powered agents in a live bidi-streaming loop. Each agent has access to MCP tools โ€” including Notion โ€” through ADK's tool framework:

# Agent tool call flow (simplified)
# When Kai decides to create a task, it calls the Notion MCP tool:

# 1. User says "Plan my week"
# 2. Message enters the agent loop via WebSocket
# 3. Noor routes to Kai (scheduling topic detected)
# 4. Kai calls create_page via Notion MCP:

await mcp_client.call_tool(
    server="notion",
    tool="create_page",
    arguments={
        "parent": {"database_id": user_tasks_db_id},
        "properties": {
            "Name": {"title": [{"text": {"content": "Morning run โ€” marathon prep"}}]},
            "Due Date": {"date": {"start": "2026-03-31"}},
            "Priority": {"select": {"name": "High"}},
            "Status": {"select": {"name": "Not started"}},
            "Agent": {"select": {"name": "Kai"}},
        }
    }
)
Enter fullscreen mode Exit fullscreen mode

The WebSocket service streams responses token-by-token back to the Flutter app, with agent attribution so the UI knows which sphere to animate:

// ws_chat_service.dart โ€” Real-time bidi streaming
case 'event':
  final text = msg['text'] as String?;
  final author = msg['author'] as String?;
  if (author != null && author.isNotEmpty) {
    _streamingAuthor = author; // UI animates the correct agent sphere
  }
  if (text != null && text.isNotEmpty) {
    _streamBuffer += text; // Token-by-token streaming
    notifyListeners();
  }
Enter fullscreen mode Exit fullscreen mode

3. Infrastructure โ€” Proactive Agents via Cloud Scheduler

Seven Terraform-managed cron jobs trigger agents to proactively read from and write to Notion โ€” even when the user isn't in the app:

# deploy/main.tf โ€” 7 proactive agent jobs
locals {
  scheduler_jobs = {
    morning_briefing     = { schedule = "0 7 * * *"   }  # Kai reads Notion tasks, briefs user
    evening_journal      = { schedule = "0 21 * * *"  }  # Echo writes daily journal to Notion
    reminder_check       = { schedule = "*/5 * * * *" }  # Check due reminders
    plan_review          = { schedule = "0 18 * * *"  }  # Sage reviews goals in Notion
    smart_suggestions    = { schedule = "0 10,15 * * *"}  # Proactive suggestions
    memory_consolidation = { schedule = "0 3 * * *"   }  # Echo consolidates memory patterns
    goal_nudge           = { schedule = "0 12 * * *"  }  # Sage nudges stalled goals
  }
}
Enter fullscreen mode Exit fullscreen mode

This means your Notion workspace stays alive โ€” agents update it on schedule, not just when you're chatting.

How I Used Notion MCP

Notion MCP isn't a bolt-on feature in Jems โ€” it's the external workspace layer that makes the multi-agent architecture tangible. Here's exactly what it unlocks:

Agents write structured data, not text dumps

When you tell Jems "plan my week," the message enters the four-agent loop. Kai generates a plan and writes each task as a database row in your Notion Tasks DB โ€” with typed properties for due date, priority, time estimate, status, and which agent created it. This is real structured data you can filter, sort, group, and view in Notion's native UI. It's not a markdown blob pasted into a page.

Agents read your workspace for context

When Noor needs to answer a question, it queries your Notion workspace via MCP โ€” searching pages, reading database entries, pulling context from your meeting notes, project docs, or personal wiki. Your Notion workspace becomes a knowledge base that makes every agent response smarter and more grounded in your actual life.

Bidirectional โ€” changes flow both ways

Update a task status in Notion? The agents see it next time they check. Agents create a journal entry? It appears as a rich Notion page you can edit, share, or embed anywhere. Notion isn't a write-only destination โ€” it's a living collaboration surface between you and your AI team.

Multi-agent coordination is visible in Notion

This is the most powerful pattern. When you say "I've been stressed about the marathon":

  1. Kai checks your training schedule in the Notion Tasks DB
  2. Sage reviews your fitness goal progress in the Goals DB
  3. Echo recalls that journal entry about knee pain from last week
  4. Noor synthesizes it all into one thoughtful response

Each agent's contribution is logged in Notion โ€” you can see exactly what your AI team considered, what tools they called, and what data they used. Full transparency.

Proactive agents keep Notion alive

The 7 Cloud Scheduler cron jobs mean agents don't wait for you to open the app. Every morning, Kai reads your Notion tasks and prepares a briefing. Every evening, Echo writes a journal summary. Every noon, Sage checks if your goals are stalling. Your Notion workspace evolves on its own โ€” like having a team that works while you sleep.

MCP as a first-class, user-facing feature

In the Ecosystem screen (/ecosystem), users manage their MCP connections with a native Flutter UI. Notion has a dedicated setup flow with step-by-step instructions for creating an integration and sharing pages. Add your token, and all four agents immediately gain workspace access. The MCP protocol means this isn't a hardcoded Notion integration โ€” it's a standard that works with any MCP-compatible server. Users can add GitHub, Calendar, or any other MCP server the same way.

What this creates

The combination of multi-agent AI + Notion MCP + proactive scheduling creates something that doesn't exist yet: an AI operating system that lives inside your real workspace. Your agents don't operate in a silo โ€” they operate in Notion, alongside your real documents, real projects, and real life. You get the intelligence of four specialist AIs with the transparency and control of Notion.

That's not a chatbot. That's a team.

Top comments (0)