A simple, reliable MCP server for Notion that uses the Notion API directly.
- Direct API Integration: No middleware, just direct API calls that work
- Core Operations: Search, create, read, update pages and databases
- Block Operations: Read and append blocks to pages
- Simple & Reliable: Minimal dependencies, easy to debug
cd ~/mcp-servers/notion-direct
python3 -m venv .venv
source .venv/bin/python
pip install -r requirements.txt
- Go to https://www.notion.so/profile/integrations
- Create a new internal integration
- Copy the token (starts with
ntn_
) - Grant the integration access to your pages/databases
Add to ~/.config/claude-code/config.json
:
{
"mcpServers": {
"notion": {
"command": "/home/rcgalbo/mcp-servers/notion-direct/.venv/bin/python",
"args": ["/home/rcgalbo/mcp-servers/notion-direct/server.py"],
"env": {
"NOTION_TOKEN": "your_token_here"
}
}
}
}
Run /mcp
in Claude Code to connect to the server.
search_notion
: Search for pages and databasesget_page
: Get page details by IDcreate_page
: Create a new pageupdate_page
: Update page propertiesquery_database
: Query a database with filters and sortsget_block_children
: Get child blocks of a pageappend_blocks
: Append blocks to a page
Use the search_notion tool to find "WNY Leaf" project
Create a new task page under the WNY Leaf project with title "Implement backend API"
Query the tasks database and show all incomplete tasks
- Token issues: Make sure your token starts with
ntn_
and has access to your pages - Connection issues: Check that the virtual environment path is correct
- API errors: All errors are returned in the tool response for easy debugging
To use this server in other projects:
- Grant your Notion integration access to the project pages
- Use the same config in Claude Code
- No additional setup needed!