Skip to content

feat(mcp): fastmcp in-process execution, in-memory tool dispatch & schema caching acceleration research #318

Closed

Description

@dan-petty

Context & Rationale

FastMCP tool handlers currently invoke uv run devops <subcommand> external subshells, incurring ~1.5s subshell initialization latency per tool invocation and causing agent response lag.

Scope & Deliverables

  • Context & Rationale*: FastMCP tool handlers currently invoke uv run devops <subcommand> external subshells, incurring ~1.5s subshell initialization latency per tool invocation and causing agent response lag.
  • Deep Integration & Functional Extension*: Direct in-process execution of CLI tools via Python functional APIs, completely eliminating subshell spawning; lazy domain-gated tool schema hydration; dynamic MCP resource subscriptions (resource://) for streaming state changes directly to IDE clients.
  • Code Optimization & Performance Acceleration*: Slash FastMCP tool execution latency from ~1,500ms down to <5ms (a 300x acceleration across multi-turn agent sessions); dramatically reduce process churn and CPU consumption during autonomous workflows.
  • Refactoring Potential & Legacy Elimination*: Refactor src/devops_cli/ai/mcp/server.py to decouple MCP tool signatures from CLI command line strings; eliminate repetitive _run_mcp_cmd wrappers; establish direct invocation bindings to core library functions.

Strategic Alignment

  • Milestone: v0.2.22 (Deep Subsystem Integration, Architectural Optimization & Extensible Refactoring)
  • Roadmap Reference: docs/ROADMAP.md

Activity

  1. added this to the v0.2.22 milestone on Sep 19, 2026
  2. added
    type/feature
    scope/mcp
    priority/p0-critical
    on Sep 19, 2026
  3. added a commit that references this issue on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p0-criticalscope/mcptype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions