Skip to content

v1.51.6

Choose a tag to compare

@erraggy erraggy released this 20 Feb 06:47
· 19 commits to main since this release
Immutable release. Only release title and notes can be modified.
702304b

🔧 MCP Server Configuration & Code Health

This patch release makes the MCP server fully configurable via environment variables and improves codebase maintainability with two internal refactors.

MCP Server Configuration

The MCP server now reads OASTOOLS_* environment variables for cache behavior, walk limits, validation defaults, and join strategies — giving operators fine-grained control without code changes.

  • 14 configurable env vars: Cache TTLs, capacity, walk limits, validate strictness, join collision strategies, and HTTP settings
  • URL spec caching: Remote specs are now cached (5-minute default TTL) with background sweep cleanup, eliminating redundant fetches during multi-tool workflows
  • Per-type cache TTLs: File specs (15m), URL specs (5m), and content specs (15m) each have independent expiration, matching their natural staleness characteristics
  • Graceful fallback: Invalid env var values log a warning and fall back to defaults — no crashes from misconfiguration

Configure via your MCP client's env field:

{
  "env": {
    "OASTOOLS_CACHE_FILE_TTL": "30m",
    "OASTOOLS_VALIDATE_STRICT": "true",
    "OASTOOLS_JOIN_PATH_STRATEGY": "fail"
  }
}

Internal Improvements

  • Generator deduplication: 10 methods shared between OAS 2 and OAS 3 generators consolidated via struct field promotion (-471 lines of duplicated code)
  • File splitting: Large source files split for IDE/LLM ergonomics — no file over 1,200 lines in the affected packages (parser, joiner, generator, harness)
  • Blog post: New MCP Server Development blog post documenting the design decisions behind the oastools MCP server

🔒 User Impact

  • No breaking changes to the public Go API
  • No changes to CLI behavior
  • MCP env vars are optional — all have sensible defaults matching previous behavior
  • Generator refactoring is purely internal with zero API surface changes

📊 Quality Metrics

  • ✅ All tests passing (8,249 unit tests)
  • ✅ Zero vulnerabilities (govulncheck clean)
  • ✅ All 10 benchmark suites passing with no regressions
  • ✅ Race detector clean on MCP cache code
  • ✅ Documentation verified accurate

What's Changed

Other Changes

  • refactor: split oversized files for IDE/LLM ergonomics by @erraggy in #332
  • refactor(generator): deduplicate OAS2/OAS3 methods via field promotion by @erraggy in #333
  • docs: add MCP server development blog post by @erraggy in #334
  • feat(mcp): add configurable cache TTLs, URL caching, and env var defaults by @erraggy in #335
  • chore: prepare v1.51.6 release by @erraggy in #336

Full Changelog: v1.51.5...v1.51.6