Notion Knowledge Base MCP Server

Integrations

  • 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

Installation

  1. Clone this repository:
    git clone https://github.com/yourusername/notion-mcp-server.git cd notion-mcp-server
  2. Create a .env file with your Dify API key:
    echo "DIFY_API_BACKEND_KEY=your-api-key-here" > .env
  3. 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:

  1. Install dependencies:
    pip install -r requirements.txt
  2. Run the development server:
    fastmcp dev notion_mcp_server.py

This will start the MCP Inspector interface for testing the server.

Troubleshooting

  1. 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
  2. Dependencies issues
    • Try reinstalling with fastmcp install notion_mcp_server.py --force
    • Verify uv is installed correctly
  3. 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

-
security - not tested
F
license - not found
-
quality - not tested

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.

  1. Features
    1. Prerequisites
      1. Installation
        1. Usage
          1. Configuration
            1. Development
              1. Troubleshooting
                1. Contributing
                  1. License

                    Related MCP Servers

                    • A
                      security
                      A
                      license
                      A
                      quality
                      MCP Server for the Notion API, enabling Claude to interact with Notion workspaces.
                      Last updated -
                      18
                      5,492
                      571
                      TypeScript
                      MIT License
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A VS Code extension provides a MCP server that exposes Roslyn language features. It enables tools like find usages, go to definition, quick info, etc.
                      Last updated -
                      81
                      TypeScript
                      AGPL 3.0
                      • Linux
                      • Apple
                    • A
                      security
                      A
                      license
                      A
                      quality
                      Notion MCP Server is a MCP server implementation that enables AI assistants to interact with Notion's API.
                      Last updated -
                      13
                      275
                      91
                      TypeScript
                      MIT License
                    • -
                      security
                      -
                      license
                      -
                      quality
                      An MCP server that allows integration with Nia's codebase understanding capabilities through function calling in tools like Cursor and Claude Desktop, enabling users to analyze project structure and search codebases via natural language queries.
                      Last updated -
                      3
                      JavaScript
                      MIT License

                    View all related MCP servers

                    ID: xvq6i7dram