Notion MCP Server Cd12e53f

MCP文档知识

提供方 apimlett

文档知识 未标注 Token 社区 / 第三方 Claude DesktopClaude

一个提供通过Notion API对Notion工作区进行全面读写访问的模型上下文协议(MCP)服务器。

一句话选型结论

按资料字段整理

Notion MCP Server Cd12e53f 属于文档知识类 MCP 服务器,传输方式未标注,Token,可直接接入 Claude Desktop、Claude,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类文档知识 传输方式未标注 鉴权Token 部署方式未标注
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 13 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

文档知识
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量13暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

NotionAPITypeScript本地部署工作区管理数据库操作内容管理自动化工具

安装与配置

未标注 Token
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 13 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
文档检索问答

在你的文档库里按问题找答案。

知识库读写

把新资料写进知识库,随用随取。

内容整理

把零散资料归纳成结构化笔记。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 13 个工具,覆盖面较广,能满足多种调用。
  • 已适配 Claude Desktop、Claude,换客户端不用重新研究配置。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好Token对应的凭据,并按最小权限配置。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在文档知识场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Notion MCP Server Cd12e53f当前 13 未标注 未标注 无 2026-05-17
dify 未标注 stdio · 本地进程 本地部署 有 2026-04-11
open-webui 未标注 stdio · 本地进程 本地部署 有 2026-04-11
JeecgBoot 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Cherry Studio 未标注 未标注 未标注 无 2026-05-17
mempalace 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

文档知识
字段来自项目仓库与公开索引,中文说明由本站标注
提供方apimlett上游标注的维护方 apimlett
分类文档知识本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式Token远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

12.6 KB
来自项目仓库与上游目录的原文,未做删改

Notion MCP Server

A Model Context Protocol (MCP) server that provides comprehensive read and write access to Notion workspaces through the Notion API.

Features

  • 🔍 Search and retrieve pages, databases, and blocks
  • 📝 Create and update pages with rich content
  • 🗃️ Database operations - query, create, and update database entries
  • 🏗️ Block manipulation - append, update, and delete blocks
  • 🔒 Secure authentication using Notion integration tokens
  • 🛡️ Error handling with proper MCP error responses
  • 📊 Comprehensive logging for debugging and monitoring

Quick Start

1. Installation```bash

git clone https://github.com/your-username/notion-mcp-server.git
cd notion-mcp-server
npm install


### 2. Notion Integration Setup

1. Go to Notion Developers
2. Click "New integration"
3. Fill in basic information:
   - Name: "MCP Server Integration"
   - Associated workspace: Select your workspace
   - Capabilities: Read content, Update content, Insert content
4. Click "Submit"
5. Copy the "Internal Integration Token"

### 3. Configuration

Create a `.env` file in the project root:```env
NOTION_TOKEN=your_notion_integration_token_here

Note: The server automatically finds and loads the .env file from the project directory, regardless of where the MCP client runs it from.

4. Grant Page Access

For each Notion page/database you want to access:
1. Open the page in Notion
2. Click the "..." menu → "Add connections"
3. Select your integration

5. Running the Server```bash

Development

npm run dev

Production

npm start


## Client Integration

### Claude Code (CLI)

Add the server to your Claude Code MCP configuration:```json
{
  "mcpServers": {
    "notion": {
      "command": "node",
      "args": ["/path/to/notion-mcp-server/dist/index.js"]
    }
  }
}

Or using npm:```json
{
"mcpServers": {
"notion": {
"command": "npx",
"args": ["-p", "/path/to/notion-mcp-server", "node", "dist/index.js"]
}
}
}


The server will automatically read the `NOTION_TOKEN` from your `.env` file.

### Claude Desktop

Add to your Claude Desktop configuration file:

**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json````json
{
  "mcpServers": {
    "notion": {
      "command": "node",
      "args": ["/path/to/notion-mcp-server/dist/index.js"]
    }
  }
}

The server will automatically read the NOTION_TOKEN from your .env file in the project directory.

ChatGPT (via OpenAI)

For ChatGPT integration, you'll need to run the server with a JSON-RPC transport. Create a wrapper script:

notion-mcp-wrapper.js:```javascript

!/usr/bin/env node

const { spawn } = require('child_process');

const server = spawn('node', ['/path/to/notion-mcp-server/dist/index.js'], {
env: process.env, // Inherits environment variables including NOTION_TOKEN from .env
stdio: ['pipe', 'pipe', 'pipe'],
cwd: '/path/to/notion-mcp-server' // Ensures .env file is found
});

process.stdin.pipe(server.stdin);
server.stdout.pipe(process.stdout);
server.stderr.pipe(process.stderr);

server.on('exit', (code) => {
process.exit(code);
});


Then configure ChatGPT to use:```json
{
  "tools": [
    {
      "type": "mcp_server",
      "mcp_server": {
        "command": "node",
        "args": ["/path/to/notion-mcp-wrapper.js"]
      }
    }
  ]
}

Alternative: Global Installation

For easier configuration, you can install the server globally:```bash

Make the server globally available

npm link

Or install globally if published

npm install -g notion-mcp-server


Then use in configurations:```json
{
  "mcpServers": {
    "notion": {
      "command": "notion-mcp-server"
    }
  }
}

Note: When using global installation, ensure your .env file is in the working directory where the client runs, or set the NOTION_TOKEN as a system environment variable.

Security Best Practices

✅ DO: Keep your Notion token in the .env file```env
NOTION_TOKEN=secret_your_notion_integration_token_here


❌ **DON'T**: Put tokens directly in MCP client configurations```json
// AVOID THIS - tokens exposed in config files
{
  "mcpServers": {
    "notion": {
      "env": {
        "NOTION_TOKEN": "secret_token_here"
      }
    }
  }
}

System Environment Variables (Optional)

If you prefer system-wide environment variables instead of .env files:```bash

Add to your shell profile (.bashrc, .zshrc, etc.)

export NOTION_TOKEN="your_notion_integration_token_here"


This approach works well with global installations and containerized deployments.

## MCP Tools Available

### Page Operations

#### `notion_search_pages`
Search for pages across your workspace.```json
{
  "query": "meeting notes",
  "filter": "page",
  "sort": "last_edited_time"
}

notion_get_page

Retrieve a specific page with all its content.```json
{
"page_id": "page-uuid-here"
}


#### `notion_create_page`
Create a new page with content.```json
{
  "parent": {
    "type": "page_id",
    "page_id": "parent-page-uuid"
  },
  "title": "New Page Title",
  "content": "# Heading\n\nThis is some content."
}

notion_update_page

Update an existing page's properties and content.```json
{
"page_id": "page-uuid-here",
"title": "Updated Title",
"content": "Updated content here"
}


#### `notion_append_blocks`
Append blocks to an existing page.```json
{
  "block_id": "page-or-block-uuid",
  "content": "Additional content to append"
}

Database Operations

notion_query_database

Query a database with filters and sorting.```json
{
"database_id": "database-uuid-here",
"filter": {
"property": "Status",
"select": {
"equals": "In Progress"
}
},
"sorts": [
{
"property": "Created",
"direction": "descending"
}
]
}


#### `notion_create_database_page`
Create a new page in a database.```json
{
  "database_id": "database-uuid-here",
  "properties": {
    "Name": {
      "title": [
        {
          "text": {
            "content": "New Task"
          }
        }
      ]
    },
    "Status": {
      "select": {
        "name": "To Do"
      }
    }
  },
  "content": "Task description here"
}

notion_update_database_page

Update properties of a database page.```json
{
"page_id": "page-uuid-here",
"properties": {
"Status": {
"select": {
"name": "Completed"
}
}
}
}


### Block Operations

#### `notion_get_blocks`
Get child blocks of a page or block.```json
{
  "block_id": "block-uuid-here"
}

notion_update_block

Update a specific block's content.```json
{
"block_id": "block-uuid-here",
"content": "Updated block content"
}


#### `notion_delete_block`
Delete a specific block.```json
{
  "block_id": "block-uuid-here"
}

Utility Operations

notion_get_users

List all users in the workspace.

notion_get_databases

List accessible databases.

Configuration

Environment Variables

Variable Description Required
NOTION_TOKEN Notion integration token Yes
LOG_LEVEL Logging level (debug, info, warn, error) No (default: info)
PORT Server port for health checks No (default: 3000)

Integration Capabilities

When creating your Notion integration, ensure you enable:

  • ✅ Read content - Required for all read operations
  • ✅ Update content - Required for updating pages/blocks
  • ✅ Insert content - Required for creating pages/blocks
  • ✅ Read user information - Required for user operations

Error Handling

The server implements comprehensive error handling:

  • Authentication errors - Invalid or missing Notion token
  • Permission errors - Access denied to specific pages/databases
  • Rate limiting - Automatic retry with exponential backoff
  • Validation errors - Invalid parameters or malformed requests
  • Network errors - Connection timeouts and retries

Development

Project Structure```

notion-mcp-server/
├── src/
│ ├── index.ts # Main server entry point
│ ├── types.ts # TypeScript type definitions
│ ├── tools/ # MCP tool implementations
│ │ ├── pages.ts # Page-related tools
│ │ ├── databases.ts # Database-related tools
│ │ ├── blocks.ts # Block-related tools
│ │ └── utils.ts # Utility tools
│ ├── notion/ # Notion API wrappers
│ │ ├── client.ts # Notion client setup
│ │ ├── converters.ts # Content converters
│ │ └── validators.ts # Input validation
│ └── utils/
│ ├── logger.ts # Logging utilities
│ └── errors.ts # Error handling
├── tests/ # Test files
├── docs/ # Additional documentation
├── package.json
├── tsconfig.json
├── .env.example
└── README.md


### Building```bash
npm run build

Testing```bash

Run all tests

npm test

Run tests with coverage

npm run test:coverage

Run integration tests (requires valid Notion token)

npm run test:integration


### Linting```bash
npm run lint
npm run lint:fix

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Add tests for new features
  • Update documentation for API changes
  • Use conventional commit messages
  • Ensure all tests pass before submitting PR

Security

  • Never commit .env files or tokens to the repository
  • Use environment variables for sensitive configuration
  • Regularly rotate your Notion integration tokens
  • Follow the principle of least privilege when granting access

Troubleshooting

Common Issues

"Cannot use import statement outside a module" Error

This project uses ES modules. Make sure your package.json includes:```json
{
"type": "module"
}


#### "Expected ',' or ']' after array element in JSON" Error
This error occurs when logs are sent to stdout instead of stderr, interfering with MCP JSON communication. The server has been fixed to send all logs to stderr, but if you encounter this:

1. Ensure you're using the latest version
2. Check that no `console.log` statements are in the code
3. Restart Claude Desktop after updating the server

#### "Missing required environment variable: NOTION_TOKEN" Error
The server automatically loads the `.env` file from the project directory. If you see this error:

1. Ensure the `.env` file exists in the project root with your token:```env
   NOTION_TOKEN=your_notion_integration_token_here
   ```
2. Verify the token is valid and not expired
3. Check that there are no extra spaces or quotes around the token

#### "Cannot find module" Error
- Verify the path in your MCP client configuration points to the correct location
- Ensure you've built the project: `npm run build`
- Check that the `dist/` folder exists and contains `index.js`

#### "Unauthorized" Error
- Verify your `NOTION_TOKEN` is correct in the `.env` file
- Ensure the integration has been added to the pages/databases you're accessing
- Check that your integration has the required capabilities

#### "Object not found" Error
- Verify the page/database ID is correct
- Ensure the integration has access to the specific object
- Check if the object has been deleted or moved

#### Rate Limiting
- The server automatically handles rate limits with exponential backoff
- If you encounter persistent rate limiting, consider reducing request frequency

### Debug Mode

Enable debug logging:```bash
LOG_LEVEL=debug npm start

This will output detailed information about API calls and responses.

Testing the Server

To verify the server works correctly:```bash

Build the project

npm run build

Test TypeScript compilation

npm run typecheck

Run the server (will start and wait for MCP connections)

npm start
```

Changelog

See CHANGELOG.md for a detailed list of changes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Notion API for providing the excellent API
  • Model Context Protocol for the MCP specification
  • The open-source community for inspiration and contributions

Support

  • 📖 Documentation
  • 🐛 Issue Tracker
  • 💬 Discussions
  • 📧 Email Support

Made with ❤️ by the open-source community

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
Notion MCP Server Cd12e53f 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

Notion MCP Server Cd12e53f 怎么在 Claude Desktop、Claude 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Notion MCP Server Cd12e53f 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Notion MCP Server Cd12e53f 需要 API Key 吗?

资料标注需要Token认证,使用前准备好对应凭据,并按最小权限配置。

Notion MCP Server Cd12e53f 支持哪些客户端?

资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Notion MCP Server Cd12e53f 能提供哪些能力?

资料显示约 13 个工具;能力标签包括 工作区管理、TypeScript、Claude、数据库操作。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。