Notion AI Chatbot + MCP Server
Supercharges any Notion workspace with an AI chatbot and MCP server, enabling natural language interaction, search, summarization, and content generation.
README
Notion AI Chatbot + MCP Server
A sellable AI chatbot and MCP server that supercharges any Notion workspace. Bundle it with your Notion templates and agents to drive more sales — customers get an AI assistant that talks to their Notion data.
What This Does
Two products in one:
- Web Chatbot — Beautiful chat UI where users talk to their Notion workspace
- MCP Server — Connect your Notion agents (like AGENT ZERO) to AI-powered tools via the Custom MCP server dialog
Features
Notion Tools (read/write your workspace)
- Search across all pages and databases
- Query databases with filters and sorts
- Create new pages/rows in any database
- Update existing page properties
- Read full page content
AI-Powered Tools (what makes this valuable)
- Chat with AI — Multi-turn conversations with memory
- Summarize Pages — AI summaries (brief, detailed, or bullets)
- Generate Content — Blog posts, reports, emails, descriptions
- Analyze Databases — Ask questions about your data, get insights
- Smart Search — Search + AI summarization of results
- Draft from Template — Generate meeting notes, project briefs, SOPs, proposals
Quick Start
1. Get your API keys
- Notion Integration Token: notion.so/my-integrations
- Claude API Key: console.anthropic.com
2. Share databases with your integration
In Notion: open each database → "..." menu → "Connections" → Add your integration.
3. Configure
cp .env.example .env
Edit .env:
ANTHROPIC_API_KEY=sk-ant-your-key
NOTION_API_KEY=ntn_your-key
PORT=3000
BOT_NAME=My Notion Assistant
4. Install & Run
npm install
npm start
You'll see:
✦ My Notion Assistant is running!
Chat UI: http://localhost:3000
MCP Server: http://localhost:3000/mcp
Connecting to Your Notion Agent
This is the key feature — connect your custom Notion agent to this MCP server.
Step 1: Deploy your server
Deploy to any hosting provider (see Deployment section) so you have a public URL like https://your-app.railway.app.
Step 2: Connect in Notion
- Open your Notion agent (e.g., AGENT ZERO)
- Click "Add connection" → "+ Add custom MCP"
- Enter your MCP Server URL:
https://your-app.railway.app/mcp
- Click Connect
Step 3: Your agent now has superpowers
Your Notion agent can now:
- Have AI conversations via
chat_with_ai - Summarize any page via
summarize_page - Generate content via
generate_content - Analyze database data via
analyze_database - Smart search with AI summaries via
smart_search - Draft documents from templates via
draft_from_template - Plus all Notion CRUD tools (search, query, create, update)
Customization
Bot personality
Edit prompts/system.md to customize the AI's behavior and tone.
Branding
Edit CSS custom properties in public/index.html:
:root {
--primary: #000000; /* Your brand color */
--accent: #2563eb; /* Accent color */
}
Bot name
Change BOT_NAME in your .env file.
All 14 MCP Tools
| Tool | Type | Description |
|---|---|---|
search_notion |
Notion | Search across all pages and databases |
list_databases |
Notion | List all accessible databases |
get_database_schema |
Notion | Get column structure of a database |
query_database |
Notion | Query database rows with filters |
get_page |
Notion | Get page properties |
get_page_content |
Notion | Get full page content as text |
create_page |
Notion | Create a new page in a database |
update_page |
Notion | Update page properties |
chat_with_ai |
AI | Multi-turn AI conversation with memory |
summarize_page |
AI | AI-powered page summarization |
generate_content |
AI | Generate any type of content |
analyze_database |
AI | Ask questions about your data |
smart_search |
AI | Search + AI summarization |
draft_from_template |
AI | Generate docs from templates |
Using with Claude Desktop / Claude Code
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"notion-assistant": {
"command": "node",
"args": ["path/to/notion-chatbot/server.js", "--mcp-stdio"],
"env": {
"NOTION_API_KEY": "ntn_your-key",
"ANTHROPIC_API_KEY": "sk-ant-your-key"
}
}
}
}
Claude Code
Add to your .claude/settings.json:
{
"mcpServers": {
"notion-assistant": {
"command": "node",
"args": ["path/to/notion-chatbot/server.js", "--mcp-stdio"],
"env": {
"NOTION_API_KEY": "ntn_your-key",
"ANTHROPIC_API_KEY": "sk-ant-your-key"
}
}
}
}
Deployment
For your Notion agent to connect, the MCP server needs a public URL.
| Platform | Command | Free tier |
|---|---|---|
| Railway | railway up |
Yes |
| Render | Connect repo | Yes |
| Fly.io | fly launch |
Yes |
| VPS | npm start + PM2 |
N/A |
Example: Deploy to Railway
npm i -g @railway/cli
railway login
railway init
railway up
Copy the URL and paste it into your Notion agent's MCP server field.
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/mcp |
ALL | Streamable HTTP MCP endpoint (for Notion agents) |
/sse |
GET | Legacy SSE MCP endpoint |
/messages |
POST | Legacy SSE message endpoint |
/api/chat |
POST | Chat API for the web UI |
/api/chat/:id |
DELETE | Reset a conversation |
/api/notion/databases |
GET | List available databases |
/api/health |
GET | Check API connectivity |
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。