serve

serve is a command for Claude Code from eduardoabreu81/livewiki. It costs 0 tokens per session (933 once invoked), scanned A, original, MIT.

A command that starts a Model Context Protocol (MCP) server over standard input and output inside the livewiki command-line tool. MCP is a way for AI tools to communicate with external services or project data.

In plain words
What is it for?
Use it to add or inspect CLI options, trace how the server starts, debug signals and input/output separation, or compare the CLI server with the standalone program.
Why use it?
It provides the same server behavior as the separate livewiki-mcp program while keeping startup and shutdown handling in the shared implementation.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit Use it to add or inspect CLI options, trace how the server starts, debug signals and input/output separation, or compare the CLI server with the standalone program.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/eduardoabreu81/livewiki/serve
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/eduardoabreu81/livewiki

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for serve

README.md
[![agentmods](https://agentmods.dev/badge/commands/eduardoabreu81/livewiki/serve.svg)](https://agentmods.dev/commands/eduardoabreu81/livewiki/serve)
Your own site
<a href="https://agentmods.dev/commands/eduardoabreu81/livewiki/serve"><img src="https://agentmods.dev/badge/commands/eduardoabreu81/livewiki/serve.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 933 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00933
Opus 5 $0.00000 $0.00466
Sonnet 5 $0.00000 $0.00187
Haiku 4.5 $0.00000 $0.00093

Measured 7d ago against content hash 543b7118749d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

serve scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

livewiki/commands/serve.md · 53 lines

How it starts

The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.

livewiki serve command

The livewiki serve command registers an MCP server on stdio inside the livewiki CLI, sharing the same runtime as the standalone livewiki-mcp binary.

When to use this page

  • Add a new CLI flag, option, or subcommand to the serve entry point.
  • Trace how the CLI wires MCP stdio transport into a Commander subcommand.
  • Debug shutdown behavior, signal handling, or stderr/stdout separation on the CLI side.
  • Compare the CLI-driven server boot with the standalone @livewiki/mcp/stdio bin.

How it fits

This module lives at packages/cli/src/commands/serve.ts and is one of several command registrars in the livewiki CLI package. It depends on the shared Commander program instance passed in by the CLI entry point, and on the @livewiki/mcp/stdio package for the actual server implementation. The CLI does not embed any MCP logic itself; it only resolves the working repository and then delegates to the shared stdio starter. Because both the CLI path and the standalone bin call the same startMcpStdioServer, behavior, protocol semantics, and shutdown expectations are defined in one place.

Diagram

%% livewiki/diagrams/commands-serve.mmd

Bootstrapping the serve subcommand

The file exposes a single registrar that attaches the serve subcommand to a Commander program. The signature is:

export function registerServe(program: Command): void {

registerServe takes the parent Commander program instance and returns nothing; it mutates program in place by adding the serve command. The rationale evidence describes this as the CLI path into the same MCP server the standalone livewiki-mcp bin runs, so the function exists to give the CLI a first-class subcommand without duplicating server logic.

The registrar calls program.command("serve") with a short description and then chains an action handler. The handler is async and receives the parsed options object plus the active Command instance, which is the standard Commander pattern for accessing globally-merged options.

Read the full file on GitHub · 53 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 53 lines · 0 tokens per session scan A 543b7118749d

Subscribe to this mod's changes

serve is a command published in the GitHub repository eduardoabreu81/livewiki (0 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 933 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.