Used for loading environment variables from a .env file, specifically to securely store and access the Dify API key needed for the Notion knowledge base connection.
Provides access to a Notion knowledge base, allowing users to query their Notion content directly, receive detailed answers with references to specific Notion pages, and view related page IDs.
Notion Knowledge Base MCP Server
An MCP server that provides access to a Notion knowledge base through the Cline VSCode extension.
Features
Query your Notion knowledge base directly from Cline
Get detailed answers with references to Notion pages
Built with FastMCP for reliable performance
Comprehensive error handling and logging
Prerequisites
Python 3.10 or higher
uv package manager
A Dify API key for accessing the Notion knowledge base
Installation
Clone this repository:
git clone https://github.com/yourusername/notion-mcp-server.git cd notion-mcp-serverCreate a
.env
file with your Dify API key:echo "DIFY_API_BACKEND_KEY=your-api-key-here" > .envInstall the server in Cline:
fastmcp install notion_mcp_server.pyThis will automatically:
Install all required dependencies using uv
Configure the server in Cline's settings
Make the server available to use with Cline
Usage
Once installed, you can use the server in Cline by asking questions about your Notion knowledge base. For example:
The server will respond with relevant information from your Notion knowledge base, including:
Detailed answers
Links to relevant Notion pages
Page IDs for reference
Configuration
The server is configured automatically during installation, but you can manually update the settings in Cline's configuration file if needed:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Example configuration:
Development
For development and testing:
Install dependencies:
pip install -r requirements.txtRun the development server:
fastmcp dev notion_mcp_server.py
This will start the MCP Inspector interface for testing the server.
Troubleshooting
Server not connecting
Verify your API key in the
.env
fileEnsure the server path in Cline's config is absolute
Check that uv is installed and in your PATH
Dependencies issues
Try reinstalling with
fastmcp install notion_mcp_server.py --force
Verify uv is installed correctly
Server hangs
Ensure you're using the uv run command as specified in the config
Check the server logs for errors
Contributing
See mcp_instructions.md for detailed information about the server's implementation and architecture.
License
MIT
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
An MCP server that connects to your Notion knowledge base, allowing you to query and retrieve information directly from VSCode using the Cline extension.
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityMCP Server for the Notion API, enabling Claude to interact with Notion workspaces.Last updated -18564818MIT License
- AsecurityAlicenseAqualityCline MCP integration that allows users to save, search, and format memories with semantic understanding, providing tools to store and retrieve information using vector embeddings for meaning-based search.Last updated -127MIT License
- AsecurityAlicenseAqualityNotion MCP Server is a MCP server implementation that enables AI assistants to interact with Notion's API.Last updated -13199133MIT License
- -securityAlicense-qualityAn MCP server that enables natural language interaction with the Notion API, allowing users to search, comment, create pages, and access content within their Notion workspace.Last updated -12,300MIT License