by suekou
Provides a server that interfaces with the Notion API, enabling LLMs to retrieve, modify, and query Notion workspace data, with optional Markdown conversion to reduce token usage.
Enables large language models to interact with Notion workspaces through a Model Context Protocol (MCP) server. The server translates tool calls into Notion API requests and can return results in JSON or markdown format, helping to keep token consumption low.
npx
:
{
"mcpServers": {
"notion": {
"command": "npx",
"args": ["-y", "@suekou/mcp-notion-server"],
"env": { "NOTION_API_TOKEN": "your-integration-token" }
}
}
}
NOTION_MARKDOWN_CONVERSION
to true
to enable markdown responses.notion_retrieve_page
, notion_query_database
) from your LLM prompt, optionally specifying format: "json"
or "markdown"
.--enabledTools
).npx
startup; works with both npx
and compiled Node binaries.Q: Do I need a paid Notion plan? A: Most tools work with a free plan; user‑listing functions require an Enterprise plan and an organization API key.
Q: How does markdown conversion affect editing?
A: When enabled, the server returns markdown when format: "markdown"
. The original rich‑text structure is lost, so editing the returned content may fail.
Q: Can I limit which tools are exposed?
A: Yes, use the --enabledTools
CLI argument with a comma‑separated list of tool names.
Q: Where do I set the API token?
A: Via the NOTION_API_TOKEN
environment variable in the MCP server configuration.
Q: Is the server cross‑platform? A: It runs on any system with Node.js installed.
MCP Server for the Notion API, enabling LLM to interact with Notion workspaces. Additionally, it employs Markdown conversion to reduce context size when communicating with LLMs, optimizing token usage and making interactions more efficient.
Here is a detailed explanation of the steps mentioned above in the following articles:
Create a Notion Integration:
Retrieve the Secret Key:
Add the Integration to Your Workspace:
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.--enabledTools
: Comma-separated list of tools to enable (e.g. "notion_retrieve_page,notion_query_database"). When specified, only the listed tools will be available. If not specified, all tools are enabled.Read-only tools example (copy-paste friendly):
node build/index.js --enabledTools=notion_retrieve_block,notion_retrieve_block_children,notion_retrieve_page,notion_query_database,notion_retrieve_database,notion_search,notion_list_all_users,notion_retrieve_user,notion_retrieve_bot_user,notion_retrieve_comments
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
.The project is organized in a modular way to improve maintainability and readability:
./
├── src/
│ ├── index.ts # Entry point and command-line handling
│ ├── client/
│ │ └── index.ts # NotionClientWrapper class for API interactions
│ ├── server/
│ │ └── index.ts # MCP server setup and request handling
│ ├── types/
│ │ ├── index.ts # Type exports
│ │ ├── args.ts # Tool argument interfaces
│ │ ├── common.ts # Common schema definitions
│ │ ├── responses.ts # API response type definitions
│ │ └── schemas.ts # Tool schema definitions
│ ├── utils/
│ │ └── index.ts # Utility functions
│ └── markdown/
│ └── index.ts # Markdown conversion utilities
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
block_id
(string): The ID of the parent block.children
(array): Array of block objects to append.notion_retrieve_block
block_id
(string): The ID of the block to retrieve.notion_retrieve_block_children
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.notion_delete_block
block_id
(string): The ID of the block to delete.notion_retrieve_page
page_id
(string): The ID of the page to retrieve.notion_update_page_properties
page_id
(string): The ID of the page to update.properties
(object): Properties to update.notion_create_database
parent
(object): Parent object of the database.properties
(object): Property schema of the database.title
(array): Title of the database as a rich text array.notion_query_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.notion_retrieve_database
database_id
(string): The ID of the database to retrieve.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.
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "notion": { "command": "npx", "args": [ "-y", "@suekou/mcp-notion-server" ], "env": { "NOTION_API_TOKEN": "<YOUR_NOTION_API_TOKEN>", "NOTION_MARKDOWN_CONVERSION": "<true|false>" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.