Sign inSign up

jfeeneydemo3/dubjug-notion-context-kit:1.0.1

Multi-platform
Manifest digest

sha256:1c72072ff124ac159e511f924f9eb4da37ca80c9fcc9370a83408cd33ea84f83

Last pushed

7 days by jfeeneydemo3

Type

Sandbox Kit

Manifest digest

sha256:1c72072ff124ac159e511f924f9eb4da37ca80c9fcc9370a83408cd33ea84f83

yaml
schemaVersion: "3"
displayName: Notion guidance (MCP gateway)
description: Rules for an agent that reaches the hosted Notion MCP server through the sandbox MCP gateway. Carries no network rule, credential or MCP registration.
version: 1.0.1
kind: mixin
capabilities:
    - type: com.docker.sandbox/lifecycle@1
      config:
        install:
            - command: |
                export HOME="${HOME:-/home/agent}"
                export PATH="$HOME/.local/bin:$HOME/.claude/local:/usr/local/share/npm-global/bin:${PATH:-/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin}"
                add_block() {
                  f="$1"
                  mkdir -p "$(dirname "$f")"
                  touch "$f"
                  grep -q 'notion-gateway:start' "$f" && return 0
                  cat >> "$f" <<'NOTION_BLOCK'

                <!-- notion-gateway:start -->
                ## Notion (via the sandbox MCP gateway)

                - Notion tools reach you through the `mcp-gateway` MCP server; their names all start
                  with `notion-` (for example `notion-search`, `notion-fetch`; Codex shows them as
                  `mcp__mcp_gateway__notion_search`). There is no separate `notion` server and no
                  credential in this sandbox. Use only those tools for Notion: never call the Notion
                  API directly and never look for tokens.
                - Read before you write: search or fetch first. Create, update, move, delete or
                  restore Notion content only when the user asked for that change, and say what you
                  changed. Do not use the Notion Calendar (`notion-calendar-*`) or Custom Agent
                  session tools unless the user asks for them.
                - Never call `notion-revoke-auth`, and never call `notion-authorize`: sign-in from
                  inside the sandbox does not produce a token the gateway can use.
                - Not signed in yet: until Notion is authorized on the host, the gateway hides every
                  Notion tool and offers only `notion-authorize`; there is no 401, the tools are
                  simply absent. If the user asks for Notion and `notion-authorize` is the only
                  Notion tool offered, or a Notion tool answers 401, 403 or "not authorized", stop
                  and tell the user to run `sbx mcp auth notion` in a terminal on their own machine
                  (outside this sandbox) and then start a new agent session, because tools granted
                  after this session started will not appear in it. Report the exact message you saw.
                <!-- notion-gateway:end -->
                NOTION_BLOCK
                }
                command -v codex >/dev/null 2>&1 || [ -d "$HOME/.codex" ] && add_block "$HOME/.codex/AGENTS.md"
                command -v claude >/dev/null 2>&1 || [ -d "$HOME/.claude" ] && add_block "$HOME/.claude/CLAUDE.md"
                exit 0
              description: Add gateway-era Notion rules to the agent's always-loaded instructions
              env:
                - HOME
                - PATH
              user: agent
    - type: com.docker.sandbox/agent-context@1
      config:
        content: |
            ## Notion

            The Notion MCP server is registered on the host's sandbox MCP gateway and
            authorized there with OAuth. Its tools reach you through the `mcp-gateway`
            MCP server, and all of their names start with `notion-`. There is no
            `notion` entry in your own MCP configuration and no Notion credential in
            this environment.

            - Use only the gateway's `notion-*` tools for Notion. Do not call the
              Notion API directly, and do not look for credentials.
            - Read before you write. Change Notion content (create, update, move,
              delete, restore, comment) only when the user asked for that change, and
              report what you changed. Leave Notion Calendar and Custom Agent session
              tools alone unless asked.
            - Never call `notion-revoke-auth`, and never call `notion-authorize`:
              sign-in started from inside the sandbox does not produce a token the
              gateway can use.
            - Not signed in yet: until Notion is authorized on the host, the gateway
              offers only `notion-authorize` and no other Notion tool, and does not
              answer with a 401; the tools are simply absent. If the user asks for
              Notion and `notion-authorize` is the only Notion tool you can find, or
              a Notion tool answers 401, 403 or "not authorized", stop. Tell the user
              to run `sbx mcp auth notion` in a terminal on their own machine
              (outside this sandbox) and then start a new agent session, because
              tools granted after this session started will not appear in it. Report
              the exact message you saw.