A Model Context Protocol (MCP) server that exposes the official Notion SDK, allowing AI models to interact with Notion workspaces.
- Go to https://www.notion.so/my-integrations
- Create a new integration
- Copy the API key
Add the following command to your AI assistant's MCP server configuration:
npx @ramidecodes/mcp-server-notion@latest -y --api-key=your-notion-integration-key
Replace your-notion-integration-key
with the API key from step 1.
- Open Claude Desktop
- Go to Settings > Advanced > Model Context Protocol
- Add a new MCP server with the command above
- Save and restart Claude
- Open Cursor AI
- Go to Settings > AI > MCP Servers
- Add a new MCP server with the command above
- Save settings
The server provides tools for interacting with Notion:
- Search: Find pages or databases
- Databases: Query and retrieve database entries
- Pages: Create, retrieve, and update pages
- Blocks: Manage content blocks (paragraphs, lists, etc.)
- Users: List users and get user information
- Comments: Create and list comments
- Link Previews: Create link previews for URLs
Instead of passing the API key directly, you can use a .env
file:
- Create a
.env
file with:
NOTION_API_KEY=your-notion-integration-key
- Run the server:
npx @ramidecodes/mcp-server-notion@latest -y
OPTIONS:
-h, --help Show help message
-v, --version Show version information
--verbose Enable verbose logging
--env-path <path> Path to .env file
--api-key <key> Notion API key
-y Skip confirmation prompts
If you encounter "Failed to create client" errors:
- On Windows, try using
cmd /c
before the npx command - On macOS/Linux, try using the full path to npx
- Test the command in a terminal before adding it to your AI assistant
- Full Notion API support through the official SDK
- MCP compliant for seamless AI integration
- Comprehensive tools for all Notion operations
- Robust error handling with detailed messages
- Easy configuration with environment variables
For detailed documentation on each tool, see the Tools Documentation.
This project is licensed under the MIT License - see the LICENSE file for details.