notion-local-ops-mcp
notion-local-ops-mcp
Notion AIをローカルファイル、シェル、およびフォールバック用のローカルエージェントと連携させます。
提供機能
list_filessearch_filesread_filereplace_in_filewrite_filerun_commanddelegate_taskget_taskcancel_task
delegate_taskは、ローカルのcodexおよびclaude CLIをサポートしています。
Related MCP server: Notion Cowork Bridge
要件
Python 3.11以上
cloudflaredカスタムMCPサポートを備えたNotionカスタムエージェント
オプション:
codexCLIオプション:
claudeCLI
インストール
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 .設定
.env.exampleをコピーし、少なくとも以下を設定してください:
export NOTION_LOCAL_OPS_WORKSPACE_ROOT="/absolute/path/to/workspace"
export NOTION_LOCAL_OPS_AUTH_TOKEN="replace-me"オプション:
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"起動
source .venv/bin/activate
notion-local-ops-mcpローカルエンドポイント:
http://127.0.0.1:8766/mcpcloudflaredによる公開
クイックトンネル
cloudflared tunnel --url http://127.0.0.1:8766生成されたHTTPS URLを/mcpと共に使用してください。
名前付きトンネル
cloudflared-example.ymlを編集し、以下を実行します:
cloudflared tunnel --config ./cloudflared-example.yml run <your-tunnel-name>Notionへの追加
以下を使用してください:
URL:
https://<your-domain-or-tunnel>/mcp認証タイプ:
Bearerトークン:
NOTION_LOCAL_OPS_AUTH_TOKEN
推奨されるエージェント指示:
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.環境変数
変数 | 必須 | デフォルト |
| いいえ |
|
| いいえ |
|
| はい | ホームディレクトリ |
| いいえ |
|
| いいえ | 空 |
| いいえ |
|
| いいえ |
|
| いいえ |
|
| いいえ |
|
ツールに関する注意点
list_files: ファイルとディレクトリの一覧表示search_files: ファイル内のテキスト検索read_file: オフセットと制限を指定してテキストファイルを読み取りreplace_in_file: 特定のテキストフラグメントを置換write_file: ファイル全体の内容を書き込みrun_command: ローカルシェルコマンドの実行delegate_task: ローカルのcodexまたはclaudeにタスクを送信get_task: タスクのステータスと出力の末尾を読み取りcancel_task: 委任されたタスクを停止
検証
source .venv/bin/activate
pytest -q
python -m compileall src testsトラブルシューティング
Notionが接続できない場合
URLが
/mcpで終わっているか確認してください認証タイプが
Bearerであることを確認してくださいトークンが
NOTION_LOCAL_OPS_AUTH_TOKENと一致しているか確認してくださいcloudflaredが実行中であることを確認してください
SSEパスがローカルでは動作するがトンネル経由では動作しない場合
クイックトンネルではなく、名前付きトンネルで再試行してください
GET /mcpがtext/event-streamを返すことを確認してください
delegate_taskが失敗する場合
codex --helpを確認してくださいclaude --helpを確認してください必要に応じて
NOTION_LOCAL_OPS_CODEX_COMMANDまたはNOTION_LOCAL_OPS_CLAUDE_COMMANDを設定してください
This server cannot be deployed
Maintenance
Related MCP Connectors
Your workspace as agent tools — docs, canvases, slides, sheets, projects, tickets, and a shell.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
- mcp-serverOAuthcom.make
Give your AI agents the tools to build, manage, and run automation workflows.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables GPT Desktop to interact with local file systems and execute shell commands. Supports file operations (read, write, edit, delete), directory management, file search, and git status checks through natural language.-
- AlicenseNot gradedqualityAmaintenanceGives Notion Custom Agents real file tools and a real terminal over the Model Context Protocol, enabling them to read, edit, and run commands directly on the user's machine.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to search, update, and manage files, run terminal commands, and automate workflows on a user's computer.156,453 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to remotely execute terminal commands and perform filesystem operations on the host machine, with secure authentication and optional ngrok tunneling for integration with Notion and other clients.MIT