Skip to content

Local MCP servers: add pinned npm or PyPI package servers from Settings, run in the task container #3532

Open

Description

@integry

Problem

A local (stdio) MCP server can reach a run only through the operator-installed catalog: the operator lists it in a JSON file on the host, and its executable must already be baked into the agent image. An administrator cannot add one from Settings. Most of the MCP ecosystem is local servers started with npx or uvx (browser automation, database clients, many vendor servers), so the library today covers hosted HTTPS servers and little else.

What to build

A third kind of library MCP server, package, that an administrator adds from Settings and that runs inside the task container.

Contract

A package server has, in addition to the fields every library item has (name, enabled, repository and agent limits, automatic apply, tools, capability):

  • ecosystem: npm or pypi
  • package: the package name
  • version: an exact version. Ranges and tags (latest, ^1.2) are rejected.
  • integrity: resolved by ProPR when the item is saved (the registry's integrity hash for npm; the artifact's SHA-256 for PyPI) and stored with the item. Not entered by the administrator.
  • bin (optional): which executable of the package to run when it has more than one
  • args: a fixed list of arguments
  • env: a list of { name, value } plain variables
  • secretEnv: a list of variable names whose values are write-only secrets, stored like other extension secrets

There is no free-form command, no shell, no host path, no extra mount, no Docker socket and no Docker image. command, argv and endpoint overrides stay rejected as they are today.

Install and launch

  • Resolving a package happens on save and on "Check": ProPR looks the package and version up in the public registry, records the integrity value, and reports the executable it will run. Nothing is executed during Settings validation.
  • The package is installed once per integrity value into a worker-owned cache, not at task start and not inside the task's workspace. A run mounts the installed package read-only. Lifecycle scripts are not run during install (--ignore-scripts or the equivalent); a package that cannot work without them is reported as unsupported.
  • At launch the installed files are checked against the stored integrity value; a mismatch refuses the server (the run proceeds without it and the reason is recorded), as a catalog digest mismatch does today.
  • The server is started through the existing stdio bridge (/opt/propr/extension-stdio-bridge.mjs), which already enforces the selected tools, bounds the JSON protocol, drops child stderr and redacts configured secrets. Claude and Codex both launch it the way they launch a catalog stdio entry.
  • The server process gets the run's own network policy and nothing more.
  • The agent image must contain the runtimes needed to run installed packages (Node is present; add what pypi servers need, or support npm only in this issue and say so in the form and docs, whichever keeps the image change small).

Credentials

A local server runs in the same container as the agent. Any value in secretEnv is readable by the agent CLI, its shell tools and the repository's setup scripts; output redaction does not prevent that. This is unlike HTTPS servers, whose credential stays in Core behind the gateway.

  • The server form states this next to the secret fields, in plain words, and recommends a narrowly scoped credential.
  • Saving a package server that has any secretEnv entry requires the administrator to tick an explicit acknowledgement; the acknowledgement (who, when) is stored with the library revision.
  • A server with no secretEnv entries shows no warning and needs no acknowledgement.
  • Secret values travel through environment names only, never through launch arguments or config JSON, and are never written to the repository or the provider home.

Write capability, limits and visibility

Unchanged rules apply: a package server marked capability: write is exposed only when the run carries write authorization; the per-run limit of 8 servers counts all kinds together; the applied-extensions task event lists package servers by name with their version, and never includes env values or secrets.

Settings UI

In the MCP servers list and form from the settings issue: "Add server" offers Local package next to HTTPS endpoint and operator catalog entry. The form has ecosystem, package, exact version, optional executable, arguments, variables and secret variables, plus the common controls (tools, capability, limits, automatic apply). "Check" resolves the package and shows the resolved version, integrity value and executable. The row shows the kind as "Local" with the package and version.

Operator catalog entries stay as they are, for operators who want fixed, image-baked servers.

Out of scope

  • Servers distributed as Docker images or run as sidecar containers.
  • Free-form commands, shell snippets, host executables and host paths.
  • Private registries and registry credentials.
  • OAuth for local servers.
  • Automatic version updates: changing the version is an explicit edit that creates a new library revision.

Acceptance criteria

  • An administrator can add a package server from Settings; it is saved with an exact version and a resolved integrity value, and a version range or tag is rejected.
  • A run in a matching repository launches the server through the stdio bridge, and the agent can list and call its allowed tools (test with a small fixture package served from a local registry fixture, for Claude and Codex launch arguments).
  • The package is installed once and reused by later runs; no install happens inside the task workspace and no lifecycle script runs.
  • Changed files in the installed package (integrity mismatch) refuse the server at launch; the run proceeds and the task event records the reason.
  • A server with secretEnv cannot be saved without the acknowledgement; one without secrets needs none. The acknowledgement is recorded on the revision.
  • Sentinel tests: no secret value appears in launch arguments, config JSON, API responses, MCP projections, logs, task events, telemetry or a native export.
  • command, argv, host paths, mounts and Docker images are rejected by the API.
  • A write-capability package server is exposed only with write authorization; the labels disable-mcps and disable-extensions remove it; disabling the item removes it and re-enabling restores it.
  • UI component tests for the form (validation, Check, acknowledgement) and the row; the Playwright spec propr-ui/e2e/agent-extensions.pw.ts adds a local server.
  • docs/docs/features/agent-extensions.md documents local package servers: how to add one, pinning and integrity, where the server runs, the credential trust boundary, and what is out of scope. CHANGELOG.md has an entry.

Implementation notes

Starting points (verify each before relying on it):

  • Shared contract: packages/shared/src/extensionProfiles.ts (server kinds https and catalog today; resolveExtensionSet).
  • The operator catalog's stdio path is the model to follow and reuse: the catalog loader and digest check in packages/core/src/extensions/, the bridge /opt/propr/extension-stdio-bridge.mjs, and how ClaudeAgent and CodexAgent pass a stdio catalog entry to the CLI.
  • Launch: packages/core/src/extensions/extensionLaunch.ts; secrets: privateSecrets.ts; outbound registry requests go through endpointPolicy.ts.
  • Image: Dockerfile.agent, scripts/build-images.sh.
  • UI: the server list and form components from the settings issue; API client propr-ui/src/api/extensionProfilesApi.ts.
  • ProPR runs on SQLite only. Ordinary task runs are one-shot: no mid-run operator interaction.

Depends on the library, auto-apply, settings and OAuth issues of the same epic (#3509, #3510, #3511, #3512).

Activity

  1. propr-dev commented on Nov 13, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3532/claude-opus-5-5-local-mcp-servers-add-pin-20261113-1640-r7e
    • Base Branch: 3509-epic-extensions-library-14j
    • Worktree: issue-3532-20261113-1640-claude-opus-5-5-r7e

    🔍 Track Task Execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions