mcp notion server
MCP Server for the Notion API, enabling Claude to interact with Notion workspaces.
MCP Server for the Notion API, enabling Claude to interact with Notion workspaces.
MCP Server for the Notion API, enabling Claude to interact with Notion workspaces.
Here is a detailed explanation of the steps mentioned above in the following articles:
Japanese Version: https://qiita.com/suekou/items/44c864583f5e3e6325d9
Create a Notion Integration:
Visit the Notion Your Integrations page.
Name your integration and select appropriate permissions (e.g., "Read content", "Update content").
Retrieve the Secret Key:
Copy the "Internal Integration Token" from your integration.
This token will be used for authentication.
Add the Integration to Your Workspace:
Open the page or database you want the integration to access in Notion.
Click the "Connections" button, and select the the integration you created in step 1 above.
Configure Claude Desktop:
Add the following to your claude_desktop_config.json
:
{
"mcpServers": {
"notion": {
"command": "npx",
"args": ["-y", "@suekou/mcp-notion-server"],
"env": {
"NOTION_API_TOKEN": "your-integration-token"
}
}
}
}
or
{
"mcpServers": {
"notion": {
"command": "node",
"args": ["your-built-file-path"],
"env": {
"NOTION_API_TOKEN": "your-integration-token"
}
}
}
}
NOTION_API_TOKEN
(required): Your Notion API integration token.NOTION_MARKDOWN_CONVERSION
: Set to "true" to enable experimental Markdown conversion. This can significantly reduce token consumption when viewing content, but may cause issues when trying to edit page content.By default, all responses are returned in JSON format. You can enable experimental Markdown conversion to reduce token consumption:
{
"mcpServers": {
"notion": {
"command": "npx",
"args": ["-y", "@suekou/mcp-notion-server"],
"env": {
"NOTION_API_TOKEN": "your-integration-token",
"NOTION_MARKDOWN_CONVERSION": "true"
}
}
}
}
or
{
"mcpServers": {
"notion": {
"command": "node",
"args": ["your-built-file-path"],
"env": {
"NOTION_API_TOKEN": "your-integration-token",
"NOTION_MARKDOWN_CONVERSION": "true"
}
}
}
}
When NOTION_MARKDOWN_CONVERSION
is set to "true"
, responses will be converted to Markdown format (when format
parameter is set to "markdown"
), making them more human-readable and significantly reducing token consumption. However, since this feature is experimental, it may cause issues when trying to edit page content as the original structure is lost in conversion.
You can control the format on a per-request basis by setting the format
parameter to either "json"
or "markdown"
in your tool calls:
"markdown"
for better readability when only viewing content"json"
when you need to modify the returned contentIf you encounter permission errors:
claude_desktop_config.json
.All tools support the following optional parameter:
format
(string, "json" or "markdown", default: "markdown"): Controls the response format. Use "markdown" for human-readable output, "json" for programmatic access to the original data structure. Note: Markdown conversion only works when the NOTION_MARKDOWN_CONVERSION
environment variable is set to "true".
notion_append_block_children
Append child blocks to a parent block.
block_id
(string): The ID of the parent block.children
(array): Array of block objects to append.Returns: Information about the appended blocks.
notion_retrieve_block
Retrieve information about a specific block.
block_id
(string): The ID of the block to retrieve.Returns: Detailed information about the block.
notion_retrieve_block_children
Retrieve the children of a specific block.
block_id
(string): The ID of the parent block.start_cursor
(string): Cursor for the next page of results.page_size
(number, default: 100, max: 100): Number of blocks to retrieve.Returns: List of child blocks.
notion_delete_block
Delete a specific block.
block_id
(string): The ID of the block to delete.Returns: Confirmation of the deletion.
notion_retrieve_page
Retrieve information about a specific page.
page_id
(string): The ID of the page to retrieve.Returns: Detailed information about the page.
notion_update_page_properties
Update properties of a page.
page_id
(string): The ID of the page to update.properties
(object): Properties to update.Returns: Information about the updated page.
notion_create_database
Create a new database.
parent
(object): Parent object of the database.title
(array): Title of the database as a rich text array.properties
(object): Property schema of the database.Returns: Information about the created database.
notion_query_database
Query a database.
database_id
(string): The ID of the database to query.filter
(object): Filter conditions.sorts
(array): Sorting conditions.start_cursor
(string): Cursor for the next page of results.page_size
(number, default: 100, max: 100): Number of results to retrieve.Returns: List of results from the query.
notion_retrieve_database
Retrieve information about a specific database.
database_id
(string): The ID of the database to retrieve.Returns: Detailed information about the database.
notion_update_database
database_id
(string): The ID of the database to update.title
(array): New title for the database.description
(array): New description for the database.properties
(object): Updated property schema.notion_create_database_item
database_id
(string): The ID of the database to add the item to.properties
(object): The properties of the new item. These should match the database schema.notion_search
query
(string): Text to search for in page or database titles.filter
(object): Criteria to limit results to either only pages or only databases.sort
(object): Criteria to sort the resultsstart_cursor
(string): Pagination start cursor.page_size
(number, default: 100, max: 100): Number of results to retrieve.notion_list_all_users
notion_retrieve_user
notion_retrieve_bot_user
notion_create_comment
parent
object with a page_id
or a discussion_id
, but not both.rich_text
(array): Array of rich text objects representing the comment content.parent
(object): Must include page_id
if used.discussion_id
(string): An existing discussion thread ID.notion_retrieve_comments
block_id
(string): The ID of the block or page whose comments you want to retrieve.start_cursor
(string): Pagination start cursor.page_size
(number, max: 100): Number of comments to retrieve.This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.