Skip to content
codex logoCodexAI Tooling
MCP server exposing Vielzeug package metadata, docs pages, source entrypoints, and Sigil component metadata over stdio or HTTP.
v0.0.1Node.js
createServercreateServerFromDiskloadDatapackageMetavalidateBundledDataHttpServerHandleCemDeclarationCemAttribute +11 more →

Why Codex?

AI agents working with Vielzeug need reliable, structured access to package metadata and documentation. A custom fetch integration or web scraper breaks with every docs update and returns inconsistent data shapes.

ts
// Before — fetch and parse docs manually in each agent
const res = await fetch('https://vielzeug.dev/spell/api');
const html = await res.text();
// parse, clean, truncate — fragile, network-dependent, inconsistent

// After — structured MCP tool call, always in sync with the published snapshot
{ "name": "get-docs", "arguments": { "packageSlug": "spell", "page": "api" } }
Feature@vielzeug/codexCustom fetchGeneric web search
Bundle size0 KB
Zero external deps (MCP SDK)
Structured metadata
Sigil component CEM
Offline / snapshot-backed
Stdio + HTTP transports

Use @vielzeug/codex when you are building or configuring an AI agent that needs reliable, offline access to Vielzeug documentation and component metadata.

Consider a web search when you need content from the live docs site that post-dates the current published snapshot.

Installation

sh
pnpm add @vielzeug/codex
sh
npm install @vielzeug/codex
sh
yarn add @vielzeug/codex

Quick Start

sh
# Run over stdio (Claude Desktop, Copilot Chat)
npx -y @vielzeug/codex

# Run over HTTP (remote agents)
npx -y @vielzeug/codex --port 3100

# CLI helpers
npx -y @vielzeug/codex --help
npx -y @vielzeug/codex --version

Then wire it into your AI client — see the Usage Guide.

What it exposes

Tools

ToolInputDescription
list-packagesAll packages with metadata (no filter)
get-packagepackageSlugSingle package metadata by slug
get-docspackageSlug, page?Package docs page (index, api, usage, examples); defaults to index
get-sourcepackageSlugBundled src/index.ts text for a package
search-packagesquerySearch package metadata and docs with weighted ranked matches
list-componentsSigil component tags from bundled CEM metadata
get-componenttagNameFull Sigil component CEM declaration by tag

Resources

URI patternMIME typeContent
vielzeug://docs/<slug>/<page>text/markdownDocumentation page
vielzeug://source/<slug>text/x-typescriptsrc/index.ts source

Transports

  • Stdio (default) for local MCP clients
  • Streamable HTTP with --port <number> for remote agents

Features

  • list-packages returns all packages; use get-package with packageSlug to fetch a single entry
  • search-packages returns weighted ranked hits — name matches (3.9) outrank description (3.1) outrank keywords (2.5) outrank exports (2.2) outrank related (2.0) outrank docs (1.0) outrank source (0.9)
  • matchedIn reports distinct categories: "metadata", "keywords", "exports", "related", "docs", "source"
  • MCP Resources exposed at vielzeug://docs/<slug>/<page> and vielzeug://source/<slug>
  • Programmatic API: createServer, createServerFromDisk, loadData, packageMeta, validateBundledData exported from @vielzeug/codex
  • search-packages supports multi-word AND queries — all words must match
  • Unknown CLI flags print a usage hint and exit cleanly (no stack trace)
  • Port-in-use (EADDRINUSE) prints a clean error and exits with code 1
  • Bundled snapshot data — runs without a local Vielzeug checkout
  • Fail-fast startup: missing or malformed data aborts immediately with an actionable error message
  • Health endpoint at /health in HTTP mode

Documentation

See Also

  • Sigil — source of the bundled Sigil component CEM metadata
  • Spell — example of a well-documented package discoverable via MCP