npm package: @neuroequalityorg/mcp-notion
Description: MCP server for Notion API integration - search, create, update pages and query databases
Author: NeuroEquality
Latest version: 1.0.0

# @neuroequalityorg/mcp-notion

MCP (Model Context Protocol) server for Notion API integration. Enables AI assistants to interact with Notion workspaces through a standardized protocol.

## Features

- 🔍 **Search pages and databases** - Find content across your Notion workspace
- 📝 **Create pages** - Add new pages to databases or as subpages
- ✏️ **Update pages** - Modify page properties, archive pages, change icons/covers
- 📊 **Get database schema** - Retrieve database structure and properties
- 🔎 **Query databases** - Filter and sort database entries
- 📄 **Append blocks** - Add content blocks to pages

## Installation

```bash
npm install -g @neuroequalityorg/mcp-notion
```

Or use with npx:

```bash
npx @neuroequalityorg/mcp-notion
```

## Configuration

### Environment Variables

Set your Notion API key:

```bash
export NOTION_API_KEY=secret_xxxxxxxxxxxxx
# or
export NOTION_TOKEN=secret_xxxxxxxxxxxxx
```

### Getting a Notion API Key

1. Go to [Notion Developers](https://www.notion.so/my-integrations)
2. Click "New integration"
3. Give it a name and select the workspace
4. Copy the "Internal Integration Token"
5. Share pages/databases with your integration (click "..." → "Add connections")

## Usage with Claude Desktop

Add to your Claude Desktop config (`~/.config/claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "notion": {
      "command": "npx",
      "args": ["@neuroequalityorg/mcp-notion"],
      "env": {
        "NOTION_API_KEY": "secret_xxxxxxxxxxxxx"
      }
    }
  }
}
```

## Available Tools

### search_pages

Search for pages and databases in your Notion workspace.

```json
{
  "query": "meeting notes",
  "filter": {
    "property": "object",
    "value": "page"
  },
  "page_size": 10
}
```

### create_page

Create a new page in a database or as a child of another page.

```json
{
  "parent": {
    "database_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  },
  "properties": {
    "Name": {
      "title": [
        {
          "text": {
            "content": "New Task"
          }
        }
      ]
    },
    "Status": {
      "select": {
        "name": "To Do"
      }
    }
  }
}
```

### update_page

Update an existing page's properties or archive it.

```json
{
  "page_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "properties": {
    "Status": {
      "select": {
        "name": "Done"
      }
    }
  }
}
```

### get_database

Retrieve a database's schema and metadata.

```json
{
  "database_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```

### query_database

Query a database with filters and sorts.

```json
{
  "database_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "filter": {
    "property": "Status",
    "select": {
      "equals": "In Progress"
    }
  },
  "sorts": [
    {
      "property": "Created",
      "direction": "descending"
    }
  ],
  "page_size": 50
}
```

### append_blocks

Add content blocks to a page.

```json
{
  "block_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "children": [
    {
      "object": "block",
      "type": "paragraph",
      "paragraph": {
        "rich_text": [
          {
            "type": "text",
            "text": {
              "content": "Hello, World!"
            }
          }
        ]
      }
    },
    {
      "object": "block",
      "type": "heading_2",
      "heading_2": {
        "rich_text": [
          {
            "type": "text",
            "text": {
              "content": "Section Title"
            }
          }
        ]
      }
    }
  ]
}
```

## Development

```bash
# Clone the repo
git clone https://github.com/neuroequalityorg/mcp-notion.git
cd mcp-notion

# Install dependencies
npm install

# Run in development mode
npm run dev

# Build for production
npm run build
```

## License

MIT © [NeuroEquality](https://neuroequality.org)