DevContext
DevContext
DevContext は、AIコーディングアシスタントとエンジニアに、ランタイムの可観測性データ(ログ、デプロイ、ヘルスメトリクス)を提供し、インシデントのトリアージを支援する、Model Context Protocol (MCP) サーバーと CLI ツールのプロトタイプです。
概要
コーディングアシスタントは、ソースリポジトリを調査し、修正案を作成することはできますが、ランタイムインシデント中に何が起きているか(最近のデプロイ、エラーレートの急上昇、ディスクの枯渇、下流APIの障害など)を把握できないことがよくあります。DevContext は、コマンドラインインターフェイス(CLI)と標準的な MCP ツール呼び出しを通じてランタイムコンテキストを公開するコンセプト実証ツールです。
Related MCP server: AI Incident Monitoring RCA MCP Server
CLI とツールコマンド
DevContext は、コマンドラインから直接実行することも、MCP サーバーとして登録することもできます。
1. devcontext diagnose
組み込みデータセットまたはカスタムファイル/フォルダーに対して、インシデントの自動トリアージを実行します。
# Diagnose built-in service dataset
devcontext diagnose --service order-processing
# Output raw JSON format
devcontext diagnose --service order-processing --json
# Point at custom log, deploy, and health paths (files or log directories)
devcontext diagnose --log-path /var/log/app/ --deploys-path deploys.json --health-path health.json
# Enable experimental Groq LLM extraction
devcontext diagnose --service order-processing --use-llm2. devcontext serve
MCP ホスト(例: Claude Desktop、Antigravity)に接続するための stdio MCP サーバーを起動します。
devcontext serveログ解析オプション
決定論的パーサー(
parser.py): ヒューリスティックを使用してログ行をサンプリングし、構造マッチング(JSON-lines、CSV、キー値ペア、または基本的な括弧区切り/スペース区切りのタイムスタンプ)を試みます。制限: 単純な単一行ログに最適です。複雑な複数行のスタックトレースや非標準のカスタム形式では、基本的な行マッチングにフォールバックする場合があります。
実験的 LLM 抽出(
extraction.py): オプションで、ログチャンクを Groq の API(response_format={"type": "json_object"})に送信して、構造化されたイベントオブジェクトを抽出します。制限: API のレイテンシ(約200~400ms)とトークンコストが発生します。API キーがない場合や呼び出しがタイムアウトした場合は、決定論的パーサーにフォールバックします。
データソースオプション
組み込みモックデータ: サービスの一部(例:
service_name="order-processing")を渡すと、同梱のデモデータを照会できます。カスタムファイルまたはディレクトリパス:
log_path: 単一のログファイル、または分割された.log/.txtファイルを含むディレクトリへのパス。deploys_path: カスタムdeploys.jsonファイルへのパス。health_path: カスタムhealth.jsonファイルへのパス。
評価とテストシナリオ
リポジトリには、5 つの合成テストシナリオで検証された評価ハーネス(eval.py)が含まれています。
シナリオ | サービス | シナリオ種別 | 期待される結果 | 結果 |
|
| リソース制限の削減 | デプロイ | 合格 |
|
| ディスク満杯(直近のデプロイなし) | ディスクの枯渇(98%)を特定 | 合格 |
|
| メモリリーク / OOM | メモリ飽和(97%)を特定 | 合格 |
|
| 外部 API の停止 | SendGrid の 503 エラーを特定 | 合格 |
|
| 失敗したデータベースマイグレーション | デプロイ | 合格 |
制限と範囲
小さなテストスイート: この評価スイートには、検証用に作成された 5 つの合成テストケースが含まれています。本番環境を網羅するベンチマークではありません。
ヒューリスティック推論:
diagnose()は単純なルール(例: 最初のエラーから 10 分以内にデプロイが発生したかどうかを確認する)を使用します。実際のインフラストラクチャインシデントはより複雑であることが多く、複数の要因が相互に関与する場合があります。
アーキテクチャ
┌─────────────────────────────────────────────────────────┐
│ CLI / MCP Clients │
│ (devcontext CLI / Claude Desktop / Antigravity) │
└───────────────────────────┬─────────────────────────────┘
│ CLI Args / stdio JSON-RPC
┌───────────────────────────▼─────────────────────────────┐
│ DevContext Entry Point │
│ (cli.py / server.py) │
└───────────────────────────┬─────────────────────────────┘
│
┌───────────────────────────▼─────────────────────────────┐
│ Diagnostic Core (tools.py) │
└───────┬───────────────────┬─────────────────────┬───────┘
│ │ │
┌───────▼───────────┐ ┌─────▼─────────────┐ ┌─────▼─────────────┐
│ Structure Parser │ │ Deployment Engine │ │ Health Observer │
│ (parser.py) │ │ (deploys.json) │ │ (health.json) │
└───────┬───────────┘ └───────────────────┘ └───────────────────┘
│
┌───────┴─────────────────────────────────────────┐
│ Groq API (Optional LLM log extraction) │
└─────────────────────────────────────────────────┘クイックスタートとセットアップ
1. インストール
git clone https://github.com/your-username/devcontext.git
cd devcontext
pip install -e .2. CLI でサービスを診断
devcontext diagnose --service order-processing3. MCP サーバー(Claude Desktop)として登録
DevContext を claude_desktop_config.json に追加します。
{
"mcpServers": {
"devcontext": {
"command": "devcontext",
"args": [
"serve"
]
}
}
}4. 評価スイートを実行
python eval.py5. 任意の API キー設定
実験的な LLM ログ抽出に Groq を使用する場合は、.env.example を .env にコピーしてください。
cp .env.example .env依存関係と要件
Python 3.10+
mcp(Model Context Protocol SDK)groq(オプション、LLM 抽出用)
将来の拡張
プラグイン可能なアダプタ: CloudWatch、Datadog、Grafana Loki、または Prometheus API に直接接続。
確率的信頼度スコア: 単一の決定論的な文字列ではなく、根本原因の確率分布(例:
95% confidence: bad deploy)を出力。自動ロールバック提案: 診断とともに、検証済みの git revert コミットや Kubernetes パッチ仕様を生成。
ライセンス
MIT License の下で配布されています。
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 Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to investigate backend incidents by executing runbooks that gather evidence from observability and storage systems.59MIT
- FlicenseNot gradedqualityBmaintenanceProvides telemetry tools for retrieving recent logs and system metrics to support root-cause analysis of infrastructure incidents. Enables autonomous incident triage with grounded verification and human-in-the-loop remediation.1
- AlicenseNot gradedqualityCmaintenanceExposes service health and log search tools for incident triage, enabling AI agents to investigate and summarize operational issues.MIT
Related MCP Connectors
AI agent run monitoring with incident replay and SLA receipts.
Give your agent live data from Twitter, Reddit, the web and GitHub. No API keys, no scraping stack.
Verified, sourced, real-time intelligence layer for AI agents.
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/sid-stack001/devcontext'
If you have feedback or need assistance with the MCP directory API, please join our Discord server