Sign inSign up

jfeeneydemo3/dubjug-dataserver-context-kit:1.0.0

Multi-platform
Manifest digest

sha256:b909d3ecd5e959342e3bd9f4e77ca177d1bab25eac323f5ff95c990943d48def

Last pushed

2 days by jfeeneydemo3

Type

Sandbox Kit

Manifest digest

sha256:b909d3ecd5e959342e3bd9f4e77ca177d1bab25eac323f5ff95c990943d48def

yaml
schemaVersion: "3"
displayName: Data-analysis server guidance (MCP gateway)
description: Rules for an agent that reaches the local data-analysis MCP server through the sandbox MCP gateway. Carries no network rule, credential or MCP registration.
version: 1.0.0
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 'dataserver-gateway:start' "$f" && return 0
                  cat >> "$f" <<'DATASERVER_BLOCK'

                <!-- dataserver-gateway:start -->
                ## Data analysis (via the sandbox MCP gateway)

                - Statistical analysis tools reach you through the `mcp-gateway` MCP server:
                  `profile_dataset`, `aggregate`, `detect_outliers`, `correlate`, `compare_groups`,
                  `summarise_timeseries`, `validate_dataset` (Codex shows them as
                  `mcp__mcp_gateway__<tool>`). They are all read-only. Use them for profiling,
                  aggregation, outlier detection, correlation, group comparison, time-series
                  summaries and data validation instead of writing your own analysis code,
                  so the computation is auditable.
                - Datasets are passed inline as tool input. Read the data (for example a CSV in
                  the workspace) and send the rows in the call; the server stores nothing.
                - The server runs on the developer's own machine, behind the gateway. There is
                  no data-analysis server in your MCP configuration and no credential in this
                  sandbox: never call `http://127.0.0.1:8000` or any data-server URL directly,
                  and never look for `DATA_ANALYSIS_TOKEN` or other tokens.
                - Not available: if none of the tools above is offered, the local data server is
                  not running or not attached. Stop and tell the user to start it on their own
                  machine, run `sbx mcp load dataserver --sandbox <sandbox-name>` (or recreate
                  the sandbox), and then start a new agent session, because tools granted after
                  this session started will not appear in it.
                <!-- dataserver-gateway:end -->
                DATASERVER_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 data-analysis rules to the agent's always-loaded instructions
              env:
                - HOME
                - PATH
              user: agent
    - type: com.docker.sandbox/agent-context@1
      config:
        content: |
            ## Data analysis

            A local data-analysis MCP server is registered on the host's sandbox MCP
            gateway; it runs on the developer's own machine behind a token the host
            holds. Its tools reach you through the `mcp-gateway` MCP server:
            `profile_dataset`, `aggregate`, `detect_outliers`, `correlate`,
            `compare_groups`, `summarise_timeseries`, `validate_dataset`. All are
            read-only. There is no data-server entry in your own MCP configuration
            and no credential in this environment.

            - Prefer these tools over hand-written analysis code for profiling,
              aggregation, outliers, correlations, group comparisons, time-series
              summaries and validation: their results are computed, not reasoned,
              and every call is audited on the gateway.
            - Datasets are passed inline in the tool call. Read the data from the
              workspace and send the rows; the server stores nothing.
            - Never call `http://127.0.0.1:8000` or any data-server URL directly,
              and never look for `DATA_ANALYSIS_TOKEN` or other tokens.
            - Not available: if none of these tools is offered, the server is not
              running or not attached. Stop and tell the user to start it on their
              machine, run `sbx mcp load dataserver --sandbox <sandbox-name>` (or
              recreate the sandbox), and then start a new agent session, because
              tools granted after this session started will not appear in it.