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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.