integrations/mcp/v0.1.2

Chainlit/chainlitintegrations/mcp/v0.1.2Aug 5, 2026by het0814

AI Summary

This release fixes critical compatibility issues with MCP SDK 2.0 and introduces per-client attribution for memory sources. It resolves installation failures and incorrect version reporting while expanding test coverage.

Key Highlights

  • Fixed `mcp.server.fastmcp` import error for MCP SDK 2.0
  • Introduced per-client attribution for memory sources (e.g., Cursor, VS Code)
  • Fixed version reporting to read from package metadata instead of hardcoded literals
  • Expanded test suite to 74 tests

New Features

  • Open source labels with per-client attribution (accepts custom writer names like cursor, codex, claude_code, mem0)

Full Release Notes

# Release Notes for memanto-mcp v0.1.2

Repairs a broken install path and gives every stored memory an accurate writer. Installs of 0.1.1 fail outright on the newly released MCP SDK 2.0, and the server misreported its own version in two places. Requires `memanto>=0.2.13`.

## Bug Fixes
- **Fresh installs failed with `No module named 'mcp.server.fastmcp'`** (`pyproject.toml`)
  - MCP SDK 2.0 removed `mcp.server.fastmcp` (`FastMCP` became `mcp.server.mcpserver.MCPServer`). The unbounded `mcp[cli]>=1.2.0` resolved straight to it, so the server could not import. Now `mcp[cli]>=1.2.0,<2`.
- **`memanto-mcp --version` printed `0.1.0`** (`memanto_mcp/__init__.py`)
  - The hardcoded literal was never bumped, so 0.1.1 also announced itself as 0.1.0. Now read from installed package metadata.
- **The initialize handshake advertised the SDK's version** (`memanto_mcp/server.py`)
  - `serverInfo` reported `memanto 1.29.0` because FastMCP leaves the low-level version unset. Clients now see the actual `memanto-mcp` version.

## New Features
- **Open source labels with per-client attribution** (`memanto_mcp/tools.py`)
  - `source` accepts any writer name (`cursor`, `codex`, `claude_code`, `mem0`), bounded to 64 chars of letters, digits, `.`, `_`, `-` so `#source:<value>` stays a usable filter.
  - A call that omits `source` is attributed to the connected MCP client from the initialize handshake — `Cursor` → `cursor`, `Visual Studio Code` → `visual-studio-code` — falling back to `mcp-agent`. Two editors sharing one agent stay distinguishable in recall with no configuration.
  - `batch_remember` applies the same attribution per item instead of the SDK's `user` default.

## Improvements
- **Dependency floor raised to `memanto>=0.2.13`** (`pyproject.toml`)
  - 0.2.11 and 0.2.12 reject any source outside `user`/`agent`/`tool`/`system`.

## Tests
- Suite expanded 57 → 74, adding `tests/test_packaging.py` to assert the declared bounds exclude `mcp` 2.x and `memanto` 0.2.12, plus live-session coverage for client attribution and the advertised server version.

## Full Changelog
Full Changelog: https://github.com/moorcheh-ai/memanto/compare/integrations/mcp/v0.1.1...integrations/mcp/v0.1.2