Get the FREE Ultimate OpenClaw Setup Guide →

Notion

A Model Context Protocol (MCP) server for integrating with Notion workspaces (made before the official one 😅)

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ghubnerr-notion-mcp node /path/to/notion-mcp-server/build/index.js \
  --env NOTION_API_KEY="your_notion_api_key_here"

How to use

This Notion MCP server exposes a standardized Model Context Protocol interface for reading and modifying content in a Notion workspace. It provides resources to list databases, fetch database schemas and contents, retrieve page content, and monitor recent updates. It also offers a set of pre-configured prompts designed to help you quickly query deadlines, project status, and daily tasks. When connected to your Claude or other MCP-compatible client, you can issue natural language queries like asking for tasks due today, checking project status, or creating and updating Notion pages and database entries. The server handles the translation between natural language requests and Notion API calls, returning structured results that can be consumed by your AI model or UI.

To use it with Claude for Desktop (or any compatible client), point the client to the MCP server instance and supply your Notion API key via environment variables or configuration. The server exposes resources via the notion:// URI scheme and can be configured through your client’s MCP settings file. Common tasks include listing databases, exploring a database schema, viewing content for specific pages, and applying updates or creating new pages within your workspace. Prompts such as upcoming-deadlines, project-status, and daily-tasks are pre-configured to facilitate rapid, goal-oriented queries.

How to install

Prerequisites:

  • Node.js v16 or higher
  • npm (comes with Node.js)
  • Notion API Key with access to your Notion workspace

Installation steps:

  1. Clone the repository git clone https://github.com/yourusername/notion-mcp-server.git cd notion-mcp-server

  2. Install dependencies npm install

  3. Create a .env file in the project root with your Notion API key (optional for local testing if you pass via env): NOTION_API_KEY=your_notion_api_key_here

  4. Build the project npm run build

  5. Start the server npm start

  6. Verify the server is running (e.g., by checking console output or hitting the API endpoints defined by the MCP server) and note the path to the built entry (e.g., build/index.js) for integration in your MCP configuration.

Additional notes

Tips and common issues:

  • Ensure NOTION_API_KEY has proper permissions for the databases and pages you intend to access.
  • If you modify environment settings (e.g., BACKUP_DIR, UPDATE_POLLING_INTERVAL), restart the server to apply changes.
  • When integrating with Claude for Desktop, update the configuration to point to the built server entry and provide the NOTION_API_KEY in the environment block.
  • The server exposes resources via notion:// URIs; use these in your queries to navigate databases, schemas, and page contents.
  • If you encounter authentication issues, double-check that the NOTION_API_KEY is valid and that the Notion integration is connected to the correct workspace.
  • For backups and retention, adjust BACKUP_DIR, BACKUP_RETENTION_DAYS, and MAX_BACKUPS_PER_PAGE to suit your data protection policies.
  • Use the pre-configured prompts (upcoming-deadlines, project-status, daily-tasks) to accelerate common Notion queries without crafting raw API requests.

Related MCP Servers

Sponsor this space

Reach thousands of developers