george43g/mcp-cli-starter-template/example

Claude Code and agent skill by george43g/mcp-cli-starter-template

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when working with the example MCP tool — covers invoking tools, choosing the right transport (stdio/HTTP), running the CLI/TUI/REPL surfaces, and reading logs. Loaded automatically when the user references example or its bin.

Install

npx vskill@latest install george43g/mcp-cli-starter-template/example

SKILL.md

The same SKILL.md was published earlier as george43g/mcp-cli-starter-template/example.

example

Single-bin MCP server with CLI/TUI/REPL surfaces. All four surfaces dispatch
to the same in-process registry of tools — adding a tool to src/tools/ makes
it appear in MCP tools/list, the CLI as a subcommand, and the REPL.

When to invoke this skill

Use this skill when the user:

  • Mentions example by name or references its bin.
  • Asks to run, debug, or inspect the example tool.
  • Asks to add a new tool, change a transport, or read logs.

If the user is doing something tangential (e.g., editing unrelated files in the repo), do NOT pull this skill in.

Command surface (stable across the template)

example mcp run the MCP server (stdio)
example mcp --http run via Streamable HTTP (needs MCP_HTTP_TOKEN)
example tui launch the Ink TUI
example doctor preflight checks (Node version, native deps, env)
example repl interactive REPL — same dispatcher as MCP
example health one-shot health snapshot
example noop --input hi call any tool directly (subcommand per ToolDefinition)

Global flags:

  • --json machine-readable output (REPL/CLI; MCP always uses JSON envelopes)
  • -q/--quiet suppress non-error output
  • -v/--verbose debug-level info to stderr
  • --no-color disable colors

Picking a transport

  • stdio (default) — for MCP hosts that spawn the server as a child process

(Claude Desktop/Code, Cursor, Warp, OpenCode). Lowest overhead. JSON-RPC owns stdout; logging goes to NDJSON files only.

  • HTTP (`--http`) — for hosted deployments, multiple clients, or when the

MCP host can't spawn child processes. Requires MCP_HTTP_TOKEN (generate via openssl rand -hex 32). Default bind 127.0.0.1 — terminate TLS at a reverse proxy (Caddy, nginx, Cloudflare Tunnel).

Tools

ToolUse it when…Notes
health_checkYou need to verify the server is alive and the runtime is healthy.Read-only, idempotent. Returns counters + uptime + memory. Never touches external I/O — safe to call anytime, even when the network is down.
noopDemo / smoke test the dispatcher round-trip from outside the tool.Echoes a string with optional upper flag. Routes through the Rust accelerator if available; transparently falls back to TS.
get_logsYou need recent log lines for debugging. Dev mode only.Set EXAMPLE_DEV=1 to enable. Returns the in-memory ring buffer (last 500 lines).

Common workflows

Verifying the server is healthy
example health

Returns a one-shot snapshot. Use --json for machine-readable output.

Calling a tool from the CLI
example noop --input "hello" --upper

The CLI is 1:1 with MCP — anything callable via tools/call is also a CLI subcommand with --flag per Zod field.

Inspecting logs

Logs are NDJSON at $TMPDIR/example/example-{PID}-{date}.ndjson. In dev mode, get_logs returns the same content over MCP.

example repl
> get_logs --count 100
HTTP transport
export MCP_HTTP_TOKEN=$(openssl rand -hex 32)
example mcp --http --port 8080
# In another shell — health probe (no auth)
curl http://127.0.0.1:8080/health
# Authenticated initialize
curl -X POST http://127.0.0.1:8080/mcp \
-H "Authorization: Bearer $MCP_HTTP_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{...}}'

Adding a new tool (for the agent maintaining the codebase)

See .agents/skills/mcp-tool-author/SKILL.md for the full checklist. Short version:

  1. Define Zod input/output schemas in src/tools/<name>.ts with

.describe(...) on every field.

  1. Implement handler(input, signal?) — honor the abort signal in loops.
  2. Add the ToolDefinition to src/tools/registry.ts (with optional

timeoutMs override and annotations).

  1. Add a unit test colocated as <name>.test.ts.
  2. Add an integration assertion in tests/integration.test.ts.
  3. If lifecycle-affecting, add a stress case in scripts/stress-mcp.ts.

The unified registry means MCP/CLI/REPL surfaces update automatically — no per-surface drift.

Troubleshooting

SymptomCheck
MCP host doesn't see the tool after a code changeThe host caches the session. Restart the host. The dev proxy auto-reloads on src/** changes but the host needs to reconnect.
--http refuses to startMissing MCP_HTTP_TOKEN. Generate with openssl rand -hex 32.
Native module fails to loadRun pnpm --filter rust-accel build. If rustc is missing, set MCP_DISABLE_NATIVE=1 to force the TS path.
Orphan processes`ps aux \grep example` and kill. The shutdown registry should catch this; file a bug if it doesn't.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/george43g/mcp-cli-starter-template/example/badge)](https://verified-skill.com/skills/george43g/mcp-cli-starter-template/example)

Something wrong with this skill or its page? Tell us.