MCP Server Codebase Analyzer
MCP Server Codebase Analyzer
Ein produktionsreifer MCP-Server (Model Context Protocol), der TypeScript-Codebasen analysiert, Probleme mit der Code-Integrität erkennt, Systemvorfälle abruft und umsetzbare Sanierungspläne erstellt. Unterstützt dualen Transport (STDIO für lokale Entwicklung, SSE für Cloud-Bereitstellung). Erstellt mit ts-morph, Express und Zod-Validierung.
🚀 Funktionen
Drei Kern-Tools:
analyze_codebase_health— Scannt TypeScript-Repositories auf:Große Dateien (potenzielle Kandidaten für Refactoring)
Fehlende explizite Funktionstypen (schwache Typisierung)
Zirkuläre Abhängigkeiten (architektonische Probleme)
Verwendet
ts-morphfür die Analyse auf AST-Ebene
fetch_system_incidents— Gibt strukturierte Vorfalldaten zurück:Mock-Vorfalldaten (perfekt für Tests/Demos)
Konfigurierbare Verzögerungen und Fehlermodi
LLM-freundliche JSON-Antworten
generate_remediation_plan— Erstellt umsetzbare Korrekturpläne:Ursachenanalyse anhand von Stack-Traces
Schritt-für-Schritt-Sanierungsschritte
Code-Vorschläge und Best Practices
Risikobewertung
Alle Tools geben strukturierte Erfolgs-/Fehler-Umschläge zurück, die für die LLM-Verarbeitung konzipiert sind.
Related MCP server: ts-diagnostics-mcp
Architekturübersicht
flowchart LR
Client[McpClient] --> Runtime[RuntimeSelector]
Runtime -->|stdio| Stdio[StdioTransportAdapter]
Runtime -->|sse| Sse[SseTransportAdapter]
Stdio --> Server[McpServer]
Sse --> Server
Server --> Registry[ToolRegistry]
Registry --> ToolA[analyze_codebase_health]
Registry --> ToolB[fetch_system_incidents]
Registry --> ToolC[generate_remediation_plan]Lokaler Betrieb (STDIO)
Abhängigkeiten installieren:
npm install
Server starten:
npm run dev:stdio
Der Server startet über stdin/stdout und ist bereit für lokale MCP-Clients.
Betrieb mit SSE (Express)
Umgebung festlegen:
TRANSPORT=sseoptional:
AUTH_TOKEN=your-secret-token
Server starten:
npm run dev:sse
Endpunkte:
GET /eventsfür SSE-StreamPOST /messages?sessionId=...für MCP JSON-RPC-Nachrichten
Verbindung von Cursor
Für die lokale Nutzung registrieren Sie Nexus-Core als stdio MCP-Server:
Befehl:
nodeArgumente:
dist/index.js(nach dem Build) odertsx src/index.ts(dev)Umgebung:
TRANSPORT=stdio
Für die gehostete Nutzung konfigurieren Sie Ihren MCP-Client für die Verwendung des SSE-Endpunkts:
Stream-URL:
https://<host>/eventsNachrichten-URL:
https://<host>/messages?sessionId=<session-id>Fügen Sie
Authorization: Bearer <AUTH_TOKEN>hinzu, falls Token-Authentifizierung aktiviert ist.
Beispiel-Prompts
"Analysiere mein Repo"
"Rufe Vorfälle ab"
"Behebe diesen Fehler"
Umgebungsvariablen
Siehe .env.example für alle unterstützten Einstellungen. Wichtige Kontrollen:
TRANSPORT:stdioodersseTOOL_TIMEOUT_MS: Hard-Timeout für jeden Tool-AufrufTS_MORPH_MAX_FILES,TS_MORPH_MAX_DEPTH: Analyse-LeitplankenINCIDENT_API_TIMEOUT_MS,INCIDENT_API_RETRIES: Kontrollen für externe AbhängigkeitenSSE_HEARTBEAT_MS,SSE_SESSION_TTL_MS: SSE-Sitzungslebenszyklus
Produktionsbereitstellung
Docker
Image bauen:
docker build -t nexus-core .Container ausführen:
docker run -e TRANSPORT=sse -e PORT=8080 -p 8080:8080 nexus-core
Cloud Run
Verwenden Sie deploy.sh:
PROJECT_ID=<gcp-project> REGION=<region> SERVICE=nexus-core ./deploy.shDieses Skript:
Baut das Container-Image
Pusht es zu GCR
Stellt es auf Cloud Run bereit
Zuverlässigkeit und Fehlermodell
Alle Tool-Anfragen werden mit Zod validiert.
Keine Tool-Ausführung gibt unbehandelte Ausnahmen zurück.
Fehler verwenden einen Standard-Umschlag mit:
codemessageretryablesuggestedActionmeta(requestId,toolName, Timing)
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Ship production-ready TypeScript code in half the time, at half the cost.
- SuperlogOAuthsh.superlog
Open-source agent that observes and fixes your application. Query logs, traces, metrics, incidents.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables intelligent analysis of codebases to generate comprehensive documentation, calculate documentation coverage, and identify missing documentation with severity levels. Supports TypeScript, JavaScript, and Python with AI-powered suggestions for documentation improvements.416MIT
- AlicenseAqualityDmaintenanceProvides real-time TypeScript diagnostics with intelligent caching for AI agents, enabling instant queries instead of running tsc repeatedly.9323MIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to interact with TypeScript projects through compiler-level code intelligence, providing tools for navigation, type information, diagnostics, refactoring, and semantic search.293423Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to analyze code health in TypeScript/JavaScript projects, providing tools to run analysis, start a dashboard, and get summaries.223MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kushalsai-01/mcp-server-codebase-analyser'
If you have feedback or need assistance with the MCP directory API, please join our Discord server