notion_mcp_server
An MCP server that provides access to a Notion knowledge base through the Cline VSCode extension.
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
- Cline VSCode extension
- 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-server
-
Create a
.env
file with your Dify API key:echo "DIFY_API_BACKEND_KEY=your-api-key-here" > .env
-
Install the server in Cline:
fastmcp install notion_mcp_server.py
This 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:
Tell me about internal tooling
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:
{
"mcpServers": {
"notion-kb": {
"command": "uv",
"args": [
"run",
"--with", "fastmcp",
"--with", "python-dotenv",
"--with", "requests",
"fastmcp",
"run",
"/absolute/path/to/notion_mcp_server.py"
],
"env": {
"DIFY_API_BACKEND_KEY": "your-api-key"
}
}
}
}
Development
For development and testing:
-
Install dependencies:
pip install -r requirements.txt
-
Run 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
file - Ensure the server path in Cline's config is absolute
- Check that uv is installed and in your PATH
- Verify your API key in the
-
Dependencies issues
- Try reinstalling with
fastmcp install notion_mcp_server.py --force
- Verify uv is installed correctly
- Try reinstalling with
-
Server hangs
- Ensure you're using the uv run command as specified in the config
- Check the server logs for errors
Contributing
See for detailed information about the server's implementation and architecture.
License
MIT
Related MCP Servers
View all knowledge_and_memory servers →git-mcp
by idosal
GitMCP is a free, open-source, remote Model Context Protocol (MCP) server that transforms GitHub projects into documentation hubs, enabling AI tools to access up-to-date documentation and code.
Knowledge Graph Memory Server
by modelcontextprotocol
A basic implementation of persistent memory using a local knowledge graph, allowing Claude to remember information about the user across chats.
mcpdoc
by langchain-ai
MCP LLMS-TXT Documentation Server provides a structured way to manage and retrieve LLM documentation using the Model Context Protocol.
mindmap-mcp-server
by YuChenSSR
A Model Context Protocol (MCP) server for converting Markdown content to interactive mindmaps.
algorand-mcp
by GoPlausible
This is a Model Context Protocol (MCP) implementation for Algorand blockchain interactions, providing a server package for blockchain interactions and a client package for wallet management and transaction signing.
basic-memory
by basicmachines-co
Basic Memory is a tool that allows users to build a persistent knowledge base through natural conversations with LLMs, storing information in Markdown files.
mcp-obsidian
by MarkusPfundstein
MCP server to interact with Obsidian via the Local REST API community plugin.