Awesome
Notion MCP Server
A Model Context Protocol (MCP) server that provides seamless integration with Notion. This server enables LLMs to interact with your Notion workspace through standardized tools for searching, reading, creating, and updating pages.
Features
- 🔍 Search Pages: Search through your Notion workspace
- 📖 Read Pages: Retrieve content from any Notion page
- ✍️ Create Pages: Create new pages with titles and content
- 🔄 Update Pages: Append or modify content in existing pages
Prerequisites
- Node.js (v16 or higher)
- A Notion account and API key
- MCP-compatible client (e.g., Claude Desktop)
Installation
- Clone the repository:
git clone https://github.com/v-3/notion-server.git
cd notion-server
- Install dependencies:
npm install
- Create a
.env
file in the root directory:
NOTION_API_KEY=your_notion_api_key_here
- Build the server:
npm run build
Usage with Claude Desktop
- Add the server to your Claude Desktop configuration (
claude_desktop_config.json
):
{
"mcpServers": {
"notion": {
"command": "node",
"args": ["/absolute/path/to/notion-server/build/index.js"],
"env": {
"NOTION_API_KEY": "your_notion_api_key_here"
}
}
}
}
-
Restart Claude Desktop
-
The following tools will be available:
search_pages
: Search for Notion pagesread_page
: Read content from a specific pagecreate_page
: Create a new pageupdate_page
: Update an existing page
Available Tools
search_pages
Search through your Notion pages.
{
query: string // Search query
}
read_page
Read the content of a specific Notion page.
{
pageId: string // ID of the page to read
}
create_page
Create a new Notion page.
{
title: string, // Page title
content: string, // Page content in markdown format
parentPageId?: string // Optional parent page ID
}
update_page
Update an existing Notion page.
{
pageId: string, // ID of the page to update
content: string, // New content to append
type?: "paragraph" | "task" | "todo" | "heading" | "image" // Optional content type
}
Security Considerations
- Store your Notion API key securely
- The server has read and write access to your Notion workspace
- Consider implementing additional access controls based on your needs
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.