Skip to main content
Glama
mcpbase

mcpbase

mcp-base

The template every MCP server here is instantiated from: a stdio server with one registerTools seam, structured output, and annotation presets so a tool cannot be written without carrying its safety hints.

It is also the cheap place to retire SDK unknowns. The get_datetime example exists to exercise the SDK v2 surface end to end — handshake, annotations, structured output, schema rejection — so the servers that matter don't discover those on their own.

Status

Tag

What it is

v0.1.0 (current)

Proving ground — scaffold, example tool, tool-level tests

v0.2.0

The backport — single subprocess seam, root/path validation, security test suite

Still to land before v0.1.0 is tagged: the 1MCP wiring proof, scripts/instantiate.ts, the SDK-drift test and dependabot. The design notes live in Trilium.

Related MCP server: MCP Starter Kit

Requirements

Node ≥ 22. CI runs 22 and 24; .node-version pins 24 for local mise users.

Develop

npm ci
npm run build
npm test

npm test runs vitest against src/ through the SDK's own client over an in-memory transport, so no build and no spawned process are involved. npm run build is only needed for the bin entry and for npx over GitHub.

Instantiate

  1. Use this template on GitHub — a fork would share history, which is not what you want.

  2. Run the instantiation script. It substitutes __name__ and reports every replacement point it could not infer; the substitution contract lives in src/placeholders.ts. Until the script lands, substitute those points by hand.

  3. Delete the example: src/tools/get-datetime.ts, its line in src/tools/index.ts, and its tests in test/.

Then add the first real tool — see AGENTS.md for the checklist.

Register with 1MCP

"mcpbase": {
  "command": "npx",
  "args": ["-y", "github:GwylimWilliams/mcp-base"],
  "tags": ["test"]
}

The prepare script builds on install, which is what makes npx -y github:… work without a published package.

When a server takes scoped roots, they are passed as CLI args after the repo — never cwd, so the scoping holds whatever directory the gateway happens to run in.

The rules

License

MIT.

Available Tools

1 tool
get_datetimeGet date and timeA
Read-only

Current date and time in an IANA timezone, optionally shifted by whole days. The iso field is the wall clock in that zone, so its offset makes the instant unambiguous; unix is the same instant as epoch seconds, and human is a localized rendering.

Inputs: format, timezone, offsetDays. Returns: iso, unix, human, timezone

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 1 tool

    Disambiguation5/5

    There is only one tool, so there is no possibility of misselection or overlapping purpose. Its purpose (returning the current datetime in a given timezone) is clearly stated.

    Naming Consistency5/5

    A single tool using a clean verb_noun snake_case name (get_datetime). No inconsistency is possible with one tool.

    Tool Count3/5

    The server is scoped narrowly to datetime retrieval, so one tool is defensible, but the surface is very thin. A single trivial operation sits at the borderline of usefulness for an MCP server.

    Completeness3/5

    It handles the core case (current time in an IANA zone, with day offsets and multiple renderings), but there is no parsing, conversion between zones, duration/diff, or formatting tool. Agents needing anything beyond 'now' will hit a dead end.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A production-ready Model Context Protocol server template in TypeScript that enables building MCP servers with dynamic tool registration, dual transport (stdio + HTTP), and pluggable authentication.
      6 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A minimal TypeScript MCP server template with example tool, Zod validation, stdio transport, and dotenv setup.
      21 npm
      MIT
    • A
      license
      C
      quality
      D
      maintenance
      A TypeScript template for building MCP servers with stdio/SSE transport and easy tool registration.
      5
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A template for building MCP servers with automatic tool discovery using TypeScript and Zod schemas, supporting HTTP and STDIO transports.
      29,793 npm
      MIT