Skip to content

MCP_stories

GitHub Action edited this page Feb 23, 2026 · 2 revisions

US MCP Autonomous Capabilities : Provide standardized AI tools for autonomous mission execution


classes relations

classDiagram
    class Service {
        <<abstract>>
        +start()
        +stop()
    }

    class MCPService {
        +r2r_client: AsyncClient
        +start()
        +stop()
    }
    Service <|-- MCPService

    class Server {
        +list_tools()
        +call_tool()
    }

    class MCPTools {
        <<module>>
        +plan_mission()
        +execute_code()
        +run_tests()
        +security_review()
        +retrieve_context()
        +index_code()
    }

    class SandboxBackend {
        <<interface>>
        +run_tests()
    }
    class SubprocessSandbox {
        +run_tests()
    }
    SandboxBackend <|-- SubprocessSandbox

    Server ..> MCPTools : "dispatches"
    MCPTools ..> MCPService : "uses clients"
    MCPTools ..> SandboxBackend : "executes in"
Loading

User Stories: MCP Tools


1. User Story: Mission Planning

Title: As an autonomous agent, I want to decompose a high-level goal into a task DAG, so I can execute complex missions step-by-step.

Description: The plan_mission tool uses Gemini Pro (via LiteLLM) to take an arbitrary goal and return a JSON structure of interdependent tasks.

Acceptance Criteria:

  • Returns a valid JSON DAG with IDs, names, and dependency lists.
  • Handles empty or nonsense goals gracefully.

2. User Story: Sandboxed Testing

Title: As a developer, I want to run generated code in an isolated environment, so I can verify correctness without risking the main workspace.

Description: The run_tests tool leverages SubprocessSandbox to execute pytest in a transient directory containing the proposed code changes.

Acceptance Criteria:

  • Captures pass/fail status and stdout/stderr results.
  • Supports configurable timeouts to prevent hanging processes.

3. User Story: Security Analysis

Title: As a security officer, I want every code change to be automatically reviewed for vulnerabilities, so I can maintain high security standards.

Description: The security_review tool combines regex-based OWASP pattern detection with R2R RAG retrieval of security best practices to provide a final "Approved" or "Rejected" verdict.

Acceptance Criteria:

  • Detects Command Injection, SQL Injection, and Hardcoded Secrets.
  • Rejects any code containing high-severity OWASP findings.

Common Acceptance Criteria

  1. JSON Schema Compliance: Every tool must expose a valid JSON Schema for its inputs.
  2. Standardized Response: All tools must return JSON-serializable results wrapped in TextContent.
  3. Traceability: All LLM and RAG calls must be traceable via standard logging.

Code location

Deployment location

  • Kubernetes Base: k8s/base
    • mcp-deployment.yaml & mcp-configmap.yaml (MCP tool server running via SSE)
    • opencode-deployment.yaml & opencode-scaledobject.yaml (Hatchet Worker agent managed by KEDA)

Test location

Clone this wiki locally