pcp-mcp 1.0.1__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/PKG-INFO +23 -5
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/README.md +22 -4
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/pyproject.toml +1 -1
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/models.py +12 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/tools/metrics.py +13 -10
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/AGENTS.md +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/__init__.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/client.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/config.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/context.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/errors.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/icons.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/middleware.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/prompts/__init__.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/py.typed +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/resources/__init__.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/resources/catalog.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/resources/health.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/server.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/tools/AGENTS.md +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/tools/__init__.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/tools/system.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/utils/__init__.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/utils/builders.py +0 -0
- {pcp_mcp-1.0.1 → pcp_mcp-1.0.2}/src/pcp_mcp/utils/extractors.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pcp-mcp
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: MCP server for Performance Co-Pilot
|
|
5
5
|
Keywords: mcp,pcp,performance-co-pilot,monitoring,model-context-protocol
|
|
6
6
|
Author: Major Hayden
|
|
@@ -41,7 +41,22 @@ Query system performance metrics via the Model Context Protocol - CPU, memory, d
|
|
|
41
41
|
[](https://www.python.org/downloads/)
|
|
42
42
|
[](https://opensource.org/licenses/MIT)
|
|
43
43
|
|
|
44
|
-
## 🚀
|
|
44
|
+
## 🚀 Quick Start (No Install)
|
|
45
|
+
|
|
46
|
+
Run immediately with [uvx](https://docs.astral.sh/uv/) — no installation required:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
uvx pcp-mcp
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Or install as a persistent global tool:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
uvx tool install pcp-mcp
|
|
56
|
+
pcp-mcp
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 📦 Installation
|
|
45
60
|
|
|
46
61
|
```bash
|
|
47
62
|
pip install pcp-mcp
|
|
@@ -126,7 +141,8 @@ Add to `~/.config/claude/claude_desktop_config.json`:
|
|
|
126
141
|
{
|
|
127
142
|
"mcpServers": {
|
|
128
143
|
"pcp": {
|
|
129
|
-
"command": "
|
|
144
|
+
"command": "uvx",
|
|
145
|
+
"args": ["pcp-mcp"]
|
|
130
146
|
}
|
|
131
147
|
}
|
|
132
148
|
}
|
|
@@ -138,13 +154,15 @@ For remote monitoring:
|
|
|
138
154
|
{
|
|
139
155
|
"mcpServers": {
|
|
140
156
|
"pcp": {
|
|
141
|
-
"command": "
|
|
142
|
-
"args": ["--target-host", "webserver1.example.com"]
|
|
157
|
+
"command": "uvx",
|
|
158
|
+
"args": ["pcp-mcp", "--target-host", "webserver1.example.com"]
|
|
143
159
|
}
|
|
144
160
|
}
|
|
145
161
|
}
|
|
146
162
|
```
|
|
147
163
|
|
|
164
|
+
> 💡 Using `uvx` means you don't need pcp-mcp installed — it runs directly from PyPI.
|
|
165
|
+
|
|
148
166
|
## 🛠️ Available Tools
|
|
149
167
|
|
|
150
168
|
### System Monitoring
|
|
@@ -12,7 +12,22 @@ Query system performance metrics via the Model Context Protocol - CPU, memory, d
|
|
|
12
12
|
[](https://www.python.org/downloads/)
|
|
13
13
|
[](https://opensource.org/licenses/MIT)
|
|
14
14
|
|
|
15
|
-
## 🚀
|
|
15
|
+
## 🚀 Quick Start (No Install)
|
|
16
|
+
|
|
17
|
+
Run immediately with [uvx](https://docs.astral.sh/uv/) — no installation required:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
uvx pcp-mcp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or install as a persistent global tool:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
uvx tool install pcp-mcp
|
|
27
|
+
pcp-mcp
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 📦 Installation
|
|
16
31
|
|
|
17
32
|
```bash
|
|
18
33
|
pip install pcp-mcp
|
|
@@ -97,7 +112,8 @@ Add to `~/.config/claude/claude_desktop_config.json`:
|
|
|
97
112
|
{
|
|
98
113
|
"mcpServers": {
|
|
99
114
|
"pcp": {
|
|
100
|
-
"command": "
|
|
115
|
+
"command": "uvx",
|
|
116
|
+
"args": ["pcp-mcp"]
|
|
101
117
|
}
|
|
102
118
|
}
|
|
103
119
|
}
|
|
@@ -109,13 +125,15 @@ For remote monitoring:
|
|
|
109
125
|
{
|
|
110
126
|
"mcpServers": {
|
|
111
127
|
"pcp": {
|
|
112
|
-
"command": "
|
|
113
|
-
"args": ["--target-host", "webserver1.example.com"]
|
|
128
|
+
"command": "uvx",
|
|
129
|
+
"args": ["pcp-mcp", "--target-host", "webserver1.example.com"]
|
|
114
130
|
}
|
|
115
131
|
}
|
|
116
132
|
}
|
|
117
133
|
```
|
|
118
134
|
|
|
135
|
+
> 💡 Using `uvx` means you don't need pcp-mcp installed — it runs directly from PyPI.
|
|
136
|
+
|
|
119
137
|
## 🛠️ Available Tools
|
|
120
138
|
|
|
121
139
|
### System Monitoring
|
|
@@ -33,6 +33,18 @@ class MetricSearchResult(BaseModel):
|
|
|
33
33
|
help_text: str | None = Field(default=None, description="Brief description")
|
|
34
34
|
|
|
35
35
|
|
|
36
|
+
class MetricValueList(BaseModel):
|
|
37
|
+
"""Container for a list of metric values (MCP requires object return types)."""
|
|
38
|
+
|
|
39
|
+
metrics: list[MetricValue] = Field(description="List of metric values")
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class MetricSearchResultList(BaseModel):
|
|
43
|
+
"""Container for metric search results (MCP requires object return types)."""
|
|
44
|
+
|
|
45
|
+
results: list[MetricSearchResult] = Field(description="List of matching metrics")
|
|
46
|
+
|
|
47
|
+
|
|
36
48
|
class InstancedMetric(BaseModel):
|
|
37
49
|
"""Metric with per-instance values (e.g., per-CPU, per-disk)."""
|
|
38
50
|
|
|
@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Annotated, Optional
|
|
|
4
4
|
|
|
5
5
|
from fastmcp import Context
|
|
6
6
|
from mcp.types import ToolAnnotations
|
|
7
|
-
from pydantic import Field
|
|
7
|
+
from pydantic import Field
|
|
8
8
|
|
|
9
9
|
from pcp_mcp.context import get_client_for_host
|
|
10
10
|
from pcp_mcp.icons import (
|
|
@@ -14,15 +14,19 @@ from pcp_mcp.icons import (
|
|
|
14
14
|
TAGS_DISCOVERY,
|
|
15
15
|
TAGS_METRICS,
|
|
16
16
|
)
|
|
17
|
-
from pcp_mcp.models import
|
|
17
|
+
from pcp_mcp.models import (
|
|
18
|
+
MetricInfo,
|
|
19
|
+
MetricSearchResult,
|
|
20
|
+
MetricSearchResultList,
|
|
21
|
+
MetricValue,
|
|
22
|
+
MetricValueList,
|
|
23
|
+
)
|
|
18
24
|
from pcp_mcp.utils.extractors import extract_help_text, format_units
|
|
19
25
|
|
|
20
26
|
if TYPE_CHECKING:
|
|
21
27
|
from fastmcp import FastMCP
|
|
22
28
|
|
|
23
29
|
TOOL_ANNOTATIONS = ToolAnnotations(readOnlyHint=True, openWorldHint=True)
|
|
24
|
-
METRIC_VALUE_LIST_SCHEMA = TypeAdapter(list[MetricValue]).json_schema()
|
|
25
|
-
METRIC_SEARCH_LIST_SCHEMA = TypeAdapter(list[MetricSearchResult]).json_schema()
|
|
26
30
|
|
|
27
31
|
|
|
28
32
|
def register_metrics_tools(mcp: "FastMCP") -> None:
|
|
@@ -30,7 +34,6 @@ def register_metrics_tools(mcp: "FastMCP") -> None:
|
|
|
30
34
|
|
|
31
35
|
@mcp.tool(
|
|
32
36
|
annotations=TOOL_ANNOTATIONS,
|
|
33
|
-
output_schema=METRIC_VALUE_LIST_SCHEMA,
|
|
34
37
|
icons=[ICON_METRICS],
|
|
35
38
|
tags=TAGS_METRICS,
|
|
36
39
|
)
|
|
@@ -44,7 +47,7 @@ def register_metrics_tools(mcp: "FastMCP") -> None:
|
|
|
44
47
|
Optional[str],
|
|
45
48
|
Field(description="Target pmcd host to query (default: server's configured target)"),
|
|
46
49
|
] = None,
|
|
47
|
-
) ->
|
|
50
|
+
) -> MetricValueList:
|
|
48
51
|
"""Fetch current values for specific PCP metrics.
|
|
49
52
|
|
|
50
53
|
Returns the current value for each requested metric. For metrics with
|
|
@@ -88,11 +91,10 @@ def register_metrics_tools(mcp: "FastMCP") -> None:
|
|
|
88
91
|
)
|
|
89
92
|
)
|
|
90
93
|
|
|
91
|
-
return results
|
|
94
|
+
return MetricValueList(metrics=results)
|
|
92
95
|
|
|
93
96
|
@mcp.tool(
|
|
94
97
|
annotations=TOOL_ANNOTATIONS,
|
|
95
|
-
output_schema=METRIC_SEARCH_LIST_SCHEMA,
|
|
96
98
|
icons=[ICON_SEARCH],
|
|
97
99
|
tags=TAGS_METRICS | TAGS_DISCOVERY,
|
|
98
100
|
)
|
|
@@ -106,7 +108,7 @@ def register_metrics_tools(mcp: "FastMCP") -> None:
|
|
|
106
108
|
Optional[str],
|
|
107
109
|
Field(description="Target pmcd host to query (default: server's configured target)"),
|
|
108
110
|
] = None,
|
|
109
|
-
) ->
|
|
111
|
+
) -> MetricSearchResultList:
|
|
110
112
|
"""Find PCP metrics matching a name pattern.
|
|
111
113
|
|
|
112
114
|
Use this to discover available metrics before querying them.
|
|
@@ -127,13 +129,14 @@ def register_metrics_tools(mcp: "FastMCP") -> None:
|
|
|
127
129
|
except Exception as e:
|
|
128
130
|
raise handle_pcp_error(e, "searching metrics") from e
|
|
129
131
|
|
|
130
|
-
|
|
132
|
+
results = [
|
|
131
133
|
MetricSearchResult(
|
|
132
134
|
name=m.get("name", ""),
|
|
133
135
|
help_text=extract_help_text(m),
|
|
134
136
|
)
|
|
135
137
|
for m in metrics
|
|
136
138
|
]
|
|
139
|
+
return MetricSearchResultList(results=results)
|
|
137
140
|
|
|
138
141
|
@mcp.tool(
|
|
139
142
|
annotations=TOOL_ANNOTATIONS,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|