feat: add 18 new MCP tools for session management and observability#31
Merged
jeremyeder merged 2 commits intoambient-code:mainfrom Feb 16, 2026
Merged
Conversation
…mbient-code#27) Add comprehensive session management and observability tools to the MCP server, expanding from 8 to 26 total tools. New capabilities include: - Session lifecycle: get, update, restart, stop, delete (single + bulk) - Observability: logs, transcript, metrics retrieval - Organization: label/unlabel sessions (single + bulk, by name or label) - Discovery: list sessions filtered by label selectors - Bulk operations: delete/stop/restart/label/unlabel by name or label with dry_run preview, confirm safeguard, and 3-item safety limit All bulk destructive operations require explicit confirm=true and support dry_run=true for safe preview. Label-based bulk ops resolve matching sessions first, then apply the operation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Add 32 new tests covering previously untested paths: Client layer: - _run_bulk dry_run path and partial failure handling - _run_bulk_by_label pipeline (delete/stop/restart by label) - _run_bulk_by_label with no matching sessions - bulk_label_sessions (success + dry_run) - bulk_unlabel_sessions (success + dry_run) Server dispatch layer: - get_session, create_session_from_template, clone_session, update_session, get_session_logs, get_session_transcript, get_session_metrics, label_resource, unlabel_resource, list_sessions_by_label - Confirmation enforcement for all 8 TOOLS_REQUIRING_CONFIRMATION - Confirmed dispatch for bulk_label, bulk_unlabel, bulk_restart, and all 3 by-label bulk operations Coverage: 72% → 81% overall (client 70→80%, server 63→83%) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #27
Expands the MCP server from 8 to 26 tools with comprehensive session management and observability capabilities:
acp_get_session,acp_update_session,acp_restart_session,acp_stop_session,acp_delete_sessionacp_bulk_delete,acp_bulk_stop,acp_bulk_restart,acp_bulk_delete_by_label,acp_bulk_stop_by_label,acp_bulk_restart_by_labelacp_label_session,acp_unlabel_session,acp_bulk_label,acp_bulk_unlabel,acp_bulk_label_by_label,acp_bulk_unlabel_by_labelacp_get_session_logs,acp_get_session_transcript,acp_get_session_metricsSafety features
All bulk destructive operations enforce:
confirm=truerequired (server-layer enforcement)dry_run=truefor safe previewMAX_BULK_ITEMS)Changes
src/mcp_acp/client.pysrc/mcp_acp/server.pysrc/mcp_acp/formatters.pyformat_logs(),format_transcript(),format_metrics(),format_labels()tests/test_client.pytests/test_formatters.pytests/test_server.pyAPI_REFERENCE.mdREADME.mdCLAUDE.mdTest plan
uv run pytest tests/ -q)ruff format . && ruff check .)🤖 Generated with Claude Code