libraryPackage manifestv5.0.4

lib.contracts-runtime-server-mcp

MCP server runtime adapters for ContractSpec contracts

@lssm-tech/lib.contracts-runtime-server-mcp
Source, release and verification context

Source snapshot bcc79fcc · Declared package version 5.0.4. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.

Package source ↗ Manifest ↗
servernode
EXPLORE THE PACKAGE

See where this package fits.

Follow a declared connection, inspect an import, then open the source guide when you need the detail.

THIS PACKAGElib.contracts-runtime-server-mcpplatform

Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.

7 declaraciones · se muestran las primeras 6SELECT TO INSPECT

@lssm-tech/lib.contracts-runtime-server-mcp

MCP server runtime adapters for ContractSpec contracts.

What It Provides

  • Capa: lib.
  • Consumers: bundles, CLI, VS Code extension.
  • src/mcp/ contains MCP handlers, tools, prompts, and resources.
  • Related ContractSpec packages include @lssm-tech/lib.contracts-spec, @lssm-tech/lib.logger, @lssm-tech/tool.bun, @lssm-tech/tool.typescript.
  • src/mcp/ contains MCP handlers, tools, prompts, and resources.

Installation

npm install @lssm-tech/lib.contracts-runtime-server-mcp

or

bun add @lssm-tech/lib.contracts-runtime-server-mcp

Usage

Import the root entrypoint from @lssm-tech/lib.contracts-runtime-server-mcp, or choose a documented subpath when you only need one part of the package surface.

Scoped approvals

McpCtxFactories.toolApprovalReceipt adapts client-held approval evidence into the common handler context without adding it to tool input. MCP metadata describes declared effects and whether approval is required, while the shared operation registry remains the authoritative pre-handler enforcement boundary.

Query envelope params

Tool arguments stay the operation input. A client sends the other QueryEnvelope params (search, filters, sort, pagination, cache, tags, consistency, economic evidence refs) as an object under the tools/call request _meta key contractspec/queryEnvelope (MCP_QUERY_ENVELOPE_META_KEY from ./mcp/registerTools; the prefix follows the MCP _meta naming rules). registerMcpTools rebuilds the full envelope into HandlerCtx.queryEnvelope on a per-call copy of the toolCtx() context; calls without it get the operation and input only. A tool without an input schema gets {} as input and an envelope without input: the SDK request extra (auth info, headers, session) never becomes input. Malformed params return the same BAD_REQUEST problem as REST, after the auth gate and before the handler.

Arquitectura

  • src/index.ts is the root public barrel and package entrypoint.
  • src/mcp/ contains MCP handlers, tools, prompts, and resources.
  • src/provider-mcp.ts is part of the package's public or composition surface.
  • Presentation resources are projected to Markdown in the MCP adapter, so consumers do not install the presentation runtime or its UI-oriented dependency tree.

Public Entry Points

  • Export . resolves through ./src/index.ts.
  • Export ./mcp/createMcpServer resolves through ./src/mcp/createMcpServer.ts.
  • Export ./mcp/mcpTypes resolves through ./src/mcp/mcpTypes.ts.
  • Export ./mcp/registerPresentations resolves through ./src/mcp/registerPresentations.ts.
  • Export ./mcp/registerPrompts resolves through ./src/mcp/registerPrompts.ts.
  • Export ./mcp/registerResources resolves through ./src/mcp/registerResources.ts.
  • Export ./mcp/registerTools resolves through ./src/mcp/registerTools.ts.
  • Export ./provider-mcp resolves through ./src/provider-mcp.ts.
  • Deprecated: export ./marketing (with ./marketing/marketing-agent-config, ./marketing/marketing-mcp, ./marketing/marketing-registry and the root re-export of the same symbols) resolves through ./src/marketing/index.ts, a frozen copy of the public marketing site MCP surface. Its owner is @lssm-tech/bundle.marketing-operations/site-mcp, which has the same exports (./site-mcp, ./site-mcp/marketing-agent-config, ./site-mcp/marketing-mcp, ./site-mcp/marketing-registry). It cannot forward there, because a platform package may not depend on a bundle, and its registry reaches the Growth operations only through the @lssm-tech/lib.contracts-spec facade. The copy, the four subpaths, the root re-export and the facade dependency are removed at the next major of this package.

Local Commands

  • bun run dev — contractspec-bun-build dev
  • bun run build — contractspec-bun-build build
  • bun run lint — bun run lint:fix
  • bun run lint:check — biome check .
  • bun run lint:fix — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
  • bun run typecheck — tsgo --noEmit
  • bun run publish:pkg — bun publish --tolerate-republish --ignore-scripts --verbose
  • bun run publish:pkg:canary — bun publish:pkg --tag canary
  • bun run clean — rm -rf dist
  • bun run build:bundle — contractspec-bun-build transpile
  • bun run build:types — contractspec-bun-build types
  • bun run prebuild — contractspec-bun-build prebuild

Recent Updates

  • Replace eslint+prettier by biomejs to optimize speed.
  • Add changesets and apply pending fixes.

Notes

  • MCP protocol compliance is critical; transport layer must stay spec-compliant.
  • Do not introduce runtime-specific (Node/browser) dependencies in the transport layer.

Declared capabilities.

Lib Contracts Runtime Server Mcp

MCP server runtime adapters for ContractSpec contracts

Use it to

  • Adopt mcp server runtime adapters for contractspec contracts

Requires

  • TypeScript

Choose another boundary when

  • The @lssm-tech/lib.contracts-runtime-server-mcp package constraints do not match the target runtime or platform.

@lssm-tech/lib.contracts-runtime-server-mcp

@lssm-tech/lib.contracts-runtime-server-mcp/contracts-runtime-server-mcp.feature

@lssm-tech/lib.contracts-runtime-server-mcp/mcp/createMcpServer

@lssm-tech/lib.contracts-runtime-server-mcp/mcp/mcpTypes

@lssm-tech/lib.contracts-runtime-server-mcp/mcp/registerPresentations

@lssm-tech/lib.contracts-runtime-server-mcp/mcp/registerPrompts

@lssm-tech/lib.contracts-runtime-server-mcp/mcp/registerResources

@lssm-tech/lib.contracts-runtime-server-mcp/mcp/registerTools

Imports and export paths.

13 entries

These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.

13 importaciones

Dependencies and related packages.

Runtime dependencies 7
@modelcontextprotocol/sdk
catalog:ai
zod
catalog:
Development dependencies 6
typescript
catalog:

Package scripts.

Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.

testbun test
publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
publish:pkg:canarybun publish:pkg --tag canary
cleanrm -rf dist
lintbun run lint:fix
lint:fixnode ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .
lint:checknode ../../../../scripts/biome.cjs check .
buildcontractspec-bun-build build
build:bundlecontractspec-bun-build transpile
build:typescontractspec-bun-build types
prebuildcontractspec-bun-build prebuild
typechecktsgo --noEmit
devcontractspec-bun-build dev
Tu vista

Make room for your context.

Shape the presentation around this moment. You can change it whenever you need.

Tu contexto

The different parts of you

Choose a starting point

Una mezcla útil de contexto, imágenes y orientación discreta.

Tune each dimension
Each dimension can change independently. Product permissions and available actions stay unchanged.

Support the way you begin and return

Tune your support

Comodidad de lectura

Elige tu idioma

El idioma de la interfaz solo cambia el texto. Los mercados, precios y flujos de trabajo conservan sus propios ajustes.

Cobertura de traducción

Parte del contenido se muestra en inglés.

Navegación151
Grafo616
Categorías188
Portafolio332
Ejemplos2035
Vista previa de la fuente41

Se añadirán más traducciones a medida que se revise el contenido.

Esta preferencia se guarda en este navegador.

Buscar en el sitio web

Puntos de partida útiles

Sin resultados. Prueba una frase más corta, un nombre de operación u otro ámbito de búsqueda.

UN POCO DE ESPACIO PARA EXPLORAR

Encuentra algo que explorar.

Abre una vista detallada en esta página, prueba otra perspectiva o sigue el detalle a su propia página.

Cómo funcionan las vistas previas y los controles
01

Mirar antes de salir

Pasa el cursor por un enlace o enfócalo con Tab para ver una vista previa. Hacer clic en el enlace original o pulsar Intro siempre abre su destino.

02

Mantener el contexto

Entra en la vista previa para explorar sus secciones. Usa Alt + ↓ desde un enlace enfocado para entrar con el teclado. Escape la cierra.

03

Abrir las posibilidades

Las filas desplegables, las perspectivas y los controles destacados revelan más. Tu vista cambia la comodidad de lectura y el contexto que exploras.

Un botón separado para mirar más de cerca

Muestra pequeños botones de vista previa junto a los enlaces donde haya espacio. Toca el ojo para inspeccionar o el enlace para ir directamente. Esta elección permanece en esta pestaña.

No se recoge historial de navegación. El movimiento reducido sigue tu dispositivo y Tu vista.