Skip to content

Releases: TingjiaInFuture/allbemcp

v2.2.0

21 Feb 12:15
72117bc

Choose a tag to compare

Update pyproject.toml

v2.1.0

21 Feb 11:22
043e05f

Choose a tag to compare

Update pyproject.toml

v2.0.3

20 Feb 13:01
19d4594

Choose a tag to compare

Update pyproject.toml

v2.0.2

20 Feb 12:36
d530723

Choose a tag to compare

Update pyproject.toml

v2.0.1

20 Feb 12:23

Choose a tag to compare

refactor(runtime): align tool registration with FastMCP 3.x FunctionT…

v2.0.0: The Universal Engine Evolution (Object Flow & Massive Perf Boost)

20 Feb 11:27

Choose a tag to compare

🎉 Welcome to allbemcp v2.0.0!

This is a massive milestone release that transforms allbemcp from a proof-of-concept into a production-grade Python-to-MCP engine. We have completely overhauled the AST analyzer, runtime server, and serialization engine to make it infinitely faster, memory-safe, and incredibly smart.

🔥 Epic New Features (The Magic)

  • Seamless Object Flow (Cross-Tool Chaining): The LLM can now pass stored objects directly as arguments to other functions! If a tool requires a complex object, the LLM simply passes {"arg": "obj_123"} and the runtime will automatically re-hydrate it into the actual Python object.
  • Constructor Factory Extraction: Object-Oriented libraries are now fully supported! Classes are automatically scanned and their __init__ methods are exposed as create_{class_name} tools, allowing the LLM to natively instantiate complex objects.
  • Incremental Module Caching: Introduced a blazing-fast IncrementalCache utilizing file fingerprinting (st_mtime_ns + st_size). Subsequent CLI runs (inspect, generate) on the same library are now near-instant.
  • Facade Pattern Support: Completely rewrote the __all__ gatekeeper logic. Libraries that expose inner-module APIs via root __init__.py (like pixrep, pandas) are now perfectly recognized and exported.

⚡ Massive Performance Leaps

  • AST Memory Optimization: Replaced aggressive ast.walk with shallow body traversal. Memory consumption when analyzing giant libraries (e.g., pandas, numpy) has dropped by magnitudes, eliminating OOM crashes.
  • O(n) & HeapQ Algorithms: Upgraded the deduplication engine from O(n²) to O(n) using sets and immutable tuples. The adaptive filtering now uses a highly optimized global weighted heapq allocation, making API selection significantly faster and fairer.
  • MRO Type Dispatch Caching: The Serialization engine now caches __mro__ lookups (_dispatch_cache), reducing the time complexity of high-frequency serialization to O(1).
  • Deep Parallel Scanning: Widened the thread-pool executor to scan nested submodules (depth <= 1) concurrently without hitting Python Import Lock deadlocks.

🛡️ Robustness & Safety

  • LRU Memory Management: The Runtime _object_store is now backed by an OrderedDict with a maximum capacity. Old objects are safely evicted via LRU (Least Recently Used) policy.
  • Daemon Thread Cleanup: Implemented a robust background thread with threading.Event() for TTL-based object garbage collection, preventing memory leaks in long-running servers.
  • Anti-Injection Code Generator: The MCP Server generator now safely writes tool definitions via json.loads(repr(tools_json)), fully preventing syntax errors caused by weird docstring escape characters.
  • Runtime Telemetry: Added a built-in get-call-stats tool to monitor execution counts, error rates, and average latency of the generated MCP tools.

🐛 Critical Bug Fixes

  • Fixed: The No quality stats available bug where strict root __all__ checks were incorrectly filtering out 100% of valid APIs.
  • Fixed: A double JSON-encoding bug in generator.py that caused generated MCP servers to crash with AttributeError on startup.

💡 Upgrade Note:
To utilize the new Object Flow and LRU memory management, please re-run allbemcp generate <your_library> to regenerate your existing MCP servers!