notion-local-ops-mcp
notion-local-ops-mcp
Используйте Notion AI с вашими локальными файлами, оболочкой (shell) и резервными локальными агентами.
📖 Введение в проект (страница Notion)
Что он предоставляет
list_filessearch_filesread_filereplace_in_filewrite_filerun_commanddelegate_taskget_taskcancel_task
delegate_task поддерживает локальные CLI codex и claude.
Related MCP server: Notion Cowork Bridge
Требования
Python 3.11+
cloudflaredПользовательский агент Notion с поддержкой пользовательского MCP
Опционально:
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/mcpПубликация через cloudflared
Быстрый туннель
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илиclaudeget_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
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
- mcp-serverOAuthcom.make
Give your AI agents the tools to build, manage, and run automation workflows.
Governed memory and workspace for any AI: tasks, calendar, mail and pages, with per-action consent.
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.348,832 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