loading…
Search for a command to run...
loading…
Analyzes TypeScript codebases for health issues, fetches system incidents, and generates remediation plans.
Analyzes TypeScript codebases for health issues, fetches system incidents, and generates remediation plans.
A production-grade MCP (Model Context Protocol) server that analyzes TypeScript codebases, detects code health issues, fetches system incidents, and generates actionable remediation plans. Supports dual transport (STDIO for local dev, SSE for cloud deployment). Built with ts-morph, Express, and Zod validation.
analyze_codebase_health — Scans TypeScript repositories for:
ts-morph for AST-level analysisfetch_system_incidents — Returns structured incident data:
generate_remediation_plan — Creates actionable fix plans:
All tools return structured success/error envelopes designed for LLM consumption.
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]
npm installnpm run dev:stdioTRANSPORT=sseAUTH_TOKEN=your-secret-tokennpm run dev:sseGET /events for SSE streamPOST /messages?sessionId=... for MCP JSON-RPC messagesFor local usage, register Nexus-Core as a stdio MCP server:
nodedist/index.js (after build) or tsx src/index.ts (dev)TRANSPORT=stdioFor hosted usage, configure your MCP client to use the SSE endpoint:
https://<host>/eventshttps://<host>/messages?sessionId=<session-id>Authorization: Bearer <AUTH_TOKEN> if token auth is enabled.See .env.example for all supported settings. Important controls:
TRANSPORT: stdio or sseTOOL_TIMEOUT_MS: hard timeout for each tool callTS_MORPH_MAX_FILES, TS_MORPH_MAX_DEPTH: analysis guardrailsINCIDENT_API_TIMEOUT_MS, INCIDENT_API_RETRIES: external dependency controlsSSE_HEARTBEAT_MS, SSE_SESSION_TTL_MS: SSE session lifecycledocker build -t nexus-core .docker run -e TRANSPORT=sse -e PORT=8080 -p 8080:8080 nexus-coreUse deploy.sh:
PROJECT_ID=<gcp-project> REGION=<region> SERVICE=nexus-core ./deploy.sh
This script:
codemessageretryablesuggestedActionmeta (requestId, toolName, timing)Add this to claude_desktop_config.json and restart Claude Desktop.
{
"mcpServers": {
"mcp-server-codebase-analyzer": {
"command": "npx",
"args": []
}
}
}