MCP Server Codebase Analyzer
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Server Codebase Analyzer
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.
π Features
Three Core Tools:
analyze_codebase_healthβ Scans TypeScript repositories for:Large files (potential refactoring candidates)
Missing explicit function types (weak typing)
Circular dependencies (architectural issues)
Uses
ts-morphfor AST-level analysis
fetch_system_incidentsβ Returns structured incident data:Mock incident data (perfect for testing/demos)
Configurable delays and failure modes
LLM-friendly JSON responses
generate_remediation_planβ Creates actionable fix plans:Root cause analysis from stack traces
Step-by-step remediation steps
Code suggestions and best practices
Risk level assessment
All tools return structured success/error envelopes designed for LLM consumption.
Related MCP server: butter-code-health
Architecture Overview
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]Local Run (STDIO)
Install dependencies:
npm install
Start server:
npm run dev:stdio
The server starts over stdin/stdout and is ready for local MCP clients.
Run with SSE (Express)
Set environment:
TRANSPORT=sseoptional:
AUTH_TOKEN=your-secret-token
Start server:
npm run dev:sse
Endpoints:
GET /eventsfor SSE streamPOST /messages?sessionId=...for MCP JSON-RPC messages
Connect From Cursor
For local usage, register Nexus-Core as a stdio MCP server:
command:
nodeargs:
dist/index.js(after build) ortsx src/index.ts(dev)env:
TRANSPORT=stdio
For hosted usage, configure your MCP client to use the SSE endpoint:
stream URL:
https://<host>/eventsmessage URL:
https://<host>/messages?sessionId=<session-id>add
Authorization: Bearer <AUTH_TOKEN>if token auth is enabled.
Example Prompts
"Analyze my repo"
"Fetch incidents"
"Fix this error"
Environment Variables
See .env.example for all supported settings. Important controls:
TRANSPORT:stdioorsseTOOL_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 lifecycle
Production Deployment
Docker
Build image:
docker build -t nexus-core .Run container:
docker run -e TRANSPORT=sse -e PORT=8080 -p 8080:8080 nexus-core
Cloud Run
Use deploy.sh:
PROJECT_ID=<gcp-project> REGION=<region> SERVICE=nexus-core ./deploy.shThis script:
Builds container image
Pushes to GCR
Deploys to Cloud Run
Reliability and Error Model
All tool requests are validated with Zod.
No tool execution returns unhandled exceptions.
Errors use a standard envelope with:
codemessageretryablesuggestedActionmeta(requestId,toolName, timing)
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your app's logs, metrics and incidents from your AI assistant.
AI SRE: investigate production incidents across your observability stack.
Manage uptime monitors and incidents and search logs, metrics and traces from an AI assistant.
Health scores for your team's frontend repos: findings, the fixes worth most points, and SBOMs.
Related MCP Servers
- 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.29194 npm4Apache 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.5 npm3MIT
- AlicenseNot gradedqualityDmaintenanceAnalyzes codebases to produce structured quality health reports with risk-scored modules based on git churn, test coverage, and test-to-source mapping, acting as an MCP server for AI coding agents and a standalone CLI.MIT

Carrickofficial
FlicenseNot gradedqualityBmaintenanceEnables AI coding agents to query a live, type-aware, intent-aware cross-repo index of an organization's TypeScript services, answering semantic questions about functions, endpoints, types, and behavior across repositories. It also supports validation of cross-repo API mismatches and same-repo checks.7-