Skip to content

v2.1.0 — explicit count opt-in, HTTP surface, namespace claim

Choose a tag to compare

@shayaShav shayaShav released this 02 Jul 22:06
v2.1.0

Changed

  • Behavior change: the exact count_tokens call (MCP server and session CLI) now requires an explicit FLATTEN_COUNT_EXACT=1 in addition to ANTHROPIC_API_KEY — key presence alone no longer triggers a network request. The library's *Exact functions keep their explicit countExact parameter and are unaffected. The request body is documented in the README's Security section. (#12)

Added

  • flatten-mcp-http: the in-memory engine (flatten_messages/unflatten_messages) over MCP Streamable HTTP — stateless, localhost by default, no outbound network — so hosted registry inspectors and remote MCP clients can call the engine interactively. (#12)
  • FLATTEN_INMEMORY_TOOLS=1 registers the same two in-memory tools on the stdio server (off by default to keep the local tool surface lean). (#12)
  • Companion packages flatten-mcp-session, flatten-mcp-cli, flatten-mcp-http (in packages/, published separately): one-line delegates that claim the bin-name npm namespace so npx <bin> works directly, and the names cannot be squatted. (#12)

Fixed

  • README invoked the secondary bins as npx flatten-mcp-session / npx flatten-mcp-cli, which fails on a machine without the package installed (no npm packages by those names existed). All examples now use npx -y -p flatten-mcp <bin>. (#12)

Full Changelog: v2.0.5...v2.1.0