by v-3
A Model Context Protocol (MCP) server that provides seamless integration with Notion, enabling Language Models to interact with your Notion workspace through standardized tools for searching, reading, creating, and updating pages and databases.
Notion MCP Server is a Model Context Protocol (MCP) server designed to bridge the gap between Language Models (LMs) and Notion workspaces. It allows LMs to programmatically interact with Notion, performing operations like searching, reading, creating, and updating pages and databases. This facilitates automation and enhanced productivity by enabling LMs to manage information within Notion.
To use Notion MCP Server, you need Node.js (v16 or higher), a Notion API key, and an MCP-compatible client like Claude Desktop. After cloning the repository and installing dependencies, you'll set up your Notion API key in a .env
file or as an environment variable. The server then needs to be built using npm run build
. For integration with Claude Desktop, you'll configure its mcpServers
setting to point to the built server. You also need to create a Notion integration with appropriate permissions and connect it to the Notion pages you wish to access.
Q: What are the prerequisites for running Notion MCP Server? A: You need Node.js (v16 or higher), a Notion API key, and an MCP-compatible client (e.g., Claude Desktop).
Q: How do I set up my Notion API key?
A: You can set it up in a .env
file (e.g., echo "NOTION_API_KEY=your_notion_api_key_here" > .env
) or export it directly as an environment variable.
Q: What Notion permissions are required for the integration? A: For the integration, you should configure permissions for Content (Read, Update, Insert), Comments (Read, Create), and User Information (Read).
Q: Can I use Notion MCP Server with other MCP-compatible clients besides Claude Desktop? A: Yes, it is designed to work with any MCP-compatible client.
Q: Does Notion MCP Server support all Notion block types? A: It supports enhanced markdown with various block types, including headings, code blocks, todo items, blockquotes, dividers, images, and nested bullet points. It also supports block-level operations for updating and deleting.
Q: How can I contribute to the Notion MCP Server project? A: You can contribute by forking the repository, creating a feature branch, and submitting a Pull Request.
A Model Context Protocol (MCP) server that provides seamless integration with Notion. This server enables Language Models to interact with your Notion workspace through standardized tools for searching, reading, creating, and updating pages and databases.
git clone https://github.com/v-3/notion-server.git
cd notion-server
npm install
# Create .env file
echo "NOTION_API_KEY=your_notion_api_key_here" > .env
# Or export directly
export NOTION_API_KEY=your_notion_api_key_here
npm run build
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"
}
}
}
}
// Search pages
{
query: string // Search query
}
// Read page
{
pageId: string // ID of the page to read
}
// Create page
{
title?: string, // Page title
content?: string, // Page content in markdown
parentPageId: string // Parent page ID
properties?: object // For database items
}
// Update page
{
pageId: string, // Page ID to update
content: string, // New content
type?: string // Content type
}
// Create database
{
parentPageId: string,
title: string,
properties: object
}
// Query database
{
databaseId: string,
filter?: object,
sort?: object
}
const result = await notion.create_page({
parentPageId: "page_id",
title: "My Page",
content: "# Welcome\nThis is a test page."
});
const result = await notion.query_database({
databaseId: "db_id",
filter: {
property: "Status",
select: {
equals: "In Progress"
}
}
});
Contributions are welcome! Please:
This project is licensed under the MIT License - see the LICENSE file for details.
This project has been significantly improved by sweir1/notion-server, who has made following updates:
To use sweir1's version, you can clone their repository:
git clone https://github.com/sweir1/notion-server.git
Reviews feature coming soon
Stay tuned for community discussions and feedback