Skip to content

[STORY] Analytics & Monitoring Tools for MCP #497

@jsbattig

Description

@jsbattig

Part of: #477

Story: Analytics & Monitoring Tools for MCP

Feature Group: F10 - Analytics & Monitoring (NEW)

📖 Story Overview

User Story

As a Claude.ai user, I want to access repository analytics and job monitoring through MCP so that I can understand codebase composition and monitor async operations without leaving the AI interface.

Objective

Expose 4 production-ready analytics and monitoring capabilities through MCP tools, enabling AI assistants to provide contextual insights about repository composition, health status, and operational monitoring.

User Value

  • 📊 Repository Analytics: Understand codebase composition (languages, file counts, storage)
  • 🖥️ Job Monitoring: Track async operations (activation, sync, indexing) with real-time status
  • 🗂️ Multi-Repo Dashboard: Monitor all activated repositories from single view
  • 🔗 Composite Repos: Manage multi-repository aggregation workflows

✅ Backend Status: 100% COMPLETE ✅

ALL 4 tools have complete, production-ready backend implementations:

  1. Tool [EPIC] Daemon Temporal Watch Integration #19: get_repository_statisticsGET /api/repositories/{repo_id}/stats
  2. Tool [EPIC] Temporal Git History Semantic Search #20: get_job_statisticsGET /api/admin/jobs/stats
  3. Tool [STORY] Implement POC Test Framework #21: get_all_repositories_statusGET /api/repos/status
  4. Tool [STORY] Async Display Worker #22: manage_composite_repository → Multiple composite operations ✅

Implementation Work Required: Thin MCP wrappers only (~2-3 hours total)


🔧 MCP Tool Specifications

Tool #19: get_repository_statistics ⭐ HIGH

  • Backend: GET /api/repositories/{repo_id}/stats
  • Provides: File counts by 20+ languages, storage metrics, activity info, health assessment
  • Effort: 20-30 minutes

Tool #20: get_job_statistics ⭐ HIGH (Admin)

  • Backend: GET /api/admin/jobs/stats
  • Provides: Queue stats, resource utilization, wait times, job history
  • Effort: 30 minutes (admin filtering)

Tool #21: get_all_repositories_status ⭐ HIGH

  • Backend: GET /api/repos/status
  • Provides: Multi-repo dashboard, aggregate health, sync status
  • Effort: 20-30 minutes

Tool #22: manage_composite_repository 🔸 MEDIUM

  • Backend: Multiple composite operations
  • Provides: Multi-repo aggregation, unified browsing, component-aware paths
  • Effort: 60 minutes (action routing)

📋 Implementation Checklist

Tool Implementation (~2-3 hours total)

MCP Registry Updates

Testing


📊 Definition of Done

  • All 4 MCP tools implemented and tested
  • Admin-only filtering working for Tool [EPIC] Temporal Git History Semantic Search #20
  • Composite repository support validated
  • All unit tests passing (>85% coverage)
  • Integration tests passing
  • Documentation complete
  • Tool registry updated (22 tools)

Story Metadata:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions