v2.1.0 — explicit count opt-in, HTTP surface, namespace claim
Changed
- Behavior change: the exact
count_tokenscall (MCP server and session CLI) now requires an explicitFLATTEN_COUNT_EXACT=1in addition toANTHROPIC_API_KEY— key presence alone no longer triggers a network request. The library's*Exactfunctions keep their explicitcountExactparameter 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=1registers 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(inpackages/, published separately): one-line delegates that claim the bin-name npm namespace sonpx <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 usenpx -y -p flatten-mcp <bin>. (#12)
Full Changelog: v2.0.5...v2.1.0