notion-local-ops-mcp
notion-local-ops-mcp
Nutzen Sie Notion AI mit Ihren lokalen Dateien, der Shell und lokalen Fallback-Agenten.
📖 Projekteinführung (Notion-Seite)
Was es bietet
list_filessearch_filesread_filereplace_in_filewrite_filerun_commanddelegate_taskget_taskcancel_task
delegate_task unterstützt lokale codex- und claude-CLIs.
Anforderungen
Python 3.11+
cloudflaredNotion Custom Agent mit Unterstützung für benutzerdefinierte MCPs
Optional:
codexCLIOptional:
claudeCLI
Installation
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 .Konfiguration
Kopieren Sie .env.example und setzen Sie mindestens:
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-mcpLokaler Endpunkt:
http://127.0.0.1:8766/mcpBereitstellung mit cloudflared
Quick Tunnel
cloudflared tunnel --url http://127.0.0.1:8766Verwenden Sie die generierte HTTPS-URL mit /mcp.
Benannter Tunnel
Bearbeiten Sie cloudflared-example.yml und führen Sie dann Folgendes aus:
cloudflared tunnel --config ./cloudflared-example.yml run <your-tunnel-name>Zu Notion hinzufügen
Verwenden Sie:
URL:
https://<your-domain-or-tunnel>/mcpAuthentifizierungstyp:
BearerToken: Ihr
NOTION_LOCAL_OPS_AUTH_TOKEN
Empfohlene Agenten-Anweisung:
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.Umgebungsvariablen
Variable | Erforderlich | Standardwert |
| nein |
|
| nein |
|
| ja | Home-Verzeichnis |
| nein |
|
| nein | leer |
| nein |
|
| nein |
|
| nein |
|
| nein |
|
Hinweise zu den Tools
list_files: Dateien und Verzeichnisse auflistensearch_files: Text in Dateien suchenread_file: Textdateien mit Offset und Limit lesenreplace_in_file: Ein exaktes Textfragment ersetzenwrite_file: Vollständigen Dateiinhalt schreibenrun_command: Lokale Shell-Befehle ausführendelegate_task: Eine Aufgabe an lokalescodexoderclaudesendenget_task: Aufgabenstatus und Ausgabe-Ende lesencancel_task: Eine delegierte Aufgabe stoppen
Überprüfung
source .venv/bin/activate
pytest -q
python -m compileall src testsFehlerbehebung
Notion meldet, dass keine Verbindung hergestellt werden kann
Überprüfen Sie, ob die URL auf
/mcpendetÜberprüfen Sie, ob der Authentifizierungstyp
BeareristÜberprüfen Sie, ob das Token mit
NOTION_LOCAL_OPS_AUTH_TOKENübereinstimmtÜberprüfen Sie, ob
cloudflarednoch läuft
SSE-Pfad funktioniert lokal, aber nicht über den Tunnel
Versuchen Sie es mit einem benannten Tunnel anstelle eines Quick Tunnels
Bestätigen Sie, dass
GET /mcpden Typtext/event-streamzurückgibt
delegate_task schlägt fehl
Überprüfen Sie
codex --helpÜberprüfen Sie
claude --helpSetzen Sie bei Bedarf
NOTION_LOCAL_OPS_CODEX_COMMANDoderNOTION_LOCAL_OPS_CLAUDE_COMMAND
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