# Notion Mcp Server

> MCP server from piskunproject/notion-mcp-server.

- **Type:** MCP server
- **Install:** `agentstack add mcp-piskunproject-notion-mcp-server`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [piskunproject](https://agentstack.voostack.com/s/piskunproject)
- **Installs:** 0
- **Category:** [Productivity](https://agentstack.voostack.com/c/productivity)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [piskunproject](https://github.com/piskunproject)
- **Source:** https://github.com/piskunproject/notion-mcp-server

## Install

```sh
agentstack add mcp-piskunproject-notion-mcp-server
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Notion MCP Server

[](./LICENSE)
[](https://www.typescriptlang.org/)
[](https://apify.com/)

Connect **Claude Desktop** (and other MCP clients) directly to **Notion** using a real MCP server with **SSE** support.

No flaky local scripts. No tokens in URLs. Run it securely in the cloud.

## 🚀 Quick Start (Recommended)

The easiest way to run this securely 24/7 is on **Apify**.

[Deploy to Apify](https://apify.com/piskunlab/notion-mcp-server)

### Connect your MCP client

- **Base URL** (Apify Container URL):

  `https://.runs.apify.net`

- **SSE endpoint**:

  `GET /sse`

- **Client-to-server messages**:

  `POST /message?sessionId=...`

Authentication is done via:

- **Authorization header**: `Authorization: Bearer `

## ✨ Features

- **MCP Protocol with SSE**
- **Secure Bearer Authentication**
- **Notion API access (CRUD via OpenAPI tools)**
- **Rate-limiting & basic DDoS protection** (`express-rate-limit`)
- **Security headers** (`helmet`)

## 💻 Local Development (For Geeks)

### Install

```bash
npm install
```

### Build

```bash
npm run build
```

### Run

```bash
npm start
```

### Docker (optional)

If you use Docker locally:

```bash
docker build -t notion-mcp-server .
docker run -p 8080:8080 --env-file .env notion-mcp-server
```

## ⚙️ Configuration

This project is designed to read configuration from environment variables (and Apify Actor input).

### Required ENV variables

- `NOTION_TOKEN`
  - Your Notion integration token.
- `SECRET_TOKEN`
  - Bearer token required to access `/sse` and `/message`.

Optional (advanced):

- `NOTION_API_VERSION` (default: `2022-06-28`)
- `OPENAPI_MCP_HEADERS` (JSON string of headers; overrides `NOTION_TOKEN` when present)
- `BASE_URL` (override OpenAPI server base URL)

### Claude Desktop configuration

Add (or merge) something like this into `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "notion": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/dist/start-apify.js"],
      "env": {
        "NOTION_TOKEN": "YOUR_NOTION_TOKEN",
        "SECRET_TOKEN": "YOUR_SECRET_TOKEN"
      }
    }
  }
}
```

On Apify, you typically configure secrets via **Actor input** / **secrets** and use the Container URL as the server endpoint.

## Security Notes

- Never commit `.env` files or Apify `storage/` directories.
- Use a strong `SECRET_TOKEN` and rotate it if it leaks.

## Contributing

PRs are welcome!

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [piskunproject](https://github.com/piskunproject)
- **Source:** [piskunproject/notion-mcp-server](https://github.com/piskunproject/notion-mcp-server)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-piskunproject-notion-mcp-server
- Seller: https://agentstack.voostack.com/s/piskunproject
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
