You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-9Lines changed: 21 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
# Linux Diagnostics MCP Server - Lecture Demo
2
2
3
-
A Python/Linux adaptation of the original `MCPDemo` teaching repository. This repo mirrors the C# demo's public structure and documentation style while staying truthful about current scope: **Milestone 1 parity only** today.
3
+
A Python/Linux adaptation of the original `MCPDemo` teaching repository. This repo now reaches **Milestone 2 parity** for the public teaching flow: compact system inspection plus Linux process listing and drill-down.
4
4
5
5
## What This Demo Shows
6
6
7
7
This is an early **MCP lecture demo** with:
8
-
- ✅ **Tools**: one read-only Linux diagnostics tool, `get_system_info`
8
+
- ✅ **Tools**: read-only Linux diagnostics tools for `get_system_info`, `get_process_list`, `get_process_by_id`, and `get_process_by_name`
9
9
- ✅ **AI Chat Client**: a Python Azure OpenAI client that launches the local stdio server and lets the model call MCP tools
10
10
- ✅ **STDIO transport**
11
11
- ✅ **Python 3.12 implementation** with the official MCP Python SDK
@@ -41,7 +41,8 @@ This script:
41
41
2. Performs the MCP handshake
42
42
3. Discovers tools
43
43
4. Executes `get_system_info`
44
-
5. Verifies the lecture chat client fails safely when Azure OpenAI settings are missing
44
+
5. Exercises the process inspection tools
45
+
6. Verifies the lecture chat client fails safely when Azure OpenAI settings are missing
45
46
46
47
### 3. Test with MCP Inspector
47
48
@@ -53,7 +54,7 @@ mcp dev src/mcp_linux_diag_server/server.py:server --with-editable .
53
54
Then in Inspector:
54
55
1. Connect to the server
55
56
2. Open the **Tools** tab
56
-
3. Select **get_system_info**
57
+
3. Select **get_system_info**, **get_process_list**, **get_process_by_id**, or **get_process_by_name**
57
58
4. Call the tool and inspect the JSON response
58
59
59
60
### 4. Use the Lecture Chat Client
@@ -103,10 +104,18 @@ python3 -m mcp_linux_diag_server.client --prompt "What is the system information
103
104
- Memory summary
104
105
- WSL detection flag
105
106
107
+
### Process Inspection
108
+
-**`get_process_list`** - Returns a lightweight list of running processes with names and PIDs
109
+
-**`get_process_by_id`** - Returns detailed Linux process information for one PID
110
+
-**`get_process_by_name`** - Returns paged detailed process information for a process name
111
+
- Defaults to `page_number=1`
112
+
- Defaults to `page_size=5`
113
+
- Keeps the list-first, detail-second teaching flow from the original demo
114
+
106
115
## Projects
107
116
108
117
### `src/mcp_linux_diag_server/server.py`
109
-
The stdio MCP server exposing the Milestone 1 `get_system_info` tool.
118
+
The stdio MCP server exposing the Milestone 2 diagnostics and process inspection tools.
110
119
111
120
### `src/mcp_linux_diag_server/client.py`
112
121
The lecture chat client that:
@@ -119,11 +128,11 @@ The lecture chat client that:
119
128
120
129
| Method | Visual | Interactive | LLM | Best For |
- Python lecture chat client that launches the server and supports Azure OpenAI tool-calling
28
28
29
-
This is the only milestone currently implemented in this public Python repo.
29
+
Milestone 1 remains the base teaching path and stays fully supported.
30
30
31
-
## Milestone 2 – Process inspection ⏳
31
+
## Milestone 2 – Process inspection ✅
32
32
33
-
Planned scope:
34
-
- list running processes
35
-
- inspect one process by PID
36
-
- keep responses small and lecture-friendly
33
+
Implemented scope:
34
+
- list running processes with lightweight summaries
35
+
- inspect one process by PID with Linux `/proc` detail
36
+
- inspect matching processes by name with default paging (`page_size=5`)
37
+
- keep the summary-first, detail-second teaching flow
37
38
38
39
## Milestone 3 – Resources and prompts ⏳
39
40
@@ -68,4 +69,4 @@ Planned scope:
68
69
69
70
## Important Parity Note
70
71
71
-
This repo intentionally follows the **same milestone progression** as the original C# demo, but it does **not** claim feature parity with the later milestones yet. Public documentation should stay aligned with the real Python implementation state.
72
+
This repo intentionally follows the **same milestone progression** as the original C# demo, but it does **not** claim feature parity with Milestone 3 and later yet. Public documentation should stay aligned with the real Python implementation state.
0 commit comments