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 declarations · first 6 shownSELECT TO INSPECT

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

MCP server runtime adapters for ContractSpec contracts.

What It Provides

  • Layer: 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.

Architecture

  • 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 imports

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
Your view

Make room for your context.

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

Your context

The different parts of you

Choose a starting point

A useful mix of context, visuals and gentle guidance.

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

Reading comfort

Choose your language

Interface language changes text only. Markets, prices and workflows keep their own settings.

Translation coverage

Original source

Navigation151
Graph616
Categories378
Portfolio833
Examples2,035
Source preview1,542

More translations will be added as content is reviewed.

This preference is saved on this browser.

Search the website

Useful starting points

No results. Try a shorter phrase, an operation name or another search area.

A LITTLE ROOM TO EXPLORE

Find something to explore.

Open a closer look on this page, try a different perspective, or follow the detail into its own page.

How previews and controls work
01

Look before you leave

Hover a link or focus it with Tab to see a preview. Clicking the original link or pressing Enter always opens its destination.

02

Stay with the context

Move into the preview to explore its sections. Use Alt + ↓ from a focused link to enter it with the keyboard. Escape closes it.

03

Open the possibilities

Disclosure rows, perspective choices and highlighted controls reveal more. Your view changes reading comfort and the context you explore.

A separate button for a closer look

Show small preview buttons beside links where there is room. Tap the eye to inspect, or tap the link to go straight there. This choice stays in this tab.

No browsing history is collected. Reduced motion follows your device and Your view.