Skip to content

AswinKumar1/Bug-Intelligence-Platform

Repository files navigation

MCP Server Implementation – Bug Triage Tracker

Overview

This Bug Triage Tracker implements a fully autonomous Model Context Protocol (MCP) server that enables multi-agent collaboration for bug classification and severity assessment. It now features a real-time analytics dashboard powered by MongoDB, offering full visibility into bug trends, team workload, and AI model performance.

MCP Architecture

Agent Roles

  • Technical Analyst Agent (DeepSeek)

    • Analyzes technical aspects
    • Identifies affected components
    • Assesses technical severity
    • Determines required skills
  • Context Understanding Agent (Llama)

    • Evaluates business impact
    • Assesses affected users and revenue
    • Determines business severity
  • Decision Making Agent (Mistral)

    • Synthesizes inputs
    • Resolves conflicts
    • Assigns to the right developer

MCP Communication Protocol

class MessageType(Enum):
    ANALYZE = "analyze"
    QUERY = "query"
    RESPOND = "respond"
    VOTE = "vote"
    DECIDE = "decide"

Agent Collaboration Flow

  1. Orchestrator → Technical Analyst: Request analysis
  2. Analyst responds with category/severity
  3. Orchestrator → Context Expert: Assess business impact
  4. Context Expert responds
  5. Analyst ↔ Context Expert: Discuss conflicting results
  6. Orchestrator → Decision Agent: Make final call
  7. Decision Agent → Orchestrator: Returns final triage decision

Key Features

  1. Autonomous Severity Assessment

    • Agents assess independently
    • Business and technical impacts merged for consensus
  2. Inter-Agent Communication

    • Structured messages
    • Disputes handled via dialogue
  3. Decision Justification

    • Decision agent logs reasoning
    • Human-readable summaries
  4. Real-Time Analytics with MongoDB

    • Tracks total bugs processed, model confidence, and processing time
    • Logs every decision and conflict resolution
    • Calculates ensemble accuracy dynamically
    • Monitors agent usage frequency
    • Visualizes team workload & utilization across categories

Implementation Details

MCP Message Format

@dataclass
class MCPMessage:
    sender: str
    receiver: str
    type: MessageType
    content: Dict
    context: Optional[Dict]

Knowledge Base Examples

  • Technical Analyst
{
  "technical_category": "API",
  "complexity": "High",
  "components_affected": ["payment-service"],
  "severity_assessment": "High"
}
  • Context Expert
{
  "user_impact": "Severe",
  "business_priority": "P0",
  "revenue_impact": "Direct - Critical",
  "severity_from_impact": "Critical"
}

MongoDB Integration (NEW)

  • Collections: bug_collection, team_collection

  • Stored Fields: created_at, processing_time, confidence, correct, models_used

  • Backend Analytics:

  • Accuracy = % of bugs marked correct

  • Confidence = average across all predictions

  • Real-time trend: daily bug count

  • Model usage breakdown: DeepSeek, Llama, Mistral

  • Team workload: current vs. max capacity

API Endpoints

/triage-bug-mcp

Main MCP endpoint Request:

{
  "title": "Payment gateway timeout",
  "description": "504 errors after 30 seconds",
  "severity": "High"
}

Response:

{
  "id": "BUG-20240605123456",
  "category": "API",
  "severity": "Critical",
  "priority": "P0",
  "assigned_to": {
    "name": "Alice Chen",
    "team": "API",
    "skill_match_score": 95
  },
  "mcp_details": {
    "messages_exchanged": 7,
    "collaboration_occurred": true,
    "communication_log": [...]
  }
}

/mcp-demo

Demo endpoint simulating full agent workflow.

Qualifying for Track 1 and 3

  • #mcp-server-track: Implements the full MCP spec, agent messaging, and autonomous triage pipeline
  • #agent-demo-track: Rich real-time analytics and interactive front-end showcase multi-agent intelligence in action

Running the Server

modal deploy src/modal_backend/mcp_app.py

Test:

curl -X POST https://your-app.modal.run/triage-bug-mcp \
     -H "Content-Type: application/json" \
     -d '{"title": "Bug title", "description": "Bug details"}'

Real-Time Dashboard

Future Enhancements

  • Agent memory from past bugs
  • Auto-retraining for model drift
  • Role-based access to analytics
  • Integration with GitHub Issues and Jira

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages