I love using Claude Desktop and Cursor, but I kept running into a wall: Context Switching.
Every time I needed to reference my project specs, meeting notes, or task lists, I had to Alt-Tab to Notion, copy the text, and paste it into the chat. It felt archaic.
I looked for existing Model Context Protocol (MCP) servers for Notion, but most were designed to run locally via stdio. This meant keeping a terminal window open forever, dealing with Python dependencies, and restarting it every time my laptop went to sleep.
So, I built my own solution.
π What I Built
I created a Cloud-Native Notion MCP Server that runs 24/7 using Server-Sent Events (SSE).
Stack: Node.js, TypeScript, Express.
Transport: Native MCP over SSE (instead of stdio).
Hosting: Deploys easily on Apify (runs on the free tier).
Security: Bearer Token authentication (so you don't leak secrets).
π Why do this?
By moving the MCP server to the cloud, you turn Notion into a persistent "knowledge backend" for your AI.
Always On: No need to run npm start locally.
Secure: Tokens are managed via environment variables, not hardcoded in your local config.
Multi-Client: Connect both Claude Desktop and Cursor to the same instance.
βοΈ How to set it up (5 minutes)
Here is how you can set it up for free using the Apify platform.
Step 1: Deploy the Server
I wrapped the code into an Apify Actor. You can deploy it with one click (no credit card required for the free tier).
π https://apify.com/piskunlab/notion-mcp-server
Once deployed, copy your Actor URL and set your NOTION_TOKEN.
Step 2: Configure Claude/Cursor
Since we are using SSE, we don't need to point to a local file. We point to the cloud URL.
For Claude Desktop (claude_desktop_config.json):
JSON
{
"mcpServers": {
"notion-cloud": {
"command": "",
"args": [],
"url": "https://your-actor-url.apify.actor/sse",
"headers": {
"Authorization": "Bearer YOUR_SECRET_TOKEN"
}
}
}
}
Step 3: Test it out
Restart Claude. You should see a generic "mcp-server" icon. Now you can ask:
"Read the page 'Project Roadmap' and summarize the tasks for this week." "Create a new bug report in my 'Bugs' database."
π§ Under the Hood
For those interested in the code, the project is open-source. It uses the official @modelcontextprotocol/sdk mapped to Express endpoints.
GET /sse establishes the event stream.
POST /message handles the JSON-RPC traffic.
It handles Rate Limiting to ensure you don't hit Notion's API limits too hard.
Check out the code here: π https://github.com/piskunproject/notion-mcp-server
I'm planning to build similar persistent servers for GitHub and Slack next. Let me know in the comments if you have any feature requests!
Happy coding! π
Top comments (0)