SuperAPIAI Directory

ankitmalik84/notion-mcp-server

github.com · AI developer platforms

This project is a Notion MCP server (V2.1.0) in the Agentic Longterm Memory system, used to integrate Notion workspaces with AI agents or chatbots. It implements the Model Context Protocol (MCP), providing features such as search, page reading and writing, content management, database queries, bookmarks and page links, workspace analytics, and bulk operations, and includes a FastAPI REST API, an interactive CLI, and a Python integration interface. The project emphasizes production-grade features such as input validation, error handling, timeout optimization, structured logging, health checks, and a comprehensive test suite.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux · API

About this tool

Purpose

This Notion MCP server is designed to provide AI agents or chatbots with a standard interface for interacting with Notion workspaces, and is part of the Agentic Longterm Memory system. It exposes Notion operation capabilities through the Model Context Protocol (MCP) and a REST API, enabling AI applications to search, read, create, and update Notion pages and database content.

Key Capabilities

  • Core Operations: Search pages and databases (with advanced filtering support), create/read/update pages, add paragraphs, headings, bulleted lists, to-dos, links, and bookmarks, and list and query databases.
  • Advanced Content Types: Supports bookmarks (external website links with URL validation) and in-page links (link_to_page), as well as all major Notion block types; long content is automatically split (2000+ characters).
  • Analytics and Insights: Workspace analytics (total page count, database count, recent activity), content structure analysis, activity tracking, and performance metrics (configurable timeouts).
  • Bulk Operations: Smart pagination prevents timeouts, supports bulk adding of content blocks and bulk creation and management of pages, with configurable limits and whether to count blocks.
  • API Interfaces: FastAPI REST API (production-ready HTTP endpoints), interactive CLI, MCP compatible, and a unified endpoint for AI agents.
  • Production Features: Comprehensive input validation and error handling, environment-based configuration management, intelligent error recovery, health checks and capability detection, structured logging, CORS support, and dynamic timeouts based on operation complexity.
  • Testing and Quality: A 46KB test suite (1,158 lines) covering 13+ test categories (core, content, bulk, links, analytics, edge cases, etc.), including validation tests, performance tests, and JSON reports.

Usage

  1. Prepare a Notion account and integration token (starting with ntn_), and share the target pages/databases with the integration.
  2. Install dependencies (pip or conda), and create a .env file in the project root to configure environment variables.
  3. Start the FastAPI server (default port 8081); you can visit /docs for API documentation and /health for health checks.
  4. You can also use the interactive CLI or integrate via Python code.
  5. The agent integration endpoint supports actions such as search, read_page, create_page, add_content, bulk_add_content, analytics, and bulk_operations.
  6. Run python test_server.py to execute the comprehensive test suite.

Applicable Scenarios

Suitable for scenarios that require deep integration of AI agents' or chatbots' long-term memory with Notion workspaces, such as automatically organizing notes, retrieving knowledge bases, bulk updating page content, and analyzing workspace activity.

Limitations

  • A valid Notion integration token is required, and pages/databases must be shared with the integration.
  • Content block length is limited to 2000 characters; content exceeding this is automatically split.
  • Bulk operations require attention to pagination limits (1-50 pages) and timeout settings.
  • Bookmark URLs must be valid HTTP/HTTPS addresses.
  • The project does not provide clear license information; confirm before use.
  • Details such as fees, pricing, and platform support are not yet provided.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools