npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sentropic/mcp-platform

v0.4.3

Published

Generic Sentropic/STP MCP provider platform contract: manifest/adapter/context schemas, session/consent/enrollment/secret records, elicitation, per-request authz, discovery/visibility and durable-call refs (SPEC_EVOL_APP_MCP_PROVIDER_PLATFORM). Broker-awa

Readme

@sentropic/mcp-platform

Status: ACTIVATING (BR-42l) — public 0.1.0, narrow read-only freeze. Generic Sentropic/STP MCP provider platform contract. Published with a deliberately narrow frozen surface (the read-only pure-adapter contract a federated connector drives); the mutation/elicitation/durable surface ships published-but-unstable under ./experimental. Authoritative: spec/SPEC_EVOL_MCP_PLATFORM_ACTIVATION.md (owner-decided); socle: spec/SPEC_EVOL_APP_MCP_PROVIDER_PLATFORM.md.

Public API — three tiers

The exports map (not discipline) enforces the tiers; only the root . carries a compat guarantee.

  • . (root) — FROZEN, semver-governed (§3.1): the read-only pure-adapter contract — manifest & capability classification, read/result envelopes, lifecycle records, StpConnectorContext, AppConnectorProviderAdapter, SecretStatus (incl. the 'operator' scope) and the dependency-free listVisibleCapabilities. A read-only connector imports ONLY this. 1.0.0 deferred (0.x additive-first).
  • ./experimental — @experimental, NOT frozen, semver-exempt: the mutation gate, the elicitation state machine + provisional policy (F8), the DurableCall mirror, and the store PORT interfaces. Usable but unstable — do not depend on it in production; pieces get promoted to the frozen root additively once a real consumer proves them.
  • ./testing — @internal, NOT frozen: mocks/fixtures/reference (mock OIDC, in-memory MCP transport, fake connector, in-memory audit/secret/tenant/consent/durable stores) that a real host replaces.
  • ./tool-configuration — @public, additive in 0.3.0: the generic approved tool-configuration codec/compiler (Lot 1a). It compiles a versioned approved snapshot against a provider manifest and a local handler table into an immutable configuration or typed diagnostics before activation. Synthetic providers only; no Immo fixture.

The internal composition below (build slices 1/2/3/7) describes what lives in each tier.

What this is

A faithful, app-neutral TypeScript scaffold of the generic Sentropic/STP MCP provider platform contract, plus an in-memory test harness that proves the security-critical isolation properties — with no real network, no production credentials, no real Claude.ai dependency, no DB, and no mcp-wave coupling.

Wave / immo are consumers/examples only; nothing domain-specific is baked in.

Tool-configuration compiler (src/tool-configuration.ts, ./tool-configuration)

Strict, pure, zero-I/O compiler for an approved per-tool configuration snapshot:

  • Inputs: versioned snapshot (schemaVersion: "v1"), provider manifest, local handler table and the consumer-supplied compatibility digest (generic helper computeCompatibilityDigest covers the public schemas/result codec; the compiler compares it, never derives it).
  • Checks: mandatory qualified versions (providerVersion equals the manifest version, platformVersion equals the package version), manifest digest, consumer compatibility digest, snapshot-carried handler-table shape digest (handlersDigest, compared to the local table with handlers_digest_mismatch), mandatory payload digest (binds manifest + compatibility + handler digests), exact tool coverage (no rename, remove, add or param/result change), handler allowlist (table keys equal handlerId), closed-schema typed per-tool values (mistyped keywords rejected), manifest policy merged field by field with no weakening, closed provenance keys (approvalRef, revision, manifestDigest, payloadDigest, reviewedBy) with inspected strings as bounded heuristics (role/review identifiers expected; opaque sub/UUID undetectable by value; known credential/bearer/JWT/email and dangerous/scheme:///mailto:/ssh: patterns rejected without claiming universal secret/PII detection, including overlays).
  • Output: deep-cloned then deeply frozen CompiledToolConfiguration (exposes payloadDigest, approvalRef, versions and handlersDigest) or typed diagnostics; invalid candidates retain the active generation, activate accepts compiler-branded configurations only, and cold starts fail closed. See tests/tool-configuration.test.ts (discriminating tests per control; the separate-process test loads dist/ and the clean-consumer probe installs the packed tarball via make probe-mcp-platform-clean-consumer, comparing frozen digests with zero fetch).
  • Provenance and registry contract (spec-v5 §5/§11): approvalRef/reviewedBy are consumer-local opaque review references (no Sentropic approver, no cross-repo equality); the compiler is a subordinate validator of the future @sentropic/mcp-platform/registry (§3.1), not the product registry; a digest proves integrity, not authorization; handlersDigest is a shape digest, not code attestation (code bound via package/image receipts); platformVersion strictly equals the package version.

Slice 1 — manifest & adapter schemas (src/manifest.ts, src/runtime.ts)

Concrete TypeScript for the spec §4 closed schemas:

  • AppMcpProviderManifest, CapabilityResource / CapabilityTool / CapabilityPrompt, AppCapability;
  • RedactionClass, Mutability, IdempotencyRequirement, CapabilityGates, AuthFreshnessPolicy, ConnectorSecretRequirement, ConnectorTenantResolutionInput, ConnectorTenantContext;
  • StpConnectorContext (audited just-in-time getSecret accessor — no plaintext map), AppConnectorProviderAdapter;
  • request/result envelopes, DurableCallRef (== DurableCall.id), session/consent/enrollment/secret records, ConnectorVisibilityState, McpDurableCallRefs.

Read-only capabilities (resources, prompts) declare the closed read-only exception explicitly (mutatesExternalSystem: false, idempotency: { required: false }).

Slice 2 — mock harness + middleware + tests

  • src/mock/oidc.ts — in-memory mock OIDC issuer: EdDSA-signed tokens with sub / aud / scope / auth_time / tid, a public JWKS, and a revocation list. Uses only Node's built-in crypto (no external dep, no network).
  • src/mock/mcp-transport.ts — in-memory mock MCP client/server transport with per-session client binding.
  • src/mock/fake-connector.ts — app-neutral fake connector adapter fixture.
  • src/authz.ts — per-request authz middleware stub: audience-bound token verification, principal+tenant derived from the token only (never from tool/model-supplied ids), per-capability scope + freshness checks, deny-as-missing discovery, and mutation gating (gate + idempotency + audit).
  • src/elicitation.ts — fail-closed elicitation state machine (resume / cancel / timeout / denied, anti-phishing sub-match, NHI fail-closed).
  • src/audit.ts / src/context.ts — in-memory audit sink + redaction and the audited secret accessor backing StpConnectorContext.getSecret.

Slice 3 — restart-safe mock persistence + §11 persistence probes

Closes the review-identified coverage gap (the §6.3 records + §6.4 secret status were type-only and the §11 persistence probes were not exercised).

  • src/persistence.ts — generic restart-safe RecordStore<T> primitive. Two backings: MemoryRecordStore (non-durable default; restart simulated via MemoryRecordStore.fromSnapshot(store.snapshot())) and FileRecordStore (a durable JSON file under the OS tmp dir, never in the repo; a brand-new instance at the same path = a genuine process restart, with reload() / snapshot()). NO real DB/driver/network.
  • src/stores.ts — typed SessionStore / ConsentStore / EnrollmentStore / SecretStatusStore / ElicitationStore ports over RecordStore<T>, backing the §6.3 (McpSession, ConsentGrant, ConnectorEnrollment), §6.4 (SecretStatus, composite key (principalSub, tenantRef, workspaceRef?, connectorInstanceId, name)) and §5.1 (ElicitationRecord) records. All resolution is fail-closed (non-active/expired/missing → deny).
  • elicitation.ts / context.ts / authz.ts now resolve their §5.1 / §6.4 / §6.3 state THROUGH these stores (default backing = non-durable in-memory, so the F1-F9 security fixes and the existing suite are unchanged; inject a FileRecordStore for restart-safety). Secret VALUES are NEVER written to the durable medium — only status crosses the boundary (§5.2(b) / §11 no-leak).
  • tests/persistence-store.test.ts + tests/persistence.test.ts — the §11 probe matrix: restart lookup survives reload; session/consent expiry denied after reload; revoked-session denial; consent revocation persists; secret-status non-active persists fail-closed (and no value on the durable medium); enrollment revocation persists → no_enrollment after restart (F1 across restart); elicitation resume-after-restart + the resumed gate stays bound to capability/session/principal post-reload (no replay).

Slice 7 — mock durable-call / workflow adapter for long-running tools

Models a long-running MCP tool call via the canonical DurableCall lifecycle (§8 -> SPEC_EVOL_AGENT_RUNTIME_HERMES_LOOP.md §3.2), restart-safe over the slice-3 persistence layer. The canonical DurableCall shape is not forked: MCP correlation is threaded alongside it (McpDurableCall = { call, refs, waitingFor? }).

  • src/runtime.ts — adds the canonical DurableCall / DurableCallKind / DurableCallState types (verbatim from Hermes §3.2) and the MCP projection McpDurableCall (canonical record + McpDurableCallRefs + the waiting qualifier DurableCallWaitingFor).
  • src/durable.ts — PersistentDurableCallStore (a DurableCallStore over the slice-3 RecordStore<T>, so durable calls survive a restart) + DurableCallAdapter: launch / start / wait(reason) / resume / succeed / fail / cancel / status. Lifecycle queued -> running -> waiting -> succeeded|failed|cancelled, with waiting qualified by elicitation|consent|freshness|external-workflow.
    • Idempotent launch: a repeated launch with the same idempotencyKey returns the SAME durable call — never a duplicate.
    • Fail-closed resume: a waiting call only resumes once its wait condition is cleared (elicitation gate released via the slice-2 ElicitationManager, or an injected isWaitCleared resolver for consent/freshness/external-workflow; absent resolver = never clears). succeed is reachable only from running, so a waiting-on-consent call can never succeed until consent is present.
    • Audited: every transition emits a redacted audit event carrying ids/state/refs only — never a token, secret value or PII.
  • src/mock/fake-connector.ts — adds a long-running, workflow-backed tool export_widgets (declared in manifest.durability.longRunningTools / workflowBackedTools). Its invokeTool returns a DurableCallRef instead of an inline result (via the injected launchDurable); fails closed when no durable backend is wired.
  • tests/durable.test.ts — the §8 / §11 "Long call lifecycle" probes: queue->run->wait(elicitation)->resume->succeed; cancel-from-waiting; failure path; idempotent re-launch returns same id; mid-flight call survives a restart (reload) and resumes; waiting-on-consent cannot succeed until consent present; no token/secret in durable-call audit; long-tool returns a DurableCallRef.

§12 slice coverage map

This package realizes a subset of the spec §12 "reversible build slices" as a mock-only scaffold. The code comments use an internal build-slice ordering (1 schemas, 2 mock harness + middleware, 3 persistence, 7 durable-call) that consolidates several §12 concepts into single commits; this ordering is NOT the spec §12 item numbering. The table below is keyed to the authoritative spec §12 list so a reader can cross-reference precisely.

| spec §12 item | status | realized in (build-slice) | | --- | --- | --- | | 1. App-neutral manifest & adapter schemas | REALIZED | src/manifest.ts, src/runtime.ts (slice 1) | | 2. Mock OIDC + mock MCP harness | REALIZED | src/mock/oidc.ts (MockOidcIssuer), src/mock/mcp-transport.ts (slice 2) | | 3. MCP session storage interface + in-memory impl | REALIZED | src/stores.ts (PersistentSessionStore), src/persistence.ts (slice 3) | | 4. Capability registry projection | REALIZED (single-connector) — SUBSUMED into discovery | src/guard.ts listVisibleCapabilities, ConnectorVisibilityState (slice 2). Cross-connector multiplexer → item 10 | | 5. Per-request authz middleware + tenant resolver port | REALIZED | src/authz.ts (authorizeRequest, TenantResolver, ConsentResolver) (slice 2) | | 6. Elicitation protocol + surface-neutral renderer contract | REALIZED (protocol) | src/elicitation.ts (ElicitationManager); typed modes / provisional ElicitationPolicy (F8, architect-gated). No UI renderer (no UI surface) (slice 2) | | 7. Audit/redaction event schema | REALIZED | src/audit.ts (AuditEvent, SecretRedactor, InMemoryAuditSink) (slice 2) | | 8. Secret lifecycle interface + redacted diagnostics | REALIZED | src/context.ts (MockSecretStore, audited getSecret), src/stores.ts (PersistentSecretStatusStore, status-only) (slice 2/3) | | 9. DurableCall/workflow adapter for long-running tools | REALIZED | src/durable.ts (DurableCallAdapter, PersistentDurableCallStore) (slice 7) | | 10. STP connector discovery/multiplexer read-only projection | PARTIAL — discovery realized; cross-connector multiplexer DEFERRED | src/guard.ts listVisibleCapabilities + ConnectorVisibilityState (single fake connector only) | | 11. Sample fake-data connector/provider | REALIZED (worked example) | src/mock/fake-connector.ts (createFakeConnector, fakeManifest) (slice 2) | | 12. Wave adapter migration guide/probes | DEFERRED — NOT in this branch | out of scope; mcp-wave MUST NOT be touched here | | 13. Domain provider adoption guide | DOC | docs/ADOPTION_GUIDE.md (with item 11 as the worked example) |

Disposition: public 0.1.0 under BR-42l, narrow read-only freeze. The frozen root . carries no real network / production credentials / Claude.ai dependency / DB / mcp-wave coupling — the in-memory mocks are ./testing fixtures a real host replaces. The first bootstrap-publish (owner 2FA) and the broker-aware impl-freeze remain owner-gated (see spec/SPEC_EVOL_MCP_PLATFORM_ACTIVATION.md); the api-extractor golden-report gate enforces the frozen surface before publish.

Running the gates (mock, in-memory)

Run the package gates through the repo Makefile (Docker node image, ENV last):

make typecheck-mcp-platform ENV=test-mcp-registry-codec
make test-mcp-platform SCOPE=tests/tool-configuration.test.ts ENV=test-mcp-registry-codec
make test-mcp-platform ENV=test-mcp-registry-codec # builds dist first: the separate-process test loads dist/
make pack-mcp-platform ENV=test-mcp-registry-codec
make probe-mcp-platform-clean-consumer ENV=test-mcp-registry-codec # clean-container install + subpath import (BR1a-EX3)
make api-extract-mcp-platform ENV=test-mcp-registry-codec

Real validation against Claude.ai or another external MCP client is UAT, not a CI dependency (spec §11).

Native MCP wire tools (0.4.0)

Use compileMcpToolSchemas from /transport/tool-schemas for original draft-07 MCP schemas, including unbounded strings, numeric exclusive bounds, tuple items and cloned property defaults. Supply all seven positive JSON resource limits. Schema validation has no remote references, async validators or custom keywords; unsupported constructs fail at startup. It never coerces types, drops extra properties or changes advertised schemas. Configuration schemas retain the separate bounded profile.

registerMcpWireTools from /transport/bridge explicitly accepts SDK Tool descriptors and a native CallToolResult runner. It replaces public SDK list/call handlers, retaining every descriptor field and content byte. The runner receives validated cloned arguments and a frozen call context. As of 0.4.3, it exposes the original cancellation signal and, when present, the full request.params._meta as meta and the transport's raw header record as headers. HTTP headers include any credentials sent in authorization or cookie. The bridge forwards both carriers unverified. The host must verify any claims it uses to authorize execution.

Read callContext.meta and callContext.headers directly. These optional own properties are non-enumerable. Only signal appears in Object.keys(callContext), so spreading the context or calling JSON.stringify on it omits both carriers. formatFailure must return a valid error result. If the formatter throws or returns an invalid result, the bridge returns a constant safe failure.

validateMcpWireResult from /transport/result-codec checks SDK shape and finite JSON budgets, then returns the original value. Native results never use the AppToolResult codec. Explicit SDK McpError failures keep standard JSON-RPC codes with fixed public messages and no exception data; ordinary exceptions become safe tool errors. Existing registerBridgeTools retains explicit AppToolResult semantics through the same registration kernel. See etc/mcp-wire.api.md.

Stable tool definitions (permission identity)

MCP hosts such as claude.ai reset a tool's "Always allow" permission whenever its definition bytes change (name, description, inputSchema, outputSchema, annotations, _meta) between sessions. Rule for every tool this package composes or serves:

  • Tool definitions are frozen constants. Never place a version, profile id, revision, digest, date, configuration value or any other per-deployment value inside a description, schema, annotation or _meta.
  • The dynamic contract (provider version, manifest digest, profile revision, capabilities, configured values) belongs in results, guides/resources, or server metadata such as serverInfo and manifest audit — never in a per-tool definition.
  • The manifest digest keeps covering tool definitions, so a pin over the digest also pins the definitions; do not weaken that guard.
  • tests/tools-list-snapshot.test.ts snapshots the full tools/list catalogue of a composed registry served over the real SDK bridge and fails on any definition change. To update deliberately: delete tests/snapshots/tools-list-catalogue.json, re-run the test once (it rewrites the file and fails), then commit the snapshot with the change.