notion-local-ops-mcp
Enables exposing the MCP server via Cloudflare Tunnel for secure remote access to local operations through Notion.
Provides integration with Notion AI, enabling local file operations, shell command execution, and task delegation through Notion's custom agent interface.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@notion-local-ops-mcpsearch for TODO comments in my project files"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
notion-local-ops-mcp
Use Notion AI with your local files, shell, and fallback local agents.
π Project Introduction (Notion Page)
What It Provides
list_filessearch_filesread_filereplace_in_filewrite_filerun_commanddelegate_taskget_taskcancel_task
delegate_task supports local codex and claude CLIs.
Requirements
Python 3.11+
cloudflaredNotion Custom Agent with custom MCP support
Optional:
codexCLIOptional:
claudeCLI
Install
git clone https://github.com/<your-account>/notion-local-ops-mcp.git
cd notion-local-ops-mcp
python3.11 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .Configure
Copy .env.example and set at least:
export NOTION_LOCAL_OPS_WORKSPACE_ROOT="/absolute/path/to/workspace"
export NOTION_LOCAL_OPS_AUTH_TOKEN="replace-me"Optional:
export NOTION_LOCAL_OPS_CODEX_COMMAND="codex"
export NOTION_LOCAL_OPS_CLAUDE_COMMAND="claude"
export NOTION_LOCAL_OPS_COMMAND_TIMEOUT="30"
export NOTION_LOCAL_OPS_DELEGATE_TIMEOUT="1800"Start
source .venv/bin/activate
notion-local-ops-mcpLocal endpoint:
http://127.0.0.1:8766/mcpExpose With cloudflared
Quick tunnel
cloudflared tunnel --url http://127.0.0.1:8766Use the generated HTTPS URL with /mcp.
Named tunnel
Edit cloudflared-example.yml, then run:
cloudflared tunnel --config ./cloudflared-example.yml run <your-tunnel-name>Add To Notion
Use:
URL:
https://<your-domain-or-tunnel>/mcpAuth type:
BearerToken: your
NOTION_LOCAL_OPS_AUTH_TOKEN
Recommended agent instruction:
Use direct tools first: list_files, search_files, read_file, replace_in_file, write_file, run_command.
Use delegate_task only for complex multi-file work, long-running tasks, or when direct tools are insufficient.Environment Variables
Variable | Required | Default |
| no |
|
| no |
|
| yes | home directory |
| no |
|
| no | empty |
| no |
|
| no |
|
| no |
|
| no |
|
Tool Notes
list_files: list files and directoriessearch_files: search text in filesread_file: read text files with offset and limitreplace_in_file: replace one exact text fragmentwrite_file: write full file contentrun_command: run local shell commandsdelegate_task: send a task to localcodexorclaudeget_task: read task status and output tailcancel_task: stop a delegated task
Verify
source .venv/bin/activate
pytest -q
python -m compileall src testsTroubleshooting
Notion says it cannot connect
Check the URL ends with
/mcpCheck the auth type is
BearerCheck the token matches
NOTION_LOCAL_OPS_AUTH_TOKENCheck
cloudflaredis still running
SSE path works locally but not over tunnel
Retry with a named tunnel instead of a quick tunnel
Confirm
GET /mcpreturnstext/event-stream
delegate_task fails
Check
codex --helpCheck
claude --helpSet
NOTION_LOCAL_OPS_CODEX_COMMANDorNOTION_LOCAL_OPS_CLAUDE_COMMANDif needed
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/catoncat/notion-local-ops-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server