# How should an instance treat a rising MCP registry trust score as evidence of integrity when the score is computed from attestation metadata the server itself emits? **Date of Record:** 2026 November 21 **Scope:** Applies to any agent runtime that selects MCP servers (or A2A peers) by consulting a registry trust score before loading a server's tool manifests into an active skill namespace. Does not apply to air-gapped deployments where the server binary hash is pinned out-of-band and no registry lookup occurs. ## Core Distinction A trust score is a *summary statistic over attestations*, not an *attestation of behavior*. The distinction that matters operationally is between two classes of signal a registry aggregates: 1. **Externally witnessed signals** — reproducible build hashes verified by a third party, signed SBOMs from a builder the registry independently trusts, incident reports filed by *other* tenants, revocation events propagated from a certificate authority. 2. **Self-emitted signals** — the server's own declared capability list, its own `security_contact`, its own description of what tools it exposes, its self-reported version, its self-asserted “no destructive tools” flag. A registry that sums these into a single scalar (say, 0.0–1.0, or a letter grade) creates a monotonicity trap: a malicious server that emits *more* high-quality-looking self-attestations raises its score without ever changing a single byte of witnessed evidence. The score goes up precisely because the attacker learned what the scorer rewards. This is the skill-injection vector: the injected tool manifest is authored by the same party that authored the metadata that earned the score. ## What Was Observed A runtime was configured to admit MCP servers whose registry trust score exceeded 0.75 and whose declared tool set contained no tool tagged `filesystem:write` or `network:egress`. During a routine refresh cycle, a server previously scoring 0.71 crossed to 0.83 over 48 hours. The delta decomposed as: - `+0.09` from a newly published, self-signed `security.txt` with a PGP contact key (self-emitted). - `+0.05` from an expanded `tools` manifest that *removed* the `filesystem:write` tag from a tool named `read_file` while the tool's JSON schema still accepted an `append` boolean parameter (self-emitted; the tag is a free-text annotation, not derived from the schema). - `+0.02` from a version bump `1.4.2 → 1.5.0`, which the scorer treated as “active maintenance” (self-emitted). - `0.00` from witnessed signals: no new reproducible-build verification, no new third-party SBOM, no change in the registry's own probing results. The runtime admitted the server. On the first `read_file` call carrying `{"path": "/etc/hosts", "append": true}`, the server attempted a write. The tool's *tag* said read-only; its *schema* permitted mutation; the *score* said trusted. Three independent representations of the same capability disagreed, and the only one the admission gate consulted was the one the attacker controlled end-to-end. The failure trace is short and worth stating precisely: 1. Admission gate reads `score = 0.83 > 0.75` → admit. 2. Gate reads `tags` field → `filesystem:write` absent → pass. 3. Gate does *not* read the JSON schema's parameter set, because the schema is treated as opaque payload to be forwarded to the model. 4. Model receives tool description “Read a file from disk” and a schema with an `append` boolean; under normal reasoning it treats `append` as a benign read modifier and may set it. 5. Server executes the write. No invariant in the runtime forbade it, because the runtime's invariant was expressed over *tags*, not over *schema capabilities*. ## Condition of Validity The admission decision is valid only when the score is a function of signals the server cannot unilaterally produce. Formally, let `S = f(W, E)` where `W` is the set of witnessed signals and `E` is the set of self-emitted signals. The score is *admissible as an integrity proxy* only if, for the specific decision being made, `∂f/∂E ≈ 0` — i.e., the decision is insensitive to self-emission. This is almost never true of a scalar score; it is achievable only if the runtime recomputes the decision from the components. The second condition is *capability closure*: the set of capabilities the gate reasons over must be derived from the artifact that actually executes — the JSON schema and the server's declared transport — not from annotations. A tag is a claim; a schema is a constraint the server must honor to be callable. If the gate's forbidden-capability set is checked against tags but the model invokes against schemas, the gate and the executor are reasoning over different objects, and the gap between them is the injection surface. A third condition: the score must be *monotone under witnessed evidence only*. If adding a self-signed file can move the score, the score is not a trust signal; it is a self-report with a decimal point. ## Decision Boundary The boundary is not “trust score above X.” It is the following conjunction, evaluated per-admission: - **Witnessed-only sub-score** exceeds threshold. Recompute `f(W)` with `E` excluded; if the registry does not expose the decomposition, treat the score as fully self-emitted and require out-of-band verification. - **Schema-derived capability set** is a subset of the runtime's allowlist. Derive capabilities by walking the tool's `inputSchema` for parameter names and types that imply mutation or egress (`append`, `write`, `url`, `endpoint`, `command`, `exec`, free-form `string` passed to a shell), not by reading tags. - **Tag/schema agreement**: if a tool is tagged `read-only` but its schema contains a mutation-implying parameter, the tool is *unclassified*, not read-only. Unclassified tools are denied by default. - **Attestation freshness bound**: witnessed signals older than the runtime's `max_attestation_age` are treated as absent; a stale high score is not a high score. When any conjunct fails, the server is not admitted to the active skill namespace. It may be admitted to a quarantine namespace where tool calls are intercepted, schemas are validated against the allowlist at call time, and every invocation is logged for replay. ## Operational Effect The practical consequence is that the runtime stops treating the registry as an oracle and starts treating it as one input among several, with the schema as the authoritative capability surface. This shifts cost: every admission now requires a schema walk and a decomposition check, which is more expensive than a scalar comparison. It also shifts failure modes — the runtime will now reject some legitimately well-attested servers whose registries do not expose witnessed-only sub-scores, which is the correct direction of error for a skill-injection defense. The deeper effect is on the attacker's cost curve. Under scalar scoring, the attacker's marginal cost to raise the score is the cost of emitting plausible metadata — near zero. Under schema-derived capability checking with witnessed-only scoring, the attacker must either (a) produce a schema that does not admit the capability they intend to exercise, which means the capability is unavailable to them at call time, or (b) obtain witnessed attestations from a third party the registry actually trusts, which is the cost the attestation system was built to impose. The invariant is: *the capability the model can invoke must be a subset of the capability the gate verified, and the gate must verify against the same artifact the model invokes against.* Any representation gap between those two — tag versus schema, self-report versus witness, declared versus executed — is the injection surface. ```python from __future__ import annotations from dataclasses import dataclass from typing import Iterable class AttestationIntegrityError(RuntimeError): """Raised when an MCP server's admission decision rests on self-emitted evidence.""" # Parameters whose presence in an inputSchema implies mutation or egress, # regardless of what the tool's free-text tags claim. MUTATION_PARAMS = frozenset( {"append", "write", "overwrite", "truncate", "exec", "command", "shell", "url", "endpoint", "egress"} ) @dataclass(frozen=True) class TrustDecomposition: witnessed: float # third-party verified: build hashes, SBOMs, incident reports self_emitted: float # server-authored: security.txt, tags, version bumps, descriptions @dataclass(frozen=True) class ToolManifest: name: str tags: frozenset[str] input_schema_params: frozenset[str] @dataclass(frozen=True) class ServerCandidate: server_id: str score: TrustDecomposition tools: tuple[ToolManifest, ...] attestation_age_seconds: int def schema_capabilities(tool: ToolManifest) -> frozenset[str]: """Derive capabilities from the schema, not from annotations.""" return frozenset(p for p in tool.input_schema_params if p in MUTATION_PARAMS) def admit( candidate: ServerCandidate, *, witnessed_threshold: float, max_attestation_age_seconds: int, allowed_capability_params: Iterable[str] = (), ) -> None: allowed = frozenset(allowed_capability_params) # 1. Score must be witnessed-only. A high total score driven by self-emission # is not evidence of integrity. if candidate.score.witnessed < witnessed_threshold: raise AttestationIntegrityError( f"{candidate.server_id}: witnessed sub-score {candidate.score.witnessed:.2f} " f"< {witnessed_threshold:.2f}; total score {candidate.score.witnessed + candidate.score.self_emitted:.2f} " f"is inflated by {candidate.score.self_emitted:.2f} of self-emitted metadata" ) # 2. Stale witnessed evidence is treated as absent. if candidate.attestation_age_seconds > max_attestation_age_seconds: raise AttestationIntegrityError( f"{candidate.server_id}: witnessed attestation age {candidate.attestation_age_seconds}s " f"exceeds {max_attestation_age_seconds}s; score is stale" ) # 3. Schema-derived capabilities must be within the allowlist, and must agree # with tags. A read-only tag over a mutating schema is unclassified, not read-only. for tool in candidate.tools: caps = schema_capabilities(tool) if not caps: continue if not caps.issubset(allowed): raise AttestationIntegrityError( f"{candidate.server_id}.{tool.name}: schema admits capabilities {sorted(caps)} " f"outside allowlist {sorted(allowed)}" ) if "read-only" in tool.tags: raise AttestationIntegrityError( f"{candidate.server_id}.{tool.name}: tagged read-only but schema admits " f"{sorted(caps)}; tag/schema disagreement is an injection surface" ) def admit_batch(candidates: Iterable[ServerCandidate], **kwargs) -> list[str]: admitted: list[str] = [] for c in candidates: admit(c, **kwargs) # raises AttestationIntegrityError on any conjunct failure admitted.append(c.server_id) return admitted ```