Notion MCP Server is a Model Context Protocol (MCP) server implementation that enables AI assistants to interact with Notion's API. This production-ready server provides a complete set of tools and endpoints for reading, creating, and modifying Notion content through natural language interactions.
π§ Active Development: Database support is now available! If you find this project useful, please consider giving it a star - it helps me know that this work is valuable to the community and motivates further development.
- Getting Started & Integration
- Features
- Documentation
- Development
- Technical Details
- Troubleshooting
- Contributing
- License
-
Obtain a Notion API Key
- Create an integration at Notion Developers
- Copy your API key
-
Enable Integration for Your Pages
- Select an existing page or create a new one in Notion
- Click the "..." menu in the top right corner
- Go to "Connections"
- Find and enable your integration from the list
-
Choose Your Integration Method
- Follow one of the integration options below based on your preferred MCP client
-
Ask Your AI Assistant to Interact with Notion
- "Create a new page with today's tasks"
- "Update my meeting notes in Notion"
- "Add bullet points to my meeting notes page"
- "Create a new database for tracking projects"
- "Add new entries to my task database"
- Create or edit the
.cursor/mcp.json
file in your project directory:
{
"mcpServers": {
"notion-mcp-server": {
"command": "env NOTION_TOKEN=YOUR_KEY NOTION_PAGE_ID=YOUR_PAGE_ID npx",
"args": ["-y", "notion-mcp-server"]
}
}
}
- Replace
YOUR_KEY
andYOUR_PAGE_ID
with your actual Notion API key and page ID - Restart Cursor to apply the changes
- Open Cursor and go to Settings
- Navigate to the "MCP" or "Model Context Protocol" section
- Click "Add Server" or equivalent
- Enter the following command in the appropriate field:
env NOTION_TOKEN=YOUR_KEY NOTION_PAGE_ID=YOUR_PAGE_ID npx -y notion-mcp-server
- Replace
YOUR_KEY
andYOUR_PAGE_ID
with your actual Notion API key and page ID - Save the settings and restart Cursor if necessary
- Create or edit the
mcp.json
file in your configuration directory:
{
"mcpServers": {
"notion-mcp-server": {
"command": "npx",
"args": ["-y", "notion-mcp-server"],
"env": {
"NOTION_TOKEN": "YOUR_KEY",
"NOTION_PAGE_ID": "YOUR_PAGE_ID"
}
}
}
}
- Replace
YOUR_KEY
andYOUR_PAGE_ID
with your actual Notion API key and page ID - Restart Claude Desktop to apply the changes
- π Notion Integration - Interact with Notion databases, pages, and blocks
- π Universal MCP Compatibility - Works with all MCP clients including Cursor, Claude Desktop, Cline, and Zed
- π Data Retrieval - Fetch information from Notion pages, blocks, and databases
- βοΈ Content Creation - Create and update Notion pages and blocks
- π Block Management - Append, update, and delete blocks within Notion pages
- πΎ Database Operations - Create, query, and update databases
- π Batch Operations - Perform multiple operations in a single request
- ποΈ Archive & Restore - Archive and restore Notion pages
- π Search Functionality - Search Notion pages and databases by title
The server provides the following tools for interacting with Notion:
Create a new page in Notion with specified content
Update the properties of an existing Notion page
Archive (move to trash) a Notion page by ID
Restore a previously archived Notion page by ID
Search for pages and databases in Notion by title
Create a new database in Notion with specified properties
Query a database in Notion with filters, sorts, and pagination
Update an existing database's properties, title, or description
Retrieve a block from Notion by ID
Retrieve the children of a block from Notion
Append child blocks to a parent block in Notion
Update a block's content in Notion
Delete (move to trash) a block in Notion
Append children to multiple blocks in a single operation
Update multiple blocks in a single operation
Delete multiple blocks in a single operation
Perform a mix of append, update, and delete operations in a single request
The server currently does not expose any resources, focusing instead on tool-based operations.
-
Clone the Repository
git clone https://github.com/awkoy/notion-mcp-server.git cd notion-mcp-server
-
Install Dependencies
npm install
-
Set Up Environment Variables
- Create a
.env
file with:NOTION_TOKEN=your_notion_api_key NOTION_PAGE_ID=your_notion_page_id
- Create a
-
Build the Project
npm run build
-
Run the Inspector
npm run inspector
- Built using TypeScript and the MCP SDK (version 1.7.0+)
- Uses the official Notion API client (@notionhq/client v2.3.0+)
- Follows the Model Context Protocol specification
- Implements tools for CRUD operations on Notion pages, blocks, and databases
- Supports efficient batch operations for performance optimization
- Validates input/output with Zod schemas
-
Common Issues
- Authentication Errors: Ensure your Notion token has the correct permissions and integration is enabled for your pages/databases
- Page Access Issues: Make sure your integration has been added to the pages you're attempting to access
- Rate Limiting: Notion API has rate limits - use batch operations to optimize requests
-
Getting Help
- Create an issue on the GitHub repository
- Check the Notion API documentation
- Visit the MCP community channels for assistance
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.