MCP Server Codebase Analyzer
MCPサーバー・コードベース・アナライザー
TypeScriptコードベースを分析し、コードの健全性の問題を検出し、システムインシデントを取得し、実行可能な修復計画を生成するプロダクショングレードのMCP(Model Context Protocol)サーバーです。デュアルトランスポート(ローカル開発用のSTDIO、クラウドデプロイ用のSSE)をサポートしています。ts-morph、Express、Zodバリデーションを使用して構築されています。
🚀 機能
3つのコアツール:
analyze_codebase_health— TypeScriptリポジトリをスキャンして以下を検出します:大きなファイル(リファクタリング候補)
明示的な関数型の欠如(弱い型付け)
循環依存関係(アーキテクチャ上の問題)
ASTレベルの分析に
ts-morphを使用
fetch_system_incidents— 構造化されたインシデントデータを返します:モックインシデントデータ(テストやデモに最適)
設定可能な遅延と障害モード
LLMフレンドリーなJSONレスポンス
generate_remediation_plan— 実行可能な修正計画を作成します:スタックトレースからの根本原因分析
ステップバイステップの修復手順
コードの提案とベストプラクティス
リスクレベル評価
すべてのツールは、LLMでの利用を想定した構造化された成功/エラーエンベロープを返します。
Related MCP server: ts-diagnostics-mcp
アーキテクチャの概要
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]ローカル実行 (STDIO)
依存関係のインストール:
npm install
サーバーの起動:
npm run dev:stdio
サーバーがstdin/stdout経由で起動し、ローカルのMCPクライアントの準備が整います。
SSEでの実行 (Express)
環境変数の設定:
TRANSPORT=sseオプション:
AUTH_TOKEN=your-secret-token
サーバーの起動:
npm run dev:sse
エンドポイント:
SSEストリーム用の
GET /eventsMCP JSON-RPCメッセージ用の
POST /messages?sessionId=...
Cursorからの接続
ローカルで使用する場合、Nexus-Coreをstdio MCPサーバーとして登録します:
command:
nodeargs:
dist/index.js(ビルド後) またはtsx src/index.ts(開発時)env:
TRANSPORT=stdio
ホスト環境で使用する場合、MCPクライアントがSSEエンドポイントを使用するように設定します:
stream URL:
https://<host>/eventsmessage URL:
https://<host>/messages?sessionId=<session-id>トークン認証が有効な場合は
Authorization: Bearer <AUTH_TOKEN>を追加してください。
プロンプトの例
"Analyze my repo" (リポジトリを分析して)
"Fetch incidents" (インシデントを取得して)
"Fix this error" (このエラーを修正して)
環境変数
サポートされているすべての設定については .env.example を参照してください。重要な制御項目:
TRANSPORT:stdioまたはsseTOOL_TIMEOUT_MS: 各ツール呼び出しのハードタイムアウトTS_MORPH_MAX_FILES,TS_MORPH_MAX_DEPTH: 分析のガードレールINCIDENT_API_TIMEOUT_MS,INCIDENT_API_RETRIES: 外部依存関係の制御SSE_HEARTBEAT_MS,SSE_SESSION_TTL_MS: SSEセッションのライフサイクル
本番環境へのデプロイ
Docker
イメージのビルド:
docker build -t nexus-core .コンテナの実行:
docker run -e TRANSPORT=sse -e PORT=8080 -p 8080:8080 nexus-core
Cloud Run
deploy.sh を使用します:
PROJECT_ID=<gcp-project> REGION=<region> SERVICE=nexus-core ./deploy.shこのスクリプトは以下の処理を行います:
コンテナイメージのビルド
GCRへのプッシュ
Cloud Runへのデプロイ
信頼性とエラーモデル
すべてのツールリクエストはZodで検証されます。
ツール実行で未処理の例外が返されることはありません。
エラーは以下の項目を含む標準エンベロープを使用します:
codemessageretryablesuggestedActionmeta(requestId,toolName, タイミング)
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