stateless-mcp-incident-lab-typescript-sdk

stateless-mcp-incident-lab-typescript-sdk

A stateless MCP server for incident lab operations, exposing MCP and health endpoints, with conformance testing.

Category
Visit Server

README

Stateless MCP Incident Lab — TypeScript SDK

Official @modelcontextprotocol/sdk implementation of the Stateless MCP Incident Lab.

Requirements

  • Node.js 24+
  • The external conformance repository checked out as ../stateless-mcp-incident-lab-conformance (or set CONFORMANCE_PATH)

Development

npm ci
npm run format
npm run lint
npm run typecheck
npm test
npm run test:coverage
npm run test:conformance
npm run test:mutation

The external suite holds 197 golden contracts; the SDK lane selects and runs 159 of them. Conformance fixtures remain in the external repository and are never copied into this implementation.

Runtime

npm run build
npm start

The server listens on port 3102 by default (PORT overrides it). Every request crosses an official @modelcontextprotocol/sdk Server/Client pair over InMemoryTransport before application dispatch, carrying the request's real JSON-RPC method, its params, and the negotiated protocol version for the SDK's own request schema to validate. The lab's 2026-07-28 wire revision — the _meta protocol-version envelope, resultType/requestState/inputRequests results, and Mcp-Method/Mcp-Name header mirroring — is not representable by the pinned SDK's HTTP transport, so HTTP framing and header validation remain in this adapter:

  • MCP: POST /sdk/mcp
  • Health: GET /sdk/healthz

The same executable is the network client; the command group comes first, with no client prefix:

node dist/src/main.js discover http://localhost:3102/sdk/mcp
node dist/src/main.js tools list http://localhost:3102/sdk/mcp
node dist/src/main.js tools call http://localhost:3102/sdk/mcp get_incident '{"incident_id":"..."}'

Configuration

  • PORT (default 3102) and HOST (default 127.0.0.1; the image sets 0.0.0.0).
  • MCP_REQUEST_STATE_SECRET — at least 32 bytes. Required when NODE_ENV=production: without it /sdk/healthz reports 503 and signing requestState fails. Outside production a per-process random key is used, so signed state does not survive a restart or span replicas.
  • EFFECT_STORE — memory for explicit local, per-replica state, or dynamodb for durable shared state.
  • DYNAMODB_TABLE — required with EFFECT_STORE=dynamodb. Create this table with string partition and sort keys named PK and SK; enable DynamoDB TTL on the numeric attribute ttl so expired incident rows are eventually reaped. The single-table adapter uses strongly consistent reads, conditional lifecycle writes, and an atomic effect-claim/incident-mitigation transaction. Its health probe performs one non-mutating strongly consistent read when the same store instance backs both persistence interfaces.

Container

docker build -t incident-lab-sdk .
docker run --rm -p 3102:3102 \
  -e EFFECT_STORE=memory \
  -e MCP_REQUEST_STATE_SECRET=0123456789abcdef0123456789abcdef \
  incident-lab-sdk
curl http://localhost:3102/sdk/healthz

The Docker test target accepts the conformance repository as a named build context, as demonstrated by CI.

Quality gates

CI enforces formatting, lint, type checking, unit tests, coverage thresholds (90% statements/functions/lines, 80% branches), the complete SDK conformance lane, production dependency audit, build, mutation score ≥80%, the charter invariants (197 external contracts, zero vendored fixtures, the architecture contract directories, and no suppression pragmas in src/), the container test target, and a build-and-probe of the production image against /sdk/healthz and a live server/discover.

The mutation gate is scoped to the decision-dense modules listed in stryker.config.mjs: the incident lifecycle and state machine, MRTR and request-state signing, the client cache and cache-key laws, the domain transition table, header codec, protocol validation, the capability scanner, version recovery, the official SDK dispatch boundary (sdk-registry.ts:59-107), and the complete DynamoDB adapter. The ≥80% score speaks only to those modules. It deliberately excludes the HTTP framing in server.ts and the request-metadata validation in http.ts, whose behaviour is covered instead by the live-server integration tests in test/unit/main.test.ts and by the external conformance lane. The implementation stub scan stays a local step because it is supplied by the separate cdd-skills tooling repository, which CI does not check out.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured