N

Notion MCP Server

2 points
12
Installation
Copy the following command to your Client for configuration
Note: Your key is sensitive information, do not share it with anyone.

🚀 Configuring Notion API Key and Permissions

This guide provides a step-by-step process for configuring the Notion API key and permissions, along with code examples and setup instructions for Claude.

📦 Creating a Notion API Key

  1. Access Notion Integrations:

  2. Create a New Integration:

    • Click "New Integration", fill in the required fields (e.g., integration name), and select the workspace you want to connect.
  3. Save the Integration:

    • After submission, an API key will be generated. Copy this key and save it securely for subsequent API request authentication.
  4. Retrieve the API Key:

    • Copy the generated API key and ensure its security.

🔧 Configuring Page Permissions for Integration Use

  1. Open a Notion Page:

    • Open the Notion page to which you want to grant permissions.
  2. Share the Page:

    • Click the "Share" button on the top-right of the page.
  3. Invite the Integration:

    • Enter the name of your integration in the "Invite" text box and select it from the dropdown list. This grants the integration access to the page.
  4. Set Permissions:

    • Ensure that the integration has the necessary permissions to perform the required operations (e.g., read, write).

💻 Code Updates

In the notion_sdk.py file, update PAGE_ID to the ID of the page you created earlier. You can obtain this ID by copying the page link.

Example Notion Page ID

https://www.notion.so/MCP-Parent-Page-1d21f7216bdb80789f88fccd964b5031

Curl Example

Here is an example of using the Notion API to create a new page:

curl --location --request POST 'https://api.notion.com/v1/pages' \
--header 'Authorization: Bearer $NOTION_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Notion-Version: 2021-05-13' \
--data '{
"parent": { "page_id": "1d21f7216bdb80789f88fccd964b5031" },
"properties": {
    "title": [
        {
            "text": {
                "content": "New Page Title"
            }
        }
    ]
}
'

🛠️ Setting Up in Claude

Installing the uv Tool

If you are using a Mac, install it via the following command:

brew install uv

Verify the installation:

uv --version

Run a Python script:

uv run <script>.py

Setting Environment Variables

In Claude, you need to add NOTION_API_KEY to the environment variables. For example:

export NOTION_API_KEY=your_api_key_here

Alternatively, specify the executable path in the configuration file:

{
  "executors": {
    "default_python": {
      "command": "/usr/bin/python3",
      "env": {
        "NOTION_API_KEY": "your_api_key"
      }
    }
  }
}

📥 Installing the Notion Library

Install notion-client using pip:

pip install notion-client

📚 Generating Docstring Examples

The following are docstring examples for functions to help LLMs and humans understand the usage and parameters of the tools:

Example Function and Its Docstring

def get_page_content(page_id: str) -> dict:
    """
    Get the content of a specified page.
    
    Args:
        page_id (str): The ID of the page whose content needs to be retrieved.
        
    Returns:
        dict: The page content, including the title and other attributes.
    """
    # Specific implementation code

Another Example

def create_new_page(parent_id: str, title: str) -> str:
    """
    Create a new page under a specified parent page.
    
    Args:
        parent_id (str): The ID of the parent page.
        title (str): The title of the new page.
        
    Returns:
        str: The ID of the newly created page.
    """
    # Specific implementation code

Usage Notes

  • Summary: Briefly describe the purpose of the function.
  • Parameters: Explain each input parameter, its type, and its use in detail.
  • Return Value: Clearly state the type and meaning of the return value.

By following these guidelines, you can ensure that docstrings are both human-friendly and model-friendly.

S
Search1api
The Search1API MCP Server is a server based on the Model Context Protocol (MCP), providing search and crawling functions, and supporting multiple search services and tools.
TypeScript
343
4 points
D
Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
830
4.3 points
A
Apple Notes MCP
A server that provides local Apple Notes database access for the Claude desktop client, supporting reading and searching of note content.
Python
207
4.3 points
M
MCP Alchemy
Certified
MCP Alchemy is a tool that connects Claude Desktop to multiple databases, supporting SQL queries, database structure analysis, and data report generation.
Python
325
4.2 points
P
Postgresql MCP
A PostgreSQL database MCP service based on the FastMCP library, providing CRUD operations, schema inspection, and custom SQL query functions for specified tables.
Python
112
4 points
M
MCP Scan
MCP-Scan is a security scanning tool for MCP servers, used to detect common security vulnerabilities such as prompt injection, tool poisoning, and cross-domain escalation.
Python
616
5 points
A
Agentic Radar
Agentic Radar is a security scanning tool for analyzing and assessing agentic systems, helping developers, researchers, and security experts understand the workflows of agentic systems and identify potential vulnerabilities.
Python
557
5 points
C
Cloudflare
Changesets is a build tool for managing versions and releases in multi - package or single - package repositories.
TypeScript
1.5K
5 points
Featured MCP Services
N
Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
141
4.5 points
D
Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
830
4.3 points
M
Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
1.7K
5 points
G
Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
87
4.3 points
U
Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
567
5 points
F
Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
6.7K
4.5 points
M
Minimax MCP Server
The MiniMax Model Context Protocol (MCP) is an official server that supports interaction with powerful text-to-speech, video/image generation APIs, and is suitable for various client tools such as Claude Desktop and Cursor.
Python
754
4.8 points
C
Context7
Context7 MCP is a service that provides real-time, version-specific documentation and code examples for AI programming assistants. It is directly integrated into prompts through the Model Context Protocol to solve the problem of LLMs using outdated information.
TypeScript
5.2K
4.7 points
AIbase
Zhiqi Future, Your AI Solution Think Tank
© 2025AIbase