Skip to main content
Back to all articles
AI Engineering 14 min readUpdated November 16, 2026

Shipping MCP Connectors with Deployment Receipts and Continuous Reconciliation

Dynamic MCP connectors are production workloads, not just tool names. Design a fleet inventory that binds authorized capabilities to verified artifacts, runtime isolation, fresh launch receipts, reconciled instances, and safe revocation.

By Salman Butt · Senior Full-Stack & Generative AI Engineer
#mcp#ai-agents#connector-security#supply-chain#runtime-attestation#typescript#python#observability#platform-engineering
On this page

MCP makes capabilities easy to connect to an AI assistant. But connecting a server in development and operating a trustworthy fleet of servers are different engineering tasks. When an agent can request integrations dynamically, the real question is not only whether a connector works. It is which workload is supplying the capability, how that workload was approved, and whether that approval still applies.

Consider a hypothetical incident-response assistant that reads application metrics across staging and production. A developer requests another diagnostics connector for staging. An orchestration service locates a suitable integration, prepares credentials, and launches it. The new tools appear in the assistant. Everything seems fine.

Now ask the deployment team to identify the exact executable, effective network permissions, credential scope, owner, and policy revision of that connector. Could it answer from a durable record, even after the first process exits and a new worker starts?

That is the engineering problem addressed here. The architecture and code are original design examples, not verified production deployments, measurements, or an MCP feature implemented by the protocol itself. This extends my articles about MCP tool-definition drift, agent-skill supply chains, and sandboxing untrusted agent code. The focus here is the operational lifecycle of connector deployments.

Your dependency manifest may not show your connector fleet

A regular software inventory starts with application manifests and container images. That is useful, but it can miss tools launched alongside the application.

The npm exec documentation describes how npm can obtain a package into its cache and execute its binary. The uv documentation explains temporary, cached environments used by its tool runner. Neither mechanism requires the caller to add the executable to the application repository's dependency manifest.

There is nothing inherently wrong with temporary tool execution. The problem comes when a production agent can activate an auxiliary process without that process becoming a managed deployment. Package scanners are not a substitute for an inventory of *running connector instances*.

A remote MCP server creates a different version of the same visibility problem. There is no local package to inspect. What matters is the approved destination, authenticated connection, delegated account permissions, and the current contract exposed to the host.

This leads to three distinct identities:

IdentityExampleTrusted owner
Requested capabilityRead-only staging metricsAuthenticated user and application policy
Resolved distribution or endpointVerified local artifact or controlled HTTPS originResolver and verification service
Active runtime bindingIsolated workload instance or remote connection policyLauncher or managed gateway

A connector display name is useful for discovery, but it is not a sufficient identity in any of those layers.

The Registry is a catalog, not your authorization database

The official MCP Registry stores metadata describing MCP servers and where to find them. Its publisher namespace and package ownership checks support accountable discovery. The Registry documentation also distinguishes metadata hosting from the package registries that distribute actual executable code, and it delegates code security scanning to other systems.

That is an important architectural division. Discovery should give the host *candidates*. The host still needs to decide which candidates satisfy an organization's security, compatibility, ownership, and operational requirements.

A model's preferred server name cannot create that approval. Neither can metadata returned by an untrusted page. The approved connector record must be authored by the application control plane after the relevant reviews.

Similarly, server-reported identity is not proof of infrastructure identity. The MCP TypeScript SDK 2026-07-28 migration notes explicitly describe server information as self-reported and unsuitable for security decisions. Treat it as useful diagnostic context, not a credential.

Architecture: compare desired state with observed state

I would keep two records for every managed connector.

Desired state describes what the organization approved: tenant and environment, allowed capabilities, artifact or endpoint identity, isolation profile, credential profile, policy revision, expiration, and owner.

Observed state describes what a trusted runtime actually produced: instance identity, artifact measurement or verified remote binding, effective isolation configuration, active credential profile, current policy revision, and a timestamp.

A reconciler compares these records and publishes only matching instances to the agent's tool dispatcher.

~~~text Authenticated request for capability | v Capability policy service | approved desired state | +----------+----------+ | | v v Local artifact resolver Remote endpoint verifier digest / provenance TLS / auth / origin | | +----------+----------+ | v Protected deployment control | stage | launch | verify | v Observed runtime receipts | v Reconciliation / \ matched mismatch / unknown | | tool dispatch quarantine + alert | action authorization

Approval, runtime evidence, and tool permissions are separate decisions. ~~~

This diagram describes an application design, not a new MCP wire protocol. It also does not assume all connectors run locally: managed HTTPS connections produce a different kind of observation from a process supervisor.

Define a deployment contract before you launch anything

For a local metrics connector, a desired-state record might be shaped like this:

~~~json { "installationId": "staging-metrics-integration", "tenantId": "tenant-example", "mode": "local", "artifactSha256": "sha256:PLACEHOLDER_REVIEWED_DIGEST", "sandboxPolicyId": "observability-readonly-v3", "credentialProfileId": "staging-metrics-reader", "capabilityIds": ["metrics.query", "metrics.series.read"], "policyRevision": 12, "approvalExpiresAt": "2026-12-01T00:00:00Z" } ~~~

The hash above is deliberately a placeholder and not a real artifact checksum; this is an application-owned schema, not a standardized MCP configuration format.

A version string alone does not prove what code is running. A verified archive digest or container image digest can identify the bytes the organization reviewed. Authenticated build provenance may provide additional evidence about the artifact's origins. The SLSA v1.2 provenance guidance describes these supply-chain evidence concepts. Provenance is not a guarantee that code is vulnerability-free.

The isolation policy is a different concern. Even code with an approved digest could be launched with an unintended home-directory mount or a production credential. An admitted deployment must match the policy under which it was reviewed, not only the package it uses.

That is why I treat artifact identity, environment scope, tool capabilities, network permissions, and credential scope as separate fields.

TypeScript: admit a verified instance, not a self-reported name

The following code models a deterministic admission decision for local connector instances. It does not install packages or claim to attest a process by itself.

~~~typescript type Desired = Readonly<{ installationId: string; tenantId: string; digest: string; sandboxPolicy: string; credentialProfile: string; capabilities: readonly string[]; policyRevision: number; validUntilMs: number; }>;

type Observed = Readonly<{ installationId: string; tenantId: string; digest: string; sandboxPolicy: string; credentialProfile: string; capabilities: readonly string[]; appliedRevision: number; workloadId: string; epoch: number; measuredAtMs: number; }>;

type Decision = | { kind: "admit"; workloadId: string; epoch: number } | { kind: "quarantine"; reason: string };

function sameCapabilities( left: readonly string[], right: readonly string[], ): boolean { if (new Set(left).size !== left.length || new Set(right).size !== right.length) return false; const expected = new Set(left); return left.length === right.length && right.every((item) => expected.has(item)); }

export function decideAdmission( desired: Desired, observed: Observed, nowMs: number, maxEvidenceAgeMs: number, ): Decision { const block = (reason: string): Decision => ({ kind: "quarantine", reason });

if (!Number.isSafeInteger(nowMs) || !Number.isSafeInteger(maxEvidenceAgeMs) || maxEvidenceAgeMs <= 0) { return block("invalid_time_policy"); }

if (desired.validUntilMs <= nowMs) { return block("approval_expired"); } if (desired.installationId !== observed.installationId || desired.tenantId !== observed.tenantId) { return block("scope_mismatch"); } if (desired.policyRevision !== observed.appliedRevision) { return block("policy_revision_mismatch"); } if (!desired.digest.startsWith("sha256:") || desired.digest !== observed.digest) { return block("artifact_mismatch"); } if (desired.sandboxPolicy !== observed.sandboxPolicy || desired.credentialProfile !== observed.credentialProfile) { return block("runtime_policy_mismatch"); } if (!sameCapabilities( desired.capabilities, observed.capabilities, )) { return block("capability_mismatch"); } if (!observed.workloadId || !Number.isSafeInteger(observed.epoch) || observed.epoch < 1) { return block("invalid_instance"); } const age = nowMs - observed.measuredAtMs; if (age < 0 || age > maxEvidenceAgeMs) { return block("stale_evidence"); } return { kind: "admit", workloadId: observed.workloadId, epoch: observed.epoch, }; } ~~~

The critical assumption is that observed data arrives through an authenticated, trusted launcher or verification service. The model and the untrusted connector must not be able to invent their own digest, tenant ID, or sandbox profile. In production, bind the observation cryptographically or through an authenticated workload-identity channel to the live instance, and prevent replay of old receipts. This pure function is one application decision, not a complete attestation implementation.

The launcher must enforce the actual sandbox and credential controls. For consequential tools, the dispatcher must independently enforce the current user's authorization too. See agent action authorization gates.

A launch should be a state transition with an audit trail

Starting a process and admitting its tools should not be the same event. I would track a simple lifecycle:

  1. Resolved: a trusted resolver selected a specific artifact or endpoint.
  2. Verified: applicable integrity, publisher, and provenance checks completed.
  3. Provisioned: runtime isolation and scoped credentials were prepared.
  4. Started: a supervisor launched an instance and assigned a generation.
  5. Ready: transport and the approved capability contract passed their checks.
  6. Admitted: the runtime receipt matched current desired state.
  7. Draining or revoked: new dispatches are blocked, existing work is reconciled, and credentials are withdrawn.

This separation exposes partial failures. A successful download is not a healthy process. A healthy process is not evidence of the right permissions. A successful tool call is not proof that authorization was correct.

Use append-only events for the deployment history and a current-state projection for dispatch. The event record should contain the operation ID, connector ID, tenant scope, policy revision, instance epoch, decision, evidence identifiers, and timestamps. Avoid recording plaintext secrets or full tool payloads. This is related to durable agent execution, but it manages infrastructure state rather than the agent's conversation steps.

Python: reconcile the fleet and flag unmanaged instances

A runtime inventory that is never checked becomes another stale database. I would reconcile whenever desired state changes, when an instance is launched or terminated, and periodically to catch events the controller missed.

~~~python from dataclasses import dataclass from typing import Literal

State = Literal["ready", "missing", "drifted", "unknown"]

@dataclass(frozen=True) class Desired: key: str tenant: str digest: str revision: int

@dataclass(frozen=True) class Observed: key: str tenant: str digest: str revision: int

@dataclass(frozen=True) class Finding: key: str state: State reason: str

def reconcile( desired: list[Desired], observed: list[Observed], ) -> list[Finding]: wanted: dict[str, Desired] = {} seen: dict[str, list[Observed]] = {}

for item in desired: if item.key in wanted: raise ValueError("duplicate desired identity") wanted[item.key] = item

for item in observed: seen.setdefault(item.key, []).append(item)

results: list[Finding] = []

for key, target in wanted.items(): replicas = seen.pop(key, []) if len(replicas) == 0: results.append(Finding(key, "missing", "no_instance")) continue if len(replicas) != 1: results.append(Finding( key, "drifted", "unexpected_replica_count" )) continue

actual = replicas[0] if actual.tenant != target.tenant: reason = "tenant_mismatch" elif actual.digest != target.digest: reason = "artifact_mismatch" elif actual.revision != target.revision: reason = "outdated_policy" else: reason = ""

results.append(Finding( key, "drifted" if reason else "ready", reason or "matched", ))

for key in seen: results.append(Finding(key, "unknown", "not_in_desired_state"))

return sorted(results, key=lambda item: item.key) ~~~

This example assumes a single desired instance per connector key. A multi-replica deployment would need explicit approved replica counts, availability zones, and rolling-upgrade generations. It should not accept duplicate processes merely because they have the expected name.

The output is a reconciliation plan, not a script that kills processes. A privileged controller applies actions only after checking the latest revision and instance epoch. Otherwise two reconcilers can race and shut down a legitimate replacement.

Runtime identity is not the same for remote MCP

For a managed HTTPS connector, the host generally cannot inspect the vendor's deployed executable. An artifact digest supplied by the remote server would not be independent proof.

Instead, the host's binding can verify:

  • the configured canonical origin and network route, with normal TLS validation;
  • authenticated destination identity, expected authorization server and token audience;
  • tenant-specific delegated privileges and credential scope;
  • the approved tool contract and observed schema revision;
  • the policy revision, observation time, and verifier identity.

The MCP Security Best Practices discuss risks including token passthrough, confused-deputy behavior, server-side request forgery, and local server compromise. Those are relevant regardless of whether the tool is locally launched or remotely hosted.

An endpoint returning the expected tool names is not sufficient proof that a request is authorized. A remote server can truthfully report its own version and still have undergone a deployment change the client cannot independently inspect. Keep contractual validation, authorization, and monitoring separate from claims about underlying binaries.

Failures I would deliberately simulate

The point of this design is to detect differences between approved intent and operational reality, not just block a suspicious package name at install time.

A delayed launch after revocation. An installation is queued, its approval is withdrawn, and the worker eventually resumes. Admission must compare against *current* policy at launch and dispatch time, not an old queue message.

An approved executable with unexpected credentials. Artifact verification succeeds, but the process receives broader credentials than intended. Credential profiles and egress are independent runtime properties, so artifact equality must not override those checks.

An orphaned process. A launcher crashes after creating the process but before committing a receipt. The reconciler must treat the instance as unmanaged and prevent it from being offered to the agent. Cleanup should be controlled by a privileged supervisor.

Two active instances claim one identity. An old and a new worker both expose the same connector. Instance epochs and fenced dispatch prevent stale workloads from reclaiming authority.

A source metadata update silently changes resolution. Discovery records are updated, but desired state should remain pinned until a separate release review accepts the change. A new candidate is not an approved upgrade.

A child process escapes the inventory. The approved connector launches another executable with inherited privileges. The sandbox and runtime supervisor must constrain process creation and filesystem/network reach; inventory alone is not a process-isolation boundary.

An apparently healthy remote connector changes its tool definitions. Runtime binding and tool-definition verification must both run. See MCP tool fingerprinting.

These are hypothetical test scenarios, not claims of incidents encountered in a specific system.

Measure control-plane health, not only tool-call latency

An MCP tool may answer quickly while the deployment around it is badly governed. I would add operational signals that describe admission and lifecycle quality.

SignalWhat it answers
Desired-to-observed mismatch countWhich connectors are missing, drifting, or unexpected?
Admission denials by categoryAre artifacts, permissions, or approvals out of sync?
Approval-to-ready latencyWhere is connector onboarding getting stuck?
Runtime evidence ageHow stale is the proof attached to active instances?
Revocation-to-block latencyHow long can a revoked connector still receive new calls?
Unmanaged-instance detectionAre processes bypassing the approved launcher?
Failure rates by connector generationDid a new rollout degrade the tool fleet?
False-quarantine reviewsAre security controls blocking valid work?

These are proposed metrics, not observed results or invented benchmarks.

Protect telemetry carefully. Do not export credentials, tenant secrets, raw command lines containing tokens, or arbitrary tool outputs as metric labels. Use stable low-cardinality dimensions for dashboards and keep exact evidence in access-controlled audit records.

A consequential tool trace should reference the connector identity, approved policy revision, live workload epoch, and operation correlation ID. That ties the action to the runtime that actually served it, complementing agent observability with OpenTelemetry.

Revocation is part of the deployment contract

Deleting a connector configuration does not prove that a process is gone. Nor does terminating a process prove that an in-flight write failed.

Revocation should prevent new dispatch, invalidate cached catalog entries, withdraw or rotate appropriate credentials, terminate or isolate local workloads, and reconcile any uncertain side effects. For writes, idempotency keys and authoritative outcome checks remain necessary; see safe agent side effects.

This boundary should survive worker crashes and controller failover. If the reconciler is unavailable, an unverified new connector should not become available by default. Existing approved bindings may continue only within an explicit freshness and risk policy, with a defined expiration rather than indefinite trust.

When the extra control plane is justified

There is real engineering cost here: a desired-state store, trusted launcher integration, artifact or endpoint verification, runtime observations, reconciliation, incident procedures, and people who own approvals.

For one developer using a disposable local MCP server with no sensitive credentials, that complexity may be unnecessary. A fixed, reviewed configuration with narrow filesystem access can be appropriate.

For multi-tenant production agents, however, dynamic connectors become an infrastructure fleet. The more agents can request new capabilities without a conventional software release, the more important it is to separate requesting a capability from deploying a verified workload.

I would introduce the system incrementally: begin with read-only inventory, enroll one low-risk connector, test mismatch handling, add admission enforcement, drill revocation, and then widen coverage to integrations with greater consequences. A sudden fleet-wide default-deny change without inventory is likely to break legitimate workflows.

The design principle I would keep is straightforward: the list of tools an agent can see should be a projection of currently authorized deployments, not a collection of names it happened to discover. When a connector is a managed workload, its origin, effective privileges, lifecycle, and removal become reviewable engineering facts.

Primary references

KEEP READING

Related engineering notes