machine-maintenance-agent
Machine Maintenance Agent: MCP Interview Project
これは、エージェントがMCPツールを使って産業機械のデータを点検し、保守ガイダンスを検索し、エスカレーションが必要なときに保守チケットを作成する方法を示す、面接でそのまま使える小さなプロジェクトです。
シナリオ例:
「機械 P-204 の振動が異常です。どうすればよいですか?」
エージェントは機械のステータスを確認し、最近のセンサー異常を調べ、保守マニュアルのデータセットを検索し、必要に応じてチケットを作成します。
なぜこれが良いMCPの例なのか
MCPがここで役立つのは、エージェントがデータベースやファイルに直接アクセスする必要がないためです。その代わりに、制御されたツールインターフェースを受け取ります。
get_machine_status_tool(machine_id)get_recent_sensor_anomalies_tool(machine_id, hours)search_maintenance_manual_tool(query, limit)create_maintenance_ticket_tool(machine_id, severity, summary, recommended_action)list_open_tickets_tool(machine_id)
これにより、読み取り専用のデータアクセス、安全な書き込みアクセス、ツールの境界、マルチステップのエージェント動作を、ひとつの小さなプロジェクトで説明できます。
Related MCP server: Equipment Health MCP Server
プロジェクト構成
machine-maintenance-agent/
data/
machines.json # Machine metadata and normal operating ranges
machine_status.json # Current synthetic sensor readings
anomalies.json # Recent detected anomalies
maintenance_manual.json # Small troubleshooting knowledge base
tickets.json # Simple local ticket store
src/
maintenance_tools.py # Core tool logic
mcp_server.py # MCP server exposing tools
agent_demo.py # Transparent agent flow demo
tests/
test_maintenance_tools.py
AGENT_FLOW.md
TOOL_CONTRACTS.md
requirements.txt
README.mdセットアップ
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtMCPの依存関係は、現在の安定版Python SDK v1系に固定されています: mcp[cli]>=1.27,<2。
デモエージェントを実行する
このフォルダから:
python src/agent_demo.pyデモ中にチケットを作成するには:
python src/agent_demo.py --create-ticket期待される動作:
P-204のステータスを読み取る。通常範囲外の振動と温度を検出する。
高重要度の振動異常を検出する。
保守マニュアルからポンプ振動のガイダンスを検索する。
負荷を軽減し、ベアリング/カップリング部を点検することを推奨する。
--create-ticketが指定された場合のみチケットを作成する。
MCPサーバーを実行する
python src/mcp_server.pyこれによりstdio MCPサーバーが起動します。MCPクライアントは接続して、公開されたツールを呼び出すことができます。
MCPクライアント設定の構成例:
{
"mcpServers": {
"machine-maintenance-agent": {
"command": "python",
"args": ["src/mcp_server.py"],
"cwd": "/absolute/path/to/machine-maintenance-agent"
}
}
}テストを実行する
python -m unittest discover -s tests面接での説明
この短い説明を使ってください:
「私は、合成された保守システムを取り巻くMCPサーバーを構築しました。エージェントはファイルやデータベースを自由に操作することはできません。手にするのは、機械のステータスの読み取り、異常の読み取り、マニュアルと保守ガイドの検索、保守チケットの作成という、少数のツールだけです。P-204の振動に関する問い合わせがあると、エージェントは現地のステータスを確認し、しきい値を超える振動を確認し、最近の高重要度の異常を見つけ、関連するマニュアルを引き出し、チケットを作成してエスカレーションします。これは、制御されたエンタープライズアクセス、ツールベースの推論、LLMと運用システムとの安全な境界を示しています。」
さらに構造化された手順については、AGENT_FLOW.md と TOOL_CONTRACTS.md を参照してください。
このプロジェクトが使用するデータ
機械メタデータ: ID、名前、エリア、重要度、通常の動作範囲。
機械ステータス: 現在の振動、温度、圧力、状態、最終サービス日。
センサー異常: タイムスタンプ、シグナル、値、しきい値、重要度、説明。
保守マニュアル: 症状、キーワード、推奨アクション、安全上の注意事項。
チケットストア: チケットID、機械ID、重要度、概要、推奨アクション、ステータス。
拡張の仕方
ポートフォリオ版を作るための、小さな改良アイデア:
ツールを動的に選択する本物のLLMクライアントを追加する。
JSONファイルの代わりにSQLiteを追加する。
ロールベースの権限を追加する。例: 読み取り専用のオペレータ権限と、チケット作成可能なスーパーバイザ権限。
機械のステータスと未解決チケットを表示するシンプルなダッシュボードを追加する。
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 gradedqualityAmaintenanceEnables AI agents to manage system updates, application installations, and remote host orchestration through MCP tools.3MIT
- FlicenseNot gradedqualityBmaintenanceAn AI agent system that monitors manufacturing equipment health using the Model Context Protocol (MCP). Enables answering natural language questions about equipment status, maintenance, and anomalies through MCP tools.
- AlicenseNot gradedqualityDmaintenanceEnables AI-powered customer support with real-time access to CRM, ticketing, and communication tools via MCP, supporting context-aware conversations and automated actions.Apache 2.0
- FlicenseNot gradedqualityBmaintenanceEnables AI assistants to analyze IT support tickets, categorize urgency, suggest responses, and retrieve statistics via MCP tools.
Related MCP Connectors
Paid remote MCP for agent code search routing MCP, structured receipts, audit logs, and reviewer-rea
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
100+ MCP tools for AI agents: content metadata, trade intelligence, business-expertise analysis.
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/deodatta1234/machine-maintenance-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server