home / mcp / notion mcp server
NotionMCP_Webviewer
Configuration
View docs{
"mcpServers": {
"ar-codelabs-mcp_notionmcp_webviewer": {
"command": "streamlit",
"args": [
"run",
"application/app_webview_mcp_simple.py"
],
"env": {
"NOTION_API_KEY": "YOUR_NOTION_API_KEY",
"NOTION_PAGE_ID": "YOUR_NOTION_PAGE_ID"
}
}
}
}This MCP server provides a Notion page viewer powered by Streamlit, enabling you to view Notion pages in four modes with an easy setup and direct control from an MCP client.
Connect this MCP server to your MCP client and start the Streamlit-based viewer. You will be able to switch between four viewing modes to explore Notion pages: All content, Title + Image, Sub-pages, and Original JSON data for debugging. Use the client to select the notion MCP server and initiate the view, then interact through the provided four buttons to render content as you need.
Practical usage patterns you can follow: - Start the server via the MCP client, then open the web app in your browser. - Use the Full Content mode to render every block including toggles, images, and sub-pages. - Switch to Title + Image for a clean overview that highlights the page title and main image. - Explore Sub-pages to see linked pages and navigate through your Notion hierarchy. - Use Original Data only for debugging when you need the raw JSON payload being produced.
Prerequisites: you need Python 3.8+ and a working internet connection.
Step-by-step commands to set up the MCP server locally:
```
git clone https://github.com/ar-codelabs/MCP_NotionMCP_Webviewer.git
cd MCP_notion_webviewer
# Install dependencies
pip install -r requirements.txtConfigure the MCP server by supplying your Notion integration details. The following JSON snippet shows how to wire the MCP server with the Notion API key and page ID.
{
"mcpServers": {
"notion": {
"command": "python3",
"args": ["./application/mcp_server_notion.py"],
"env": {
"NOTION_API_KEY": "your_notion_integration_token",
"NOTION_PAGE_ID": "your_notion_page_id"
}
}
}
}Start the Streamlit-based viewer using the MCP command path described in the configuration. The usual run command is included in the setup and may look like the following.
streamlit run application/app_webview_mcp_simple.pyEnsure the Notion Integration has read permissions for the pages you intend to view. Note that images may use temporary Notion URLs which can expire. Large pages may require more loading time.
If the viewer does not start, verify that Python 3.8+ is installed, dependencies are installed, and environment variables NOTION_API_KEY and NOTION_PAGE_ID are correctly set in the run environment.
Display all content on a page, including toggles, images, and sub-pages in a structured view.
Show only the main page title and image for a clean overview.
List linked sub-pages with titles and links for easy navigation.
Provide the original JSON payload for debugging and development purposes.