stateless-mcp-incident-lab-typescript-raw

stateless-mcp-incident-lab-typescript-raw

A raw TypeScript MCP server simulating incident lifecycles with tools, resources, prompts, and signed multi-round remediation approval. Enables CLI-based interaction, protocol negotiation, and health/security testing without external MCP SDK dependencies.

Category
Visit Server

README

Stateless MCP Incident Lab — Raw TypeScript

Independent raw HTTP/JSON-RPC implementation of the Stateless MCP Incident Lab for Node.js 24. It implements MCP wire shapes directly and intentionally does not depend on the official MCP SDK.

Capabilities

  • Stateless per-request protocol-version and capability negotiation
  • Streamable HTTP JSON responses and SSE diagnostic progress
  • Tool, resource, resource-template, and prompt catalogs
  • Synthetic incident lifecycle and signed multi-round remediation approval
  • Public/private response caching with stale-on-refresh-error behavior
  • CLI workflows, structured telemetry, health readiness, and security bounds

All remediation effects are simulated.

Quick start

npm ci
npm run build
npm start

The server binds to 127.0.0.1:3101 by default and exposes POST /raw/mcp plus GET /raw/healthz. Override the bind with HOST and PORT. Production replicas must share an MCP_REQUEST_STATE_SECRET of at least 32 bytes and set DYNAMODB_TABLE (plus optional DYNAMODB_ENDPOINT for DynamoDB Local); development uses process-local ephemeral key and effect storage. In another shell:

node dist/src/main.js --version
node dist/src/main.js discover http://127.0.0.1:3101/raw/mcp

CLI

The incident-mcp binary supports these command families:

incident-mcp discover <url>
incident-mcp tools list|inspect|call <url> [...]
incident-mcp resources list|templates|read <url> [...]
incident-mcp prompts list|get <url> [...]
incident-mcp demo <url> --approve|--decline|--cancel

Global diagnostic options include --wire with sensitive-value redaction and --no-cache.

Docker

Build and run the minimal runtime image:

docker build --target runtime -t incident-mcp-raw .
docker run --rm -p 127.0.0.1:3101:3101 \
  -e HOST=0.0.0.0 \
  -e MCP_REQUEST_STATE_SECRET="$(openssl rand -hex 32)" \
  -e EFFECT_STORE=memory \
  incident-mcp-raw
# Or inspect the image version without starting the service:
docker run --rm incident-mcp-raw --version

The test stage requires the external behavioral repository as a named build context:

docker build --target test \
  --build-context conformance=../stateless-mcp-incident-lab-conformance \
  -t incident-mcp-raw-test .

Runtime behavior

The public HTTP/CLI path uses the same application modules exercised by conformance. Incident lifecycle records and conditional remediation claims share the configured DynamoDB table in production; development uses in-memory stores. The CLI applies MCP cache hints in-process, supports explicit bypass, and serves stale entries only after refresh failure with a warning. Diagnostic SSE work is paced and request-scoped, stops on disconnect or deadline, and returns the actual diagnostic result. Live JSON requests enforce a five-second deadline and emit structured, trace-correlated telemetry with bearer-bearing resource names redacted.

Development and verification

npm run format
npm run lint
npm run typecheck
npm run test:coverage
npm run test:mutation
npm run build
npm run test:conformance
npm audit --audit-level=high

The behavioral suite is resolved from CONFORMANCE_PATH, defaulting to the sibling ../stateless-mcp-incident-lab-conformance/conformance directory.

Coverage is enforced at 95% lines, 90% statements, 80% branches, and 95% functions. The remaining lines are defensive malformed-internal-input paths and the direct-process bootstrap. Mutation testing covers incident lifecycle, MRTR, cache, property laws, header/request-state security, and schema validation, with an enforced score of at least 80%.

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