home / mcp / cursor notion mcp server
Logs Cursor AI conversations to Notion by capturing prompt, response, user, context, and timestamp.
Configuration
View docs{
"mcpServers": {
"creo-drb1008-prompt-logger-mcp": {
"command": "python3",
"args": [
"/ABSOLUTE/PATH/TO/cursor-notion-mcp/mcp_notion_server.py"
],
"env": {
"NOTION_API_KEY": "secret_YOUR_NOTION_INTEGRATION_TOKEN",
"NOTION_VERSION": "2022-06-28",
"NOTION_DATABASE_ID": "YOUR_DATABASE_ID"
}
}
}
}You run a self-hosted MCP server that logs Cursor AI chat interactions to Notion. It captures the prompt, response, user, context, and timestamp so you can analyze conversations, document decisions, and build a knowledge base within Notion.
After you start the MCP server, you can log Cursor AI conversations to Notion from within the Cursor chat interface. Look for the store chat log tool in the MCP-enabled tool picker, or issue the designated command to store the current conversation. This setup creates a structured entry in your Notion database containing the prompt, the AIβs response, the user identity, the context, and when the interaction occurred.
Prerequisites: Python 3.7 or higher, Cursor IDE with MCP support, a Notion account with API access, and the requests library.
Step 1: Install Python dependencies and prepare the environment.
Step 2: Clone the MCP server repository and navigate into it.
Step 3: Create and configure the MCP server entry to connect Cursor with Notion by providing the integration token and database ID.
git clone https://github.com/Creo-DRB1008/prompt-logger-mcp.git
cd cursor-notion-mcp
```
```bash
pip install -r requirements.txtCreate a Notion Integration to obtain an internal integration token. Create a Notion database with the required properties and share it with your integration. The required properties are Prompt (Title), Response (Text), User (Text), Context (Text), and Timestamp (Date). You will use the database ID in the MCP configuration.
Configure the MCP server to connect Cursor with Notion by editing the MCP JSON configuration. Provide the absolute path to the server script and the Notion credentials.
{
"mcpServers": {
"notion_chat_logger": {
"command": "python3",
"args": [
"/ABSOLUTE/PATH/TO/cursor-notion-mcp/mcp_notion_server.py"
],
"env": {
"NOTION_API_KEY": "secret_YOUR_NOTION_INTEGRATION_TOKEN",
"NOTION_DATABASE_ID": "YOUR_DATABASE_ID"
}
}
}
}Keep sensitive data out of version control. Use environment variables for tokens and IDs. Limit integration permissions to only the necessary database. Regularly review logged data to ensure no sensitive information is stored.
Recommended: use a .env file to store secrets and load them when starting the MCP server.
# .env
NOTION_API_KEY=secret_YOUR_TOKEN
NOTION_DATABASE_ID=YOUR_DATABASE_ID
```
```json
{
"mcpServers": {
"notion_chat_logger": {
"command": "bash",
"args": [
"-c",
"source .env && python3 /path/to/mcp_notion_server.py"
]
}
}
}Validate that the server can initialize and store a log entry to Notion. Run the test script and confirm you receive a success message indicating the log was stored.
# Quick verification (example)
./verify_cursor_mcp.sh
```
```bash
python3 test_mcp_notion.py
```
```json
{ "status": "success", "message": "Successfully stored to Notion!" }You can invoke the logging capability through the designated tool in the Cursor chat interface or by using the explicit tool call. The available tool is store_chat_log, which stores the current conversation details to Notion.
The Notion database must include the following properties: Prompt (Title), Response (Text), User (Text), Context (Text), Timestamp (Date). Provide your Notion API key and database ID to enable logging.
Saves the current Cursor AI conversation to Notion, including the prompt, response, user, context, and timestamp.