notion mcp
A Model Context Protocol server that provides a standardized interface for interacting with Notion's API, enabling users to list databases, create pages, and search across their Notion workspace.
A Model Context Protocol server that provides a standardized interface for interacting with Notion's API, enabling users to list databases, create pages, and search across their Notion workspace.
A Model Context Protocol (MCP) server implementation for Notion integration, providing a standardized interface for interacting with Notion's API. Compatible with Claude Desktop and other MCP clients.
Clone the repository:
git clone https://github.com/ccabanillas/notion-mcp.git
cd notion-mcp
Create a virtual environment and install dependencies (using uv):
uv venv
source .venv/bin/activate # On Windows: .venvScriptsactivate
uv pip install -e .
Alternatively, using standard venv:
python -m venv venv
source venv/bin/activate # On Windows: venvScriptsactivate
pip install -e .
.env
file in the project root:
NOTION_API_KEY=your_notion_integration_token
Test the server (it should run without errors):
python -m notion_mcp
To use it with Claude Desktop, adjust your claude_desktop_config.json
file (located at ~/Library/Application Support/Claude/claude_desktop_config.json
on macOS):
{
"servers": {
"notion-mcp": {
"command": "/Users/username/Projects/notion-mcp/.venv/bin/python",
"args": ["-m", "notion_mcp"],
"cwd": "/Users/username/Projects/notion-mcp"
}
}
}
Be sure to replace /Users/username/
with your actual home directory path.
notion-mcp/
├── src/
│ └── notion_mcp/
│ ├── models/
│ │ ├── __init__.py
│ │ └── notion.py # Pydantic models for Notion objects
│ ├── __init__.py
│ ├── __main__.py # Entry point
│ ├── client.py # Notion API client
│ └── server.py # MCP server implementation
├── .env # Environment variables (add your Notion API key here)
├── .gitignore
├── pyproject.toml # Project dependencies
└── README.md
pytest
The server requires a Notion integration token. To set this up:
.env
file in the project root directory:NOTION_API_KEY=your_notion_integration_token
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)MIT License - Use at your own risk