You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(mcp): capture model identifiers
Capture model identifiers from recognized client metadata, with an SDK-owned self-report fallback for other clients. Preserve source provenance and fail closed when the application owns the field.\n\nVerify both MCP Python SDK 1.x and 2.x, including a 2026-07-28 wire-level call.
* fix(mcp): preserve model capture opt-in and tool ownership
Gate custom-dispatcher model resolution behind capture_model and copy
object tools before model injection so repeated listings preserve ownership.
Publish the completed ownership map without an intermediate empty state.
Keep additionalProperties constraints in all analytics schema injectors.
Document adapter-specific requiredness rather than requiring fields that
standalone FastMCP strips before input validation. Share the eligibility
predicate and update prepare helper documentation and the changeset.
Verification:
- MCP v1 suite: 267 passed.
- MCP v2 suite: 245 passed, 13 expected skips.
- Ruff check and format check passed repository-wide.
- Repository mypy/baseline check passed (229 source files).
- Public API snapshot and git diff --check passed.
- Regression cases failed before the fix for disabled capture, object
ownership and strict validation through a low-level tool-cache rebuild.
Full non-MCP test suite not rerun locally; CI covers the broader matrix.
* chore(mcp): address release note and test dependency feedback
Clarify that preserving strict schemas during context and conversation-ID injection also affects existing users with model capture disabled. Declare jsonschema>=4.0 in the test extra and refresh only its direct dependency entries in uv.lock.
Verification: python -m pytest posthog/test/mcp --timeout=30 -q passed (267 tests, MCP SDK 1.29.0); uv lock --check and git diff --check passed. Configured pre-commit checks skipped these non-Python files. CodeScene reported no applicable changes. MCP v2 was not rerun locally for this documentation and dependency-only update.
* fix(mcp): preserve positional constructor compatibility
Append model capture fields after the existing public dataclass fields. Existing positional MCPAnalyticsOptions calls keep their identity and callback bindings, and PreparedToolCall retains the fourth positional missing-capability flag.
Add four parameterized regression cases and regenerate the public API snapshot. The cases failed before the field reorder and pass afterward.
Verification: 271 MCP tests passed; public_api_snapshot and public_api_check passed; configured Ruff pre-commit checks passed; mypy baseline check found no issues in 230 source files; strict import and git diff checks passed. CodeScene checked both Python files with no issues. MCP v2 validation remains covered by CI.
Capture MCP model identifiers from client metadata or an SDK-owned self-report field.
6
+
Model capture remains opt-in and preserves application-owned fields across repeated tool listings.
7
+
8
+
MCP context and conversation-ID injection now preserve `additionalProperties: false` in tool schemas, including when model capture is disabled. Servers that validate these schemas now reject undeclared arguments that earlier SDK versions allowed. Declared analytics fields remain valid.
0 commit comments