Changelog

v0.4.0 — Zero Config + Production MCP

2025-04-01

Zero-Config Compile

No anvil.config.ts required. All 10 targets are built into the CLI:

anvil compile --target mcp                # just what you need
anvil compile --target mcp,docs,anthropic # pick multiple
anvil compile --all                       # everything

Running anvil compile without a target shows interactive help with all available options.

Production MCP Serve

anvil serve now uses the real @modelcontextprotocol/sdk with full protocol compliance:

anvil serve --stub tools.anvil.yaml

Works directly in Claude Desktop, Cursor, and Claude Code configs:

{
  "mcpServers": {
    "my-tools": {
      "command": "npx",
      "args": ["@anvil-tools/cli", "serve", "--stub", "tools.anvil.yaml"]
    }
  }
}

New --handler flag for custom implementations:

anvil serve tools.anvil.yaml --handler ./my-handlers.js

Improvements

  • All targets bundled in CLI — no separate npm install for each target
  • Interactive help when running anvil compile without arguments
  • Full MCP protocol: initialize handshake, tool annotations, typed schemas
  • Graceful shutdown on SIGINT

v0.1.0 — Initial Release

2025-03-31

Core

  • YAML parser with rich Zod-based validation and source location error reporting
  • TypeScript builder API (defineService, field, permission helpers)
  • Intermediate Representation (IR) with fieldToJsonSchema and toolParametersToJsonSchema utilities
  • Compilation pipeline with parallel target generation

Compilation Targets (10)

  • @anvil-tools/target-mcp — MCP server with tool registration and annotations
  • @anvil-tools/target-openapi — OpenAPI 3.1 spec (YAML/JSON)
  • @anvil-tools/target-docs — Markdown documentation
  • @anvil-tools/target-agent-schema — LLM-optimized tool schema
  • @anvil-tools/target-eval — Vitest/Jest test harness + agent eval scaffolding
  • @anvil-tools/target-sdk-ts — Typed TypeScript SDK with Zod validation
  • @anvil-tools/target-cli-gen — Commander-based CLI generator
  • @anvil-tools/target-anthropic — Claude Messages API tool format
  • @anvil-tools/target-openai — OpenAI function calling format
  • @anvil-tools/target-vercel-ai — Vercel AI SDK tool definitions

CLI

  • anvil init — project scaffolding
  • anvil validate — definition validation with rich diagnostics
  • anvil compile — multi-target compilation
  • anvil dev — watch mode
  • anvil serve — local MCP server for testing
  • anvil publish / anvil search — registry operations

Runtime (@anvil-tools/runtime)

  • Input/output validation with Zod
  • Permission enforcement engine
  • Composable middleware: validation, rate limiting, caching, logging
  • Structured JSON logging
  • Cost tracking
  • Circuit breaker
  • OpenTelemetry instrumentation (optional)

Registry (@anvil-tools/registry)

  • HTTP client for hosted registry
  • Local file-based registry for development
  • Publish, search, get, version management

Examples

  • Weather tools (current weather, forecast)
  • Filesystem tools (read, write, list)
  • GitHub tools (issues, search, pull requests)
  • Linear tools (issues, search)
  • PostgreSQL tools (query, tables, mutations)
  • Browser tools (navigate, screenshot, extract links)