notion-server
by
What is notion-server
Notion MCP Server
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.
๐ Key Features
Page Operations
- ๐ Search through your Notion workspace
- ๐ Create new pages with rich markdown content
- ๐ Read page content with clean formatting
- ๐ Update existing pages
- ๐ฌ Add and retrieve comments
- ๐งฑ Block-level operations (update, delete)
Enhanced Markdown Support
- Multiple heading levels (H1-H3)
- Code blocks with language support
- Interactive todo items with checkbox states
- Blockquotes with multi-line support
- Horizontal dividers
- Images with captions
- Nested bullet points
Database Operations
- Create and manage databases
- Add and update database items
- Query with filters and sorting
- Support for various property types:
- Title, Rich text, Number
- Select, Multi-select
- Date, Checkbox
- And more!
๐ Getting Started
Prerequisites
- Node.js (v16 or higher)
- Notion 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
- Set up your environment:
# 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
- Build the server:
npm run build
๐ง Configuration
Claude Desktop Setup
- Update 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 to apply changes
๐ ๏ธ Available Tools
Page Operations
// 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
}
Database Operations
// Create database
{
parentPageId: string,
title: string,
properties: object
}
// Query database
{
databaseId: string,
filter?: object,
sort?: object
}
๐ Setting Up Notion Access
Creating an Integration
- Visit Notion Integrations
- Click "New integration"
- Configure permissions:
- Content: Read, Update, Insert
- Comments: Read, Create
- User Information: Read
Connecting Pages
- Open your Notion page
- Click "..." menu โ "Connections"
- Add your integration
- Repeat for other pages as needed
๐ Usage Examples
Creating a Page
const result = await notion.create_page({
parentPageId: "page_id",
title: "My Page",
content: "# Welcome\nThis is a test page."
});
Querying a Database
const result = await notion.query_database({
databaseId: "db_id",
filter: {
property: "Status",
select: {
equals: "In Progress"
}
}
});
๐ค Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
This project has been significantly improved by sweir1/notion-server, who has made following updates:
- Enhanced markdown support with more block types
- Comprehensive database operations
- Improved error handling and debugging
- Better property handling for database items
- Cleaner page output formatting
To use sweir1's version, you can clone their repository:
git clone https://github.com/sweir1/notion-server.git
Leave a Comment
Comments section will be available soon. Stay tuned!
Frequently Asked Questions
What is MCP?
MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.
What are MCP Servers?
MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.
How do MCP Servers work?
MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.
Are MCP Servers secure?
Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.
Related MCP Servers
Ableton Live MCP Server
MCP Server implementation for Ableton Live OSC control
Airbnb MCP Server
AI Agent Marketplace Index Search MCP Server
MCP Server for AI Agent Marketplace Index from DeepNLP
Algorand MCP Implementation
Algorand Model Context Protocol (Server & Client)
mcp-server-apache-airflow
pypi.org/project/mcp-server-apache-airflow/
airtable-mcp-server
๐๏ธ๐ค Airtable Model Context Protocol Server, for allowing AI systems to interact with your Airtable bases
Airtable MCP Server
Search, create and update Airtable bases, tables, fields, and records using Claude Desktop and MCP (Model Context Protocol) clients
Alphavantage MCP Server
A MCP server for the stock market data API, Alphavantage API.
Amadeus MCP Server
Amadeus MCP(Model Context Protocol) Server
Anki MCP Server
An MCP server for Anki
Submit Your MCP Server
Share your MCP server with the community
Submit Now