Get the FREE Ultimate OpenClaw Setup Guide →

notion

MCP server from SAhmadUmass/notion-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio sahmadumass-notion-mcp-server node /path/to/your/notion-mcp-server/dist/index.js --notion-api-key=YOUR_ACTUAL_API_KEY_HERE \
  --env NOTION_API_KEY="Your Notion API key"

How to use

This MCP server provides a Notion integration for Claude and other LLMs, enabling you to search Notion, retrieve and modify pages, and manage databases and database rows through natural language prompts. After building the server, connect it to Claude for Desktop by pointing the configuration to the compiled server file (dist/index.js) and providing your Notion API key. The toolset includes: searching the workspace, getting page content by ID, creating pages with content, updating page content or title, creating databases with defined properties, querying databases with filters and sorting, updating database entries, and adding new rows to databases. Claude will automatically select the appropriate operation based on your request, so you can simply ask questions like “Search for meeting notes,” “Get the content of my project planning page,” or “Create a new page with tasks for this week.”

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • A Notion integration with an API key

Steps:

  1. Clone the repository for the Notion MCP Server.
  2. Install dependencies:
npm install
  1. Configure your Notion API key:
  • Create an integration in Notion (Notion Developers portal)
  • Copy the API key
  • You can either:
    • Place it in a .env file as NOTION_API_KEY=YOUR_KEY
    • Or pass it directly when configuring Claude Desktop (recommended, see below)
  1. Build the server:
npm run build
  1. Run the server:
npm start
  1. (Optional) Set up Claude for Desktop configuration with the path to dist/index.js and your API key, as shown in the Claude setup instructions.

Additional notes

Tips and caveats:

  • Ensure your Notion integration has access to the pages/databases you intend to use.
  • If you encounter "Unexpected token" errors in logs, it may indicate stray console.log outputs interfering with MCP protocol; update to the latest server version where this is addressed.
  • When using Claude for Desktop, you can pass the Notion API key either via a .env file or via the CLI arguments in the configuration file. The recommended approach is to use the configuration file and keep the key secure.
  • The server supports common Notion properties (title, rich_text, select, multi_select, date, etc.); when updating or creating databases, ensure the properties object matches the Notion database schema.
  • If tools aren’t appearing in Claude, check logs at: tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

Related MCP Servers

Sponsor this space

Reach thousands of developers