{"id":"68eae394-5aa4-411b-8464-aa4c620b4402","slug":"mcp-developer-assistant","kind":"mcp","name":"mcp-developer-assistant","summary":"MCP server with AI-powered code intelligence, OAuth 2.1 security, behavioral anomaly detection, and semantic code search.","owner":"anmol2982002","repoUrl":"https://github.com/anmol2982002/mcp-developer-assistant","license":"MIT","licenseTier":"permissive","trust":"community","stars":0,"match":null,"fewStars":true,"format":"mcp","createdAt":"2025-12-27T18:16:30.000Z","addedAt":"2026-10-21T05:44:55.758Z","logoUrl":"https://avatars.githubusercontent.com/u/72137967?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["cloud-infra","developer-tools","search"],"tags":["ai-tools","anomaly-detection","code-review","docker","fastapi","grafana","llm","machine-learning"],"runtime":"python","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-23T18:04:15.226Z","sample":false,"url":"https://conduits.dev/tools/mcp-developer-assistant","language":"Python","transports":["stdio"],"install":{"pypi":"mcp-developer-assistant"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"<p align=\"center\">\n  <img src=\"https://img.shields.io/badge/Python-3.11+-blue?style=for-the-badge&logo=python\" alt=\"Python\">\n  <img src=\"https://img.shields.io/badge/FastAPI-0.104+-green?style=for-the-badge&logo=fastapi\" alt=\"FastAPI\">\n  <img src=\"https://img.shields.io/badge/Docker-Ready-blue?style=for-the-badge&logo=docker\" alt=\"Docker\">\n  <img src=\"https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge\" alt=\"License\">\n</p>\n\n<h1 align=\"center\">🤖 MCP Developer Assistant</h1>\n\n<p align=\"center\">\n  <strong>A production-grade Model Context Protocol (MCP) server with AI-powered code intelligence, enterprise security, and behavioral anomaly detection.</strong>\n</p>\n\n<p align=\"center\">\n  <a href=\"#-features\">Features</a> •\n  <a href=\"#-architecture\">Architecture</a> •\n  <a href=\"#-quick-start\">Quick Start</a> •\n  <a href=\"#-security\">Security</a> •\n  <a href=\"#-documentation\">Documentation</a>\n</p>\n\n---\n\n## 🎯 Overview\n\nMCP Developer Assistant is a secure, intelligent bridge between AI assistants (Claude, VS Code Copilot, etc.) and your local development environment. It provides:\n\n- **Smart Code Tools** — File operations, Git integration, and AST-based code analysis\n- **AI-Powered Intelligence** — Semantic code search, automated reviews, and natural language Q&A\n- **Enterprise Security** — OAuth 2.1, intent validation, behavioral anomaly detection\n- **Production Observability** — Prometheus metrics, Grafana dashboards, structured logging\n\n---\n\n## ✨ Features\n\n### Developer Tools\n| Tool | Description |\n|------|-------------|\n| `read_file` | Read files with syntax highlighting and line ranges |\n| `search_files` | Pattern-based code search across the codebase |\n| `git_status` / `git_diff` / `git_log` | Full Git integration |\n| `extract_functions` | AST-based code structure extraction |\n\n### AI-Powered Tools\n| Tool | Description |\n|------|-------------|\n| `ask_about_code` | Natural language Q&A with semantic search (BM25 + FAISS) |\n| `summarize_repo` | Intelligent project overview generation |\n| `summarize_diff` | AI-generated PR/commit summaries |\n| `review_changes` | Automated code review with risk scoring |\n\n### Security Layer\n- **OAuth 2.1 Proxy** with PKCE and token rotation\n- **Intent Checking** — LLM validates requests match tool purpose\n- **Anomaly Detection** — Ensemble ML (Isolation Forest + LOF + One-Class SVM) learns patterns and flags suspicious access\n- **Rate Limiting** — Sliding window with per-user quotas\n- **Audit Logging** — PII-sanitized, structured JSON logs\n\n---\n\n## 🏗️ Architecture\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                     MCP CLIENT LAYER                             │\n│          (Claude Desktop / VS Code / Custom Client)              │\n└────────────────────────┬────────────────────────────────────────┘\n                         │ JSON-RPC 2.0\n┌────────────────────────▼────────────────────────────────────────┐\n│              SECURITY PROXY (:8001)                              │\n│  ┌────────────────────────────────────────────────────────────┐ │\n│  │ OAuth 2.1 → Consent Check → Intent Validation → Anomaly    │ │\n│  │ Detection → Rate Limiting → Audit Logging                  │ │\n│  └────────────────────────────────────────────────────────────┘ │\n└────────────────────────┬────────────────────────────────────────┘\n                         │\n┌────────────────────────▼────────────────────────────────────────┐\n│              MCP SERVER (:8000)                                  │\n│  ┌─────────────────┐  ┌─────────────────┐  ┌─────────────────┐  │\n│  │   File Tools    │  │   Git Tools     │  │   AI Tools      │  │\n│  │   Code Tools    │  │   Policy Engine │  │   Risk Scorer   │  │\n│  └─────────────────┘  └─────────────────┘  └─────────────────┘  │\n└─────────────────────────────────────────────────────────────────┘\n```\n\n### Request Flow\n\n```mermaid\nflowchart TB\n    subgraph Client[\"🖥️ MCP Client\"]\n        A[Claude Desktop / VS Code]\n    end\n\n    subgraph Proxy[\"🛡️ Security Proxy :8001\"]\n        B[OAuth 2.1 Validation]\n        C[Consent Check]\n        D[Intent Validation]\n        E[Anomaly Detection]\n        F[Rate Limiter]\n        G[Audit Logger]\n    end\n\n    subgraph Server[\"⚙️ MCP Server :8000\"]\n        H[Policy Engine]\n        I[Tool Router]\n        subgraph Tools[\"Available Tools\"]\n            J[File Tools]\n            K[Git Tools]\n            L[Code Tools]\n            M[AI Tools]\n        end\n    end\n\n    subgraph AI[\"🧠 AI/ML Layer\"]\n        N[Hybrid Search]\n        O[Risk Scorer]\n        P[LLM Client]\n    end\n\n    A -->|JSON-RPC| B\n    B -->|Valid Token| C\n    C -->|Consent OK| D\n    D -->|Intent OK| E\n    E -->|Normal Pattern| F\n    F -->|Within Limit| G\n    G -->|Logged| H\n    H --> I\n    I --> J & K & L & M\n    M --> N & O & P\n\n    style Client fill:#e1f5fe\n    style Proxy fill:#fff3e0\n    style Server fill:#e8f5e9\n    style AI fill:#f3e5f5\n```\n\n---\n\n## ⚡ Quick Start\n\n### Prerequisites\n- Python 3.10+\n- Git\n- (Optional) Docker\n\n### Installation\n\n```bash\n# Clone\ngit clone https://github.com/yourusername/mcp-developer-assistant.git\ncd mcp-developer-assistant\n\n# Setup\npython -m venv venv && source venv/bin/activate  # Windows: .\\venv\\Scripts\\activate\npip install -r requirements.txt\n\n# Configure\ncp .env.example .env\n# Add your GROQ_API_KEY or OPENAI_API_KEY to .env\n\n# Initialize\npython scripts/setup_db.py\npython scripts/train_models.py  # Optional: train ML models\n```\n\n### Run\n\n```bash\n# Development\npython -m uvicorn server.mcp_server:app --reload --port 8000\npython -m uvicorn proxy.auth_gateway:app --reload --port 8001\n\n# Docker (Production)\ndocker-compose up -d\n```\n\n### Verify\n\n```bash\ncurl http://localhost:8000/health\ncurl http://localhost:8000/tools | jq .\n```\n\n---\n\n## 🔐 Security\n\nThe proxy layer implements defense-in-depth security:\n\n| Layer | Description |\n|-------|-------------|\n| **Authentication** | OAuth 2.1 with PKCE, token introspection, refresh rotation |\n| **Authorization** | Per-client consent management, scope enforcement |\n| **Intent Validation** | LLM-as-Judge pattern detects tool misuse attempts |\n| **Anomaly Detection** | ML ensemble learns normal patterns, flags deviations |\n| **Rate Limiting** | Sliding window algorithm with burst handling |\n| **Audit Trail** | PII-sanitized structured logs with retention policies |\n\n---\n\n## 📊 Observability\n\n| Component | Description |\n|-----------|-------------|\n| **Prometheus** | 50+ custom metrics (latency, ML confidence, token usage) |\n| **Grafana** | Pre-built dashboards for anomalies, latency, LLM costs |\n| **Structured Logging** | JSON format with request correlation |\n| **Health Checks** | Kubernetes-ready `/health` endpoints |\n\nAccess Grafana at `http://localhost:3000` (admin/admin) when running with Docker.\n\n---\n\n## 📁 Project Structure\n\n```\nmcp-developer-assistant/\n├── proxy/              # Security gateway (OAuth, rate limiting, ML detection)\n├── server/             # MCP server and tool implementations\n├── ai/                 # ML components (embeddings, anomaly detection, risk scoring)\n├── observability/      # Metrics, logging, Grafana dashboards\n├── tests/              # Test suite (18 files)\n├── docs/               # API and usage documentation\n└── .github/workflows/  # CI/CD pipelines\n```\n\n---\n\n## 📚 Documentation\n\n| Document | Description |\n|----------|-------------|\n| [API Reference](docs/API.md) | Complete endpoint documentation |\n| [Developer Setup](docs/DEVELOPER_SETUP.md) | Development environment guide |\n| [Usage Guide](docs/USAGE_GUIDE.md) | End-to-end usage instructions |\n\n---\n\n## 🧪 Testing\n\n```bash\n# Run tests\npytest tests/ -v --cov=. --cov-report=html\n\n# Validate project structure\npython scripts/validate_project.py\n\n# Load testing\npip install locust && locust -f locustfile.py --host=http://localhost:8001\n```\n\n---\n\n## 🤝 Contributing\n\nContributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n---\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) for details.\n"}