Notion API for workspace automation.
## Notion API MCP Server: Advanced Integration The **Notion API MCP Server** provides deep access to Notion's API from Google Antigravity, enabling advanced database operations, block manipulation, and automation through AI-assisted workflows. ### Why Notion API MCP? - **Full API Coverage**: Access all Notion API endpoints - **Complex Queries**: Build sophisticated database queries with filters - **Bulk Operations**: Efficient batch operations for large datasets - **Webhook Support**: React to changes with webhook integrations - **OAuth Integration**: Build multi-user Notion integrations ### Key Features #### 1. Advanced Database Operations ```python # Create database database = await notion_api.createDatabase({ "parent": { "page_id": "page_123" }, "title": [{ "text": { "content": "Task Tracker" } }], "properties": { "Name": { "title": {} }, "Status": { "select": { "options": [ { "name": "Todo", "color": "gray" }, { "name": "In Progress", "color": "blue" }, { "name": "Done", "color": "green" } ] } }, "Assignee": { "people": {} }, "Due Date": { "date": {} }, "Priority": { "number": { "format": "number" } } } }) # Complex query with filters results = await notion_api.queryDatabase({ "database_id": database.id, "filter": { "and": [ { "property": "Status", "select": { "does_not_equal": "Done" } }, { "property": "Due Date", "date": { "on_or_before": "2024-12-31" } } ] }, "sorts": [ { "property": "Priority", "direction": "descending" }, { "property": "Due Date", "direction": "ascending" } ] }) ``` #### 2. Block Operations and Comments ```python # Get block children recursively async def get_all_blocks(block_id): blocks = await notion_api.getBlockChildren(block_id) for block in blocks: if block.has_children: block.children = await get_all_blocks(block.id) return blocks # Add comment to page await notion_api.createComment({ "parent": { "page_id": "page_123" }, "rich_text": [{ "text": { "content": "Review completed" } }] }) # Delete block await notion_api.deleteBlock({ "block_id": "block_to_delete" }) ``` ### Configuration ```json { "mcpServers": { "notion-api": { "command": "npx", "args": ["-y", "@anthropic/mcp-notion-api"], "env": { "NOTION_API_KEY": "your-integration-token", "NOTION_VERSION": "2022-06-28" } } } } ``` ### Use Cases **Database Automation**: Build automated workflows that create and update database entries. **Content Migration**: Migrate content to Notion from other platforms programmatically. **Custom Integrations**: Build bespoke Notion integrations for specific workflows. The Notion API MCP Server enables sophisticated Notion automation at scale.
{
"mcpServers": {
"notion-api": {}
}
}