Home / MCP / Notion MCP Server
Provides programmatic access to Notion data via an MCP server for AI agents and clients.
Configuration
View docs{
"mcpServers": {
"notion": {
"command": "npx",
"args": [
"-y",
"@notionhq/notion-mcp-server"
],
"env": {
"NOTION_TOKEN": "ntn_****",
"OPENAPI_MCP_HEADERS": "{...}"
}
}
}
}Notion MCP Server lets you connect Notion data to AI clients through a configurable MCP server. It simplifies setup with a token-based workflow and offers transport options to fit your tooling, enabling you to query Notion content and perform actions through AI-powered prompts.
You run the MCP server locally and connect your MCP client to it. Use the stdio transport for traditional desktop clients or enable the streamable HTTP transport for web-based clients. Configure your client with either a Notion access token or a prebuilt header set so the MCP server can authenticate against Notion.
Prerequisites you need before getting started: a working Node.js/npm installation, or Docker if you choose containerized runs. You should also have a Notion integration token ready if you plan to authenticate with Notion directly.
The server can be started via a local runtime (stdio transport) or via Docker. The following configurations are directly derived from the available setup options.
{
"mcpServers": {
"notionApi": {
"command": "npx",
"args": ["-y", "@notionhq/notion-mcp-server"],
"env": {
"NOTION_TOKEN": "ntn_****"
}
}
}
}{
"mcpServers": {
"notionApi": {
"command": "npx",
"args": ["-y", "@notionhq/notion-mcp-server"],
"env": {
"OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\" }"
}
}
}
}{
"mcpServers": {
"notionApi": {
"command": "docker",
"args": ["run","--rm","-i","-e","NOTION_TOKEN","mcp/notion"],
"env": {
"NOTION_TOKEN": "ntn_****"
}
}
}
}{
"mcpServers": {
"notionApi": {
"command": "docker",
"args": ["run","--rm","-i","-e","OPENAPI_MCP_HEADERS","mcp/notion"],
"env": {
"OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\" }"
}
}
}
}docker compose build
```
```javascript
{
"mcpServers": {
"notionApi": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"NOTION_TOKEN=ntn_****",
"notion-mcp-server"
]
}
}
}The MCP server supports two transport modes: stdio (default) and Streamable HTTP. The stdio transport is suitable for desktop clients, while HTTP can be used by web-based clients with bearer token authentication. For HTTP, either auto-generated tokens or a custom token can be used via command line or environment variables.
You can plan to access and manipulate Notion content through your AI flows by configuring the MCP client with the appropriate authentication header and pointing it to the local MCP server process. Ensure you have a valid Notion integration token and that the pages or databases you want to access are connected to that integration.
If you prefer a local build/run flow, use a containerized approach with Docker, or run the MCP server through npx for quick experimentation. Always provide the correct authentication tokens and Notion-Version headers as shown in the configuration examples.