How We Built a Dynamic Notion Sprint Backlog Manager with MCP

Build a custom MCP server in TypeScript that lets Claude dynamically manage Notion tasks with automatic schema detection.

miércoles, 29 de julio de 2026 • 4 min read • Q2BSTUDIO Team

Integración dinámica de Notion con el Protocolo de Contexto de Modelo

In today's software development ecosystem, integrating artificial intelligence agents with productivity tools like Notion has become a strategic necessity. However, most existing solutions suffer from rigidity: they assume fixed database schemas, making them fragile when the workspace is customized. At Q2BSTUDIO, specialists in custom software development, we have developed an approach that solves this problem at its core using the Model Context Protocol (MCP) and TypeScript. This article explains how to build a dynamic Notion sprint manager that automatically adapts to your database's real structure, without hardcoded code or manual configuration.

The Model Context Protocol, driven by Anthropic, defines an open standard for AI clients—such as Claude Desktop, Cursor, or VS Code—to communicate securely and uniformly with external tools. Instead of relying on hardcoded integrations, MCP allows the server to expose tools that the agent discovers and executes dynamically. Communication occurs through stdio (standard input and output), avoiding the complexity of websockets or constant polling. This simplifies the architecture and makes it ideal for local development environments and rapid prototyping.

The real challenge when integrating Notion with an AI agent is the flexibility of its databases. Each team names their properties differently: the title column can be 'Name', 'Task Name', or 'Título'; the status can be 'Status', 'Estado', or 'Phase'; and priority may vary between 'Priority', 'Prioridad', or even have custom options. If the code assumes specific names, any change in the workspace breaks the integration. Our solution implements dynamic schema discovery: every time a tool is executed, the server queries Notion's database metadata, identifies properties by their type and name patterns, and builds API requests accordingly.

The process begins with the resolveDatabaseProperties function, which receives the database ID and returns dynamic keys. It looks for a property of type 'title' for the name, then locates the status by checking whether it is a native Notion 'status' type or a 'select' field with names like status/estado. For priority, it inspects 'select' or 'status' properties whose options include terms such as high, medium, low, alta, media, baja. The due date is identified by type 'date' and common names (due date, fecha, entrega). This logic not only tolerates changes but also allows the server to work with multilingual workspaces without reconfiguration.

With the keys resolved, the payload construction for the Notion API adapts automatically. For example, if the status field is a modern 'status' property, it sends `{ status: { name: value } }`; if it is a 'select' field, it uses `{ select: { name: value } }`. This differentiation avoids validation errors that would occur with a static approach. The MCP server is implemented using the official MCP SDK (@modelcontextprotocol/server) and exposes tools like 'add_task_to_backlog', 'get_active_tasks', and 'update_task_status'. Each tool defines its input schema in JSON Schema, allowing Claude to infer the necessary parameters from the user's natural language.

Local setup is straightforward: clone the repository, install dependencies with npm, create a .env file with the Notion integration token and database ID, and compile the TypeScript. Then add the configuration to Claude Desktop's claude_desktop_config.json, specifying the absolute path to the compiled file and environment variables. After restarting Claude, a plug icon appears indicating a successful connection. The agent can then respond to requests like 'Show me the tasks in progress' or 'Add a task called 'Refactor login' with high priority and due date for tomorrow'.

This approach not only solves the technical problem but offers significant business value. Companies that maintain Notion-based workflows can now delegate sprint management to an AI agent, freeing time for higher-value tasks. Moreover, the dynamic architecture allows the system to evolve with the workspace without manual developer intervention. At Q2BSTUDIO, we apply the same philosophy to cloud AWS/Azure projects, cybersecurity, and Business Intelligence (Power BI), where adaptability is key to integrating AI agents into complex infrastructures.

For production deployments, the MCP Server can be extended wirelessly using Server-Sent Events (SSE) and Docker containers, facilitating execution on Google Cloud Run, Cloudflare Workers, or specialized agent orchestration services. This allows distributed teams to access the same agent from any environment, maintaining security through tokens and environment variables. Cybersecurity is a critical aspect: using the standard protocol with encryption and authentication prevents leakage of sensitive workspace information.

In short, building a dynamic Notion sprint manager with MCP and TypeScript is not only feasible but represents a qualitative leap in process automation. By adopting a dynamic schema, integrations become resilient, scalable, and maintainable. At Q2BSTUDIO, we believe the future of productivity lies in AI agents that understand real contexts, without being tied to predefined structures. We invite you to explore how we can apply these solutions to your business, whether in BI / Power BI, process automation, or custom software development.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.