Skip to main content
Glama
LwXLabs.Mcp.Template.NodeJs

LwXLabs.Mcp.Template.NodeJs

by lwxlabs
README.md
# LwXLabs.Mcp.Template.NodeJs

A standalone TypeScript MCP server template using Node.js 24, npm and the official [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk). Default stdio; optional local Streamable HTTP and MVC-style status page.

## Create your own MCP

```bash
npm run create -- MyCompany.Example.Mcp MyCompany.Example.Mcp
cd MyCompany.Example.Mcp
npm ci
npm test
```

The generator renames the package, CLI, server and installer and assigns a fresh installer AppId. It excludes dependencies and build outputs.

## Run

```bash
npm ci
npm run build
node dist/index.js
node dist/index.js --http
```

Stdio is launched by your MCP client. HTTP mode serves http://127.0.0.1:5189, health at `/health` and MCP at `/mcp`. Override the port with `--http --port 5190`.

Example tools: `example.echo`, `example.add`, `example.status`.

## npm installation

```bash
npm pack
npm install -g lwxlabs-mcp-template-nodejs-0.1.0.tgz
lwx-mcp-nodejs --health
```

No npm registry publication is required. Node.js 24 must be installed for this mode.

## Windows installer

Requires Node.js 24, npm, PowerShell and Inno Setup 6.

```powershell
./scripts/Build-Installer.ps1
./scripts/Test-Installer.ps1
```

Setup is created in `artifacts/installer/`. The Windows x64 installer includes the Node runtime and production dependencies; recipients do not need Node or npm installed separately. Default location: `%LOCALAPPDATA%\Programs\LwXLabs\LwXLabs.Mcp.Template.NodeJs`. Configure the MCP client with the installed `node.exe` as command and the absolute installed `dist/index.js` as its argument. See [example configuration](examples/mcp.example.json).

## Customize

- `src/tools/`: MCP tool definitions.
- `src/services/`: application logic.
- `src/models/`: data contracts.
- `src/controllers/`, `src/views/`: local MVC interface.
- `src/transports/`: HTTP transport.
- `tests/`: unit and real protocol tests.

Run `npm test`. HTTP mode is local development only. Do not expose it to the internet without authentication, authorization, TLS and a security review. No private libraries, credentials or updater services are required.

[MIT License](LICENSE).

TDQS

A4/5.0

Scored across 3 tools

Disambiguation5/5

The three tools have clearly distinct purposes: text echo, integer addition, and server health/status. There is no plausible overlap or ambiguity between them.

Naming Consistency5/5

All tool names follow the same predictable namespace.action pattern: example.echo, example.add, and example.status. The convention is fully consistent across the set.

Tool Count5/5

Three tools is appropriate for a template/example MCP server intended to demonstrate basic capabilities. Each tool serves a distinct demonstrative purpose without unnecessary surface area.

Completeness4/5

For a template server, the surface covers representative examples of text handling, computation, and health/status. Minor gaps exist, such as additional example operations, but the stated template purpose is adequately served.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues