This is a submission for the Notion MCP Challenge
"The best way to predict the future is to build it. The fastest way to build it is with Cortex." β Modern Founder Proverb π§ββοΈ
What I Built
Cortex is a state-of-the-art CLI agent designed to eliminate the "Organization Tax" that kills startup momentum. Instead of spending hours manually setting up Notion pages, roadmaps, and competitor analyses, Cortex turns a single idea prompt into a fully structured, modular empire in Notion in under 30 seconds.
π Key Features:
-
π‘ Premium Strategy Briefs (
idea:): Generates high-end strategy documents using native Notion Callouts, Quotes, and structured Hierarchies. -
π Jira-Style Roadmap (
tasks:): Creates a native Notion Database with AI-calculated Priority, Status, and Deadlines. -
π User Persona Stories (
stories:): Maps personas to actions and business value in a dedicated database. -
ποΈ Full-Stack Startup Build (
build:): Launches a complete "Enterprise Workspace" including both databases and 5 strategy pages in one unified hierarchy.
Video Demo
(See Cortex in action: From an empty terminal to a 7-page populated Notion ecosystem with dual databases!)
Show us the code
The entire project is open-source and built with TypeScript, Node.js, and the Model Context Protocol.
GitHub Repository: https://github.com/RamanSharma100/cortex-notion
How I Used Notion MCP
Cortex isn't just a simple API wrapper; it's a sophisticated orchestration of the Model Context Protocol (MCP).
The Implementation
We use @modelcontextprotocol/sdk/client to manage a live stdio transport connection with the @notionhq/notion-mcp-server. This allows the AI to execute high-level tools via the same protocol used by tools like Claude Desktop and Cursor.
// Spawn the Notion MCP server as a subprocess
const transport = new StdioClientTransport({
command: 'npx',
args: ['@notionhq/notion-mcp-server'],
env: {
OPENAPI_MCP_HEADERS: JSON.stringify({
Authorization: `Bearer ${token}`,
'Notion-Version': '2022-06-28',
}),
},
});
const client = new Client(
{ name: 'notion-cortex', version: '1.0.0' },
{ capabilities: {} },
);
await client.connect(transport);
// Write to Notion via MCP tool calls, NOT a direct REST API
await client.callTool({
name: "API-post-page",
arguments: {
parent: { workspace: true },
properties: { title: { title: [{ text: { content: "New Startup" } }] } }
}
});
What it Unlocks
- Rich Structural Integrity: By using MCP tool calls, we can reliably convert Markdown (headers, quotes, callouts) into native Notion block objects on-the-fly.
- Resilient Multi-Model Architecture: Cortex cycles through a Gemini Array (3.1 Pro, 3 Flash, 2.5 Flash) with GPT-4.1 as a fail-safe. If one model hits a rate limit, the MCP connection remains stable while the CLI intelligently pivots to the next model.
-
Complex Data Relations: MCP makes it trivial to inject complex database properties like
Status,Select, andDatewithout manually constructing massive JSON payloads for the REST API.
βWhy did the startup founder cross the road?β
βTo find a more sustainable way to disrupt the other side.β π π
Seriously, the goal of Cortex is to eliminate the friction of starting. Stop clicking, start building.
Top comments (0)