Notion Integration
STDIOA standardized interface for AI models to access and modify Notion workspace content.
A standardized interface for AI models to access and modify Notion workspace content.
A Model Context Protocol (MCP) server for integrating with Notion workspaces. This server provides a standardized interface for AI models to access, query, and modify content in Notion.
Clone this repository:
git clone https://github.com/yourusername/notion-mcp-server.git
cd notion-mcp-server
Install dependencies:
npm install
Create a .env
file in the root directory with your Notion API key:
# Required
NOTION_API_KEY=your_notion_api_key_here
# Optional settings
DEBUG=false
REQUIRE_CONFIRMATION_FOR_CREATE=true
REQUIRE_CONFIRMATION_FOR_UPDATE=true
REQUIRE_CONFIRMATION_FOR_DELETE=true
UPDATE_POLLING_INTERVAL=60000
MAX_BLOCK_DEPTH=3
BACKUP_DIR=./backups
BACKUP_RETENTION_DAYS=30
MAX_BACKUPS_PER_PAGE=5
Build the project:
npm run build
Start the server:
npm start
To use this Notion MCP server with Claude for Desktop:
Ensure Claude for Desktop is installed and updated to the latest version
Open Claude for Desktop's configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Add the server configuration:
{ "mcpServers": { "notion": { "command": "node", "args": ["/path/to/notion-mcp-server/build/index.js"], "env": { "NOTION_API_KEY": "your_notion_api_key_here" } } } }
Save the file and restart Claude for Desktop
The server exposes the following resources:
Resource URI | Description |
---|---|
notion://databases | Lists all databases in the workspace |
notion://databases/{databaseId}/schema | Retrieves the schema of a specific database |
notion://databases/{databaseId}/content | Retrieves all pages/items from a specific database |
notion://pages/{pageId} | Retrieves the content of a specific page |
notion://updates | Retrieves recent updates and changes in the workspace |
The server provides the following tools:
The server includes these pre-configured prompts:
Prompt Name | Description |
---|---|
upcoming-deadlines | Get a list of upcoming deadlines |
project-status | Summarize the status of a project |
daily-tasks | Get a list of tasks for today |
Once connected to Claude, you can ask natural language questions about your Notion workspace:
To add new functionality:
index.ts
index.ts
index.ts
notion-api.ts
Check server logs for detailed error information: