Refactor and enhance worker-local MCP runtime control #197

Merged
rwachters merged 7 commits from add-worker-local-mcp-runtime-control-implementation into change-mcp-tool-call-architecture 2026-04-21 12:18:47 +00:00
rwachters commented 2026-04-21 12:18:32 +00:00 (Migrated from github.com)

Summary

This pull request refactors existing worker-local MCP runtime components and introduces several enhancements to streamline runtime control and process management.

Changes Overview

  • Refactoring:

    • Removed Worker prefix from core MCP components for improved readability.
    • Reorganized data classes, error types, and dependency injection structures.
  • Feature Enhancements:

    • Consolidated MCP tool calls into WorkerLocalMcpRuntimeService.
    • Introduced WorkerRuntime.close() for cleaner resource management.
    • Implemented inactivity-based auto-stop for local MCP processes.
    • Added comprehensive runtime control commands (get_runtime_status, list_runtime_statuses) with updates to reflect runtime state in the UI.
    • Updated tool discovery logic to fetch and refresh runtime tool metadata.
  • Dependency Management:

    • Updated Koin module to include new and refactored runtime control components.
    • Introduced MCP SDK and related dependencies for improved integration.
  • Testing:

    • Added unit tests to ensure reliable operation of the runtime control logic.
    • Verified idempotency of WorkerRuntime.close() operations.

Checklist

  • Documentation has been updated as needed.
  • Unit tests have been added for new functionality.
  • Existing unit tests pass as expected.
### Summary This pull request refactors existing worker-local MCP runtime components and introduces several enhancements to streamline runtime control and process management. ### Changes Overview - **Refactoring**: - Removed `Worker` prefix from core MCP components for improved readability. - Reorganized data classes, error types, and dependency injection structures. - **Feature Enhancements**: - Consolidated MCP tool calls into `WorkerLocalMcpRuntimeService`. - Introduced `WorkerRuntime.close()` for cleaner resource management. - Implemented inactivity-based auto-stop for local MCP processes. - Added comprehensive runtime control commands (`get_runtime_status`, `list_runtime_statuses`) with updates to reflect runtime state in the UI. - Updated tool discovery logic to fetch and refresh runtime tool metadata. - **Dependency Management**: - Updated Koin module to include new and refactored runtime control components. - Introduced MCP SDK and related dependencies for improved integration. - **Testing**: - Added unit tests to ensure reliable operation of the runtime control logic. - Verified idempotency of `WorkerRuntime.close()` operations. ### Checklist - [ ] Documentation has been updated as needed. - [ ] Unit tests have been added for new functionality. - [ ] Existing unit tests pass as expected.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Torvian.eu/chatbot!197
No description provided.