Get the FREE Ultimate OpenClaw Setup Guide →

mcp -notion-prompt

MCP server from BaoxingZhang/mcp-server-notion-prompt

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio baoxingzhang-mcp-server-notion-prompt node build/index.js \
  --env LOG_LEVEL="INFO" \
  --env NOTION_API_KEY="your_notion_api_key" \
  --env CACHE_EXPIRY_TIME="300000" \
  --env NOTION_DATABASE_ID="your_database_id" \
  --env PROMPT_HANDLING_MODE="process_locally"

How to use

This MCP server exposes Notion-stored prompts as MCP resources. It reads prompts from a configured Notion database and offers a set of MCP tools to list, fetch, compose, and process prompts, with optional categorization and search capabilities. The server caches prompts to reduce Notion API calls and supports different processing modes to fit your workflow. You can access tools such as list_prompts to enumerate all prompts, get_prompt_by_name to fetch a prompt by name, compose_prompt to merge user input with a prompt template, and refresh_prompts to update the cache. Other tools allow you to operate on categories, perform searches across name/description/content, and render multiple prompts by category as needed.

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • Git installed
  • Access to the repository with the Notion prompts data

Steps:

  1. Clone the repository:
git clone https://github.com/BaoxingZhang/mcp-server-notion-prompt
cd mcp-server-notion-prompt
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Create a configuration file or use environment variables to start the server. Example (Unix-like):
export NOTION_API_KEY=your_notion_api_key
export NOTION_DATABASE_ID=your_database_id
export PROMPT_HANDLING_MODE=process_locally
export LOG_LEVEL=INFO
export CACHE_EXPIRY_TIME=300000
npm start
  1. If you prefer to pass options via command line arguments, you can provide them to the start script (depending on your setup).

Additional notes

Tips and common considerations:

  • Ensure your Notion integration has Read Content permissions and is connected to the prompts database.
  • The NOTION_DATABASE_ID should be taken from the Notion database page URL.
  • PROMPT_HANDLING_MODE controls how prompts are processed after composition. Options include return_only, process_locally, and call_external_api.
  • The internal cache reduces Notion API usage; adjust CACHE_EXPIRY_TIME to balance freshness and performance.
  • You can override settings at runtime with environment variables or by passing CLI arguments if the startup script supports it.
  • The MCP tools listed in the README are exposed via the MCP protocol; combine and publish results as needed for your UI or automation.
  • If you encounter connectivity issues with Notion, verify your API key, database ID, and integration sharing permissions on the database.

Related MCP Servers

Sponsor this space

Reach thousands of developers