zerostack-mcp 0.9.9__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.
- zerostack_mcp-0.9.9/.dockerignore +18 -0
- zerostack_mcp-0.9.9/.github/workflows/ci.yml +42 -0
- zerostack_mcp-0.9.9/.github/workflows/python-publish.yml +57 -0
- zerostack_mcp-0.9.9/.gitignore +30 -0
- zerostack_mcp-0.9.9/Dockerfile +36 -0
- zerostack_mcp-0.9.9/LICENSE +202 -0
- zerostack_mcp-0.9.9/NOTICE +4 -0
- zerostack_mcp-0.9.9/PKG-INFO +154 -0
- zerostack_mcp-0.9.9/README.md +123 -0
- zerostack_mcp-0.9.9/SAMPLE_LOGS.md +50 -0
- zerostack_mcp-0.9.9/glama.json +6 -0
- zerostack_mcp-0.9.9/llms.txt +28 -0
- zerostack_mcp-0.9.9/pyproject.toml +85 -0
- zerostack_mcp-0.9.9/server.json +23 -0
- zerostack_mcp-0.9.9/smithery.yaml +9 -0
- zerostack_mcp-0.9.9/src/zerostack_mcp/__init__.py +54 -0
- zerostack_mcp-0.9.9/src/zerostack_mcp/benchmarks.py +528 -0
- zerostack_mcp-0.9.9/src/zerostack_mcp/capacity.py +226 -0
- zerostack_mcp-0.9.9/src/zerostack_mcp/catalog.py +166 -0
- zerostack_mcp-0.9.9/src/zerostack_mcp/data/__init__.py +4 -0
- zerostack_mcp-0.9.9/src/zerostack_mcp/data/diagnosticsCatalog.json +533 -0
- zerostack_mcp-0.9.9/src/zerostack_mcp/log_analyzer.py +754 -0
- zerostack_mcp-0.9.9/src/zerostack_mcp/models.py +302 -0
- zerostack_mcp-0.9.9/src/zerostack_mcp/py.typed +1 -0
- zerostack_mcp-0.9.9/src/zerostack_mcp/registers.py +437 -0
- zerostack_mcp-0.9.9/src/zerostack_mcp/server.py +276 -0
- zerostack_mcp-0.9.9/tests/schemas/server_2025_12_11.schema.json +575 -0
- zerostack_mcp-0.9.9/tests/test_mcp_tools.py +917 -0
- zerostack_mcp-0.9.9/uv.lock +1081 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
lint-and-test:
|
|
13
|
+
name: Lint, Typecheck & Test (Python ${{ matrix.python-version }})
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
python-version: ["3.12", "3.13", "3.14"]
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Install uv
|
|
24
|
+
uses: astral-sh/setup-uv@v5
|
|
25
|
+
|
|
26
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
27
|
+
run: uv python install ${{ matrix.python-version }}
|
|
28
|
+
|
|
29
|
+
- name: Sync dependencies
|
|
30
|
+
run: uv sync --python ${{ matrix.python-version }}
|
|
31
|
+
|
|
32
|
+
- name: Run ruff
|
|
33
|
+
run: |
|
|
34
|
+
uv run ruff check src/ tests/
|
|
35
|
+
uv run ruff format --check src/ tests/
|
|
36
|
+
|
|
37
|
+
- name: Run mypy
|
|
38
|
+
run: uv run mypy src/ tests/
|
|
39
|
+
|
|
40
|
+
- name: Run pytest
|
|
41
|
+
run: uv run pytest -v
|
|
42
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Upload Python Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build-dist:
|
|
12
|
+
name: Build distribution 📦
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: '>=3.12'
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
pip install build
|
|
27
|
+
|
|
28
|
+
- name: Build package
|
|
29
|
+
run: python -m build
|
|
30
|
+
|
|
31
|
+
- name: upload release dist
|
|
32
|
+
uses: actions/upload-artifact@v4
|
|
33
|
+
with:
|
|
34
|
+
name: release-dists
|
|
35
|
+
path: dist/
|
|
36
|
+
|
|
37
|
+
pypi-publish:
|
|
38
|
+
name: Publish package to PyPi
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
environment:
|
|
41
|
+
name: pypi
|
|
42
|
+
url: https://pypi.org/p/zerostack-mcp
|
|
43
|
+
needs:
|
|
44
|
+
- build-dist
|
|
45
|
+
permissions:
|
|
46
|
+
id-token: write
|
|
47
|
+
|
|
48
|
+
steps:
|
|
49
|
+
- name: Retrieve release distributions
|
|
50
|
+
uses: actions/download-artifact@v4
|
|
51
|
+
with:
|
|
52
|
+
name: release-dists
|
|
53
|
+
path: dist/
|
|
54
|
+
|
|
55
|
+
- name: Publish package
|
|
56
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
57
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
*.out
|
|
3
|
+
*.elf
|
|
4
|
+
*.hex
|
|
5
|
+
*.bin
|
|
6
|
+
*.map
|
|
7
|
+
*.a
|
|
8
|
+
*.so
|
|
9
|
+
*.dylib
|
|
10
|
+
*.o
|
|
11
|
+
*.d
|
|
12
|
+
*.syscfg
|
|
13
|
+
*.slcp
|
|
14
|
+
*.pcap
|
|
15
|
+
*.pcapng
|
|
16
|
+
*.sal
|
|
17
|
+
.env
|
|
18
|
+
.env.*
|
|
19
|
+
*.pem
|
|
20
|
+
*.key
|
|
21
|
+
|
|
22
|
+
__pycache__/
|
|
23
|
+
*.py[cod]
|
|
24
|
+
.venv/
|
|
25
|
+
dist/
|
|
26
|
+
build/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
.pytest_cache/
|
|
29
|
+
.ruff_cache/
|
|
30
|
+
.mypy_cache/
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
FROM ghcr.io/astral-sh/uv:python3.13-trixie-slim AS builder
|
|
2
|
+
|
|
3
|
+
ENV UV_COMPILE_BYTECODE=1 \
|
|
4
|
+
UV_LINK_MODE=copy \
|
|
5
|
+
UV_PYTHON_DOWNLOADS=never
|
|
6
|
+
|
|
7
|
+
WORKDIR /app
|
|
8
|
+
COPY pyproject.toml uv.lock ./
|
|
9
|
+
RUN uv sync --locked --no-dev --no-install-project
|
|
10
|
+
|
|
11
|
+
COPY README.md LICENSE NOTICE ./
|
|
12
|
+
COPY src ./src
|
|
13
|
+
RUN uv sync --locked --no-dev --no-editable
|
|
14
|
+
|
|
15
|
+
FROM python:3.13-slim-trixie AS runtime
|
|
16
|
+
|
|
17
|
+
LABEL io.modelcontextprotocol.server.name="io.github.zerostack-rf/zerostack-mcp" \
|
|
18
|
+
org.opencontainers.image.title="zerostack-mcp" \
|
|
19
|
+
org.opencontainers.image.description="SMLIGHT ZeroStack RF Diagnostics & Benchmark MCP Server" \
|
|
20
|
+
org.opencontainers.image.url="https://smlight.tech/software/zerostack" \
|
|
21
|
+
org.opencontainers.image.source="https://github.com/zerostack-rf/zerostack-mcp" \
|
|
22
|
+
org.opencontainers.image.licenses="Apache-2.0"
|
|
23
|
+
|
|
24
|
+
RUN groupadd -g 10001 mcpuser \
|
|
25
|
+
&& useradd -u 10001 -g mcpuser -d /var/lib/mcpuser -s /usr/sbin/nologin mcpuser \
|
|
26
|
+
&& install -d -o mcpuser -g mcpuser -m 0700 /var/lib/mcpuser
|
|
27
|
+
|
|
28
|
+
WORKDIR /app
|
|
29
|
+
COPY --from=builder --chown=10001:10001 /app/.venv /app/.venv
|
|
30
|
+
|
|
31
|
+
ENV PATH="/app/.venv/bin:$PATH" \
|
|
32
|
+
PYTHONUNBUFFERED=1 \
|
|
33
|
+
PYTHONDONTWRITEBYTECODE=1
|
|
34
|
+
|
|
35
|
+
USER 10001:10001
|
|
36
|
+
CMD ["zerostack-mcp"]
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: zerostack-mcp
|
|
3
|
+
Version: 0.9.9
|
|
4
|
+
Summary: MCP server for diagnosing Zigbee, Thread, and IEEE 802.15.4 logs, decoding TI SimpleLink F2 and Silicon Labs EFR32 registers, and querying SMLIGHT ZeroStack benchmarks.
|
|
5
|
+
Project-URL: Homepage, https://smlight.tech/software/zerostack
|
|
6
|
+
Project-URL: Documentation, https://github.com/smlight-tech/zerostack
|
|
7
|
+
Project-URL: WebAnalyzer, https://smlight.tech.github.io/zerostack/
|
|
8
|
+
Project-URL: Repository, https://github.com/zerostack-rf/zerostack-mcp
|
|
9
|
+
Project-URL: Issues, https://github.com/zerostack-rf/zerostack-mcp/issues
|
|
10
|
+
Author-email: ZeroStack RF Engineering <engineering@smlight.tech>
|
|
11
|
+
License-Expression: Apache-2.0
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
License-File: NOTICE
|
|
14
|
+
Keywords: cc1352,cc2652,cc2674,ieee-802-15-4,mcp,model-context-protocol,openthread,slzb-06,smlight,zerostack,zha,zigbee,zigbee2mqtt
|
|
15
|
+
Classifier: Development Status :: 4 - Beta
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Intended Audience :: System Administrators
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Home Automation
|
|
23
|
+
Classifier: Topic :: System :: Hardware
|
|
24
|
+
Classifier: Topic :: System :: Networking :: Monitoring
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.12
|
|
27
|
+
Requires-Dist: mcp<3.0.0,>=2.0.0
|
|
28
|
+
Requires-Dist: pydantic>=2.7.0
|
|
29
|
+
Requires-Dist: uvicorn>=0.30.0
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
<a href="https://smlight.tech/software/zerostack">
|
|
34
|
+
<img src="https://raw.githubusercontent.com/smlight-tech/zerostack/main/docs/assets/zerostack-hero-banner.png" alt="SMLIGHT ZeroStack — Deterministic Zigbee 3.0 Firmware & RF Diagnostics" width="800">
|
|
35
|
+
</a>
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
# ZeroStack RF Diagnostics & Benchmark MCP Server (`zerostack-mcp`)
|
|
39
|
+
|
|
40
|
+
<!-- mcp-name: io.github.zerostack-rf/zerostack-mcp -->
|
|
41
|
+
|
|
42
|
+
> **Official ZeroStack Overview & Downloads**: [https://smlight.tech/software/zerostack](https://smlight.tech/software/zerostack)
|
|
43
|
+
> **Interactive Web Log Analyzer**: [https://smlight-tech.github.io/zerostack/](https://smlight-tech.github.io/zerostack/)
|
|
44
|
+
> **Technical Whitepaper — Part 1 (PDF)**: [Scaling Zigbee 3.0 / R23 Beyond the 100-Node Wall](https://smlight-tech.github.io/zerostack/whitepapers/zerostack-whitepaper-part-1.pdf)
|
|
45
|
+
> **MCP Server**: `v0.9.9` | **Target Firmware**: ZeroStack Release Zero (`0.9.9-beta.1`)
|
|
46
|
+
|
|
47
|
+
`zerostack-mcp` is an open-source **Model Context Protocol (MCP)** server that gives AI coding assistants and home-automation troubleshooting agents (Claude Desktop, Cursor, Windsurf, Cline, OpenAI Agents, Home Assistant AI agents) deterministic tools to:
|
|
48
|
+
|
|
49
|
+
1. **Diagnose Zigbee2MQTT (`z2m`), Home Assistant ZHA (`zigpy-znp`, `bellows`), and OpenThread RCP logs** (`analyze_zigbee_thread_log`).
|
|
50
|
+
2. **Decode hardware radio/UART status registers** (`decode_silicon_register`) for TI SimpleLink F2 (`CC2652P`, `CC2652P7`, `CC1352P7`, `CC2674P10`) and Silicon Labs EFR32 (`EFR32MG21`, `EFR32MG24`).
|
|
51
|
+
3. **Evaluate Zigbee/Thread mesh coordinator capacity and `SRCMATCH` hardware limits** (`check_coordinator_capacity`).
|
|
52
|
+
4. **Query verified hardware validation benchmarks (`DWT->CYCCNT` @ `48.0 MHz`)** (`get_zerostack_benchmarks`) comparing **ZeroStack Release Zero (`0.9.9-beta.1`)** against legacy TI Z-Stack (`ZNP 3.x`) across SMLIGHT `SLZB-06` and `SLZB-07` series coordinators.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Quick Start
|
|
57
|
+
|
|
58
|
+
### Run with `uvx` (No Installation Required)
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcpServers": {
|
|
63
|
+
"zerostack-rf": {
|
|
64
|
+
"command": "uvx",
|
|
65
|
+
"args": ["zerostack-mcp"]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Local Development Installation
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
git clone https://github.com/zerostack-rf/zerostack-mcp.git
|
|
75
|
+
cd zerostack-rf-mcp
|
|
76
|
+
uv sync
|
|
77
|
+
uv run pytest
|
|
78
|
+
uv run zerostack-mcp
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Supported Hardware — Release Zero (`0.9.9-beta.1`)
|
|
84
|
+
|
|
85
|
+
ZeroStack **Release Zero (`0.9.9-beta.1`)** supports the **TI SimpleLink F2** family across SMLIGHT `SLZB-06` and `SLZB-07` series coordinators (**Zigbee 3.0 / PRO R23 Coordinator & Router** firmware with DMA-driven UART and **Live Auto-Baud `115200` / `460800` / `1000000`**):
|
|
86
|
+
|
|
87
|
+
| Coordinator Model | Radio SoC | SRAM / Flash | Hardware RTS/CTS | Transport |
|
|
88
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
89
|
+
| **`SLZB-06`** | `TI CC2652P` | `88 KB` / `352 KB` | No | Ethernet / PoE / USB / Wi-Fi |
|
|
90
|
+
| **`SLZB-06U`** | `TI CC2652P` | `88 KB` / `352 KB` | Yes (`DIO10` / `DIO11`) | Ethernet / PoE / USB / Wi-Fi |
|
|
91
|
+
| **`SLZB-06P7`** / **`SLZB-06P7v1`** | `TI CC2652P7` / `CC1352P7` | `144 KB` / `704 KB` | No | Ethernet / PoE / USB / Wi-Fi |
|
|
92
|
+
| **`SLZB-06P7U`** | `TI CC2652P7` / `CC1352P7` | `144 KB` / `704 KB` | Yes (`DIO10` / `DIO11`) | Ethernet / PoE / USB / Wi-Fi |
|
|
93
|
+
| **`SLZB-07P7`** | `TI CC2652P7` | `144 KB` / `704 KB` | No | USB Dongle |
|
|
94
|
+
| **`SLZB-06P10`** | `TI CC2674P10` | `256 KB` / `1024 KB` | Yes (`DIO10` / `DIO11`) | Ethernet / PoE / USB / Wi-Fi |
|
|
95
|
+
| **`SLZB-07P10`** | `TI CC2674P10` | `256 KB` / `1024 KB` | No | USB Dongle |
|
|
96
|
+
|
|
97
|
+
> **Note on Silicon Labs EFR32 (`EFR32MG21` / `EFR32MG24`)**: `zerostack-mcp` includes diagnostic rules (`0x72`, `0xa1`, `ASH_NCP_FATAL_ERROR`) and `EUSART0_IF` register decoding for Silicon Labs EmberZNet / EZSP coordinators (`SLZB-06M`, `SLZB-06Mg24`, SkyConnect/ZBT-1). ZeroStack **Release Zero (`0.9.9-beta.1`)** ships on SMLIGHT TI SimpleLink F2 coordinators; Silicon Labs EFR32 support is in active development.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Verified Hardware Validation Benchmarks (`TI CC1352P7` @ `48.0 MHz`, `DWT->CYCCNT`)
|
|
102
|
+
|
|
103
|
+
### Part 1: Deterministic Execution Latency (`1 µs = 48 cycles`)
|
|
104
|
+
|
|
105
|
+
| Subsystem / Operation | Legacy TI Z-Stack (`ZNP 3.x`) | ZeroStack `Release Zero (0.9.9-beta.1)` | Measured Improvement |
|
|
106
|
+
| :--- | :--- | :--- | :--- |
|
|
107
|
+
| **TCLK Lookup (300-entry table, miss / first contact)** | `1,486,228` cyc (`30.96 ms`) | **`326` cyc (`6.8 µs`)** | **4,559× faster** (`0` flash reads) |
|
|
108
|
+
| **TCLK Lookup (300-entry table, oldest-record hit, age 383)** | `620,396` cyc (`12.92 ms`) | **`324` cyc (`6.75 µs`)** | **1,915× faster** (`Slot 0`: **7.1×**, `Slot 299`: **9.1×**) |
|
|
109
|
+
| **Per-Frame NWK Encrypt (`D=150`)** | `533,156` cyc (`11.11 ms`) | **`3,968` cyc (`82.7 µs`)** | **134.4× faster** (O(1), `0` flash reads) |
|
|
110
|
+
| **Per-Frame NWK Decrypt (`D=150`)** | `532,182` cyc (`11.09 ms`) | **`3,824` cyc (`79.7 µs`)** | **139.2× faster** (O(1), `0` flash reads) |
|
|
111
|
+
| **Routed Hop Security Ceiling (`D=150`, Decrypt + Encrypt)** | `22.19 ms` (`~45 pkt/s` ceiling) | **`162 µs` (`7,792` cyc, `>6,100 pkt/s`)** | **135× higher ceiling** |
|
|
112
|
+
| **Per-Frame APS TX Security (300-peer table, `D=0..100`)** | `52,909–409,301` cyc (`8.53 ms`) | **`5,410–5,424` cyc (`113 µs`)** | **Up to 75.5× faster** |
|
|
113
|
+
| **Device Authentication Check (`Slot 0 -> 299`)** | `1,656 -> 42,243` cyc (`880 µs`) | **`181 -> 179` cyc (`3.7 µs`)** | **236× faster** |
|
|
114
|
+
| **NVM Stack Key Read (`D = 0 -> 150`)** | `2,347 -> 64,817` cyc (`1.35 ms`) | **`302–303` cyc (`6.3 µs`)** | **213.9× faster** |
|
|
115
|
+
| **Idempotent NVM State Write (Unchanged `100 B`, 48 writes)** | `100,714` cyc (writes flash 48/48) | **`3,770` cyc (`0 B` flash 48/48)** | **26.7× faster + 0% flash wear** |
|
|
116
|
+
| **NVM Compaction Frequency** | Write **#69** (`163.9 ms` stall) | Write **#1,013** (`13.7 ms` stall) | **14.7× lower compaction frequency** |
|
|
117
|
+
| **Dynamic Memory Allocation (`malloc` @ `k=64` holes)** | `2,550` cyc | **`218` cyc (O(1) constant time)** | **11.7× faster** |
|
|
118
|
+
| **Timer Start Latency (`T=39` timers, 64 heap holes)** | `10,034` cyc (`209.0 µs`) | **`1,448` cyc (`30.2 µs`, heap-independent)** | **6.9× faster** |
|
|
119
|
+
| **Inter-Task Event Enqueue (`msgSend`, `Q=64` queued)** | `935` cyc | **`322` cyc (O(1) flat)** | **2.9× faster** |
|
|
120
|
+
| **Host Serial Round-Trip (`SYS_PING` @ `115,200` baud)** | `9,790` cyc (reply: `4,921` cyc) | **`4,618` cyc (reply: `816` cyc)** | **53% fewer total / 83% fewer reply** |
|
|
121
|
+
|
|
122
|
+
### Part 2: Adversarial Resilience & Fault Recovery
|
|
123
|
+
|
|
124
|
+
| Stress Vector | Legacy TI Z-Stack (`ZNP 3.x`) | ZeroStack `Release Zero (0.9.9-beta.1)` | Measured Improvement |
|
|
125
|
+
| :--- | :--- | :--- | :--- |
|
|
126
|
+
| **Malformed Secured OTA Frames (12 NWK/APS classes + 3,255 MAC vectors)** | **Remote CPU `HardFault`** (`Precise BusFault` after `143,345–144,412` cyc) | **`0` crashes (`320–6,631` cyc; `790` cyc / `16 µs` routing reject)** | **Zero remote crash + 9.8×–402× lower CPU** |
|
|
127
|
+
| **1,000-Frame Cryptographic Replay Flood (`D=150`)** | `143,802` cyc (`3.0 ms`)/replay (**`2.99 s` lockup**) | **`1,550` cyc (`32 µs`)/replay (`32.4 ms` total)** | **92.8× faster** (`30×` faster auth tamper reject) |
|
|
128
|
+
| **NOR Flash Brownout Fuzzing (`22,959` HW cuts + `2M` shadow ops)** | `1` verify conflict; torn-record reboot writes **`20,232 B` (`62` erases)** | **`0` corrupted records; torn reboot writes `27 B` (`0` erases)** | **749× lower post-brownout flash write volume** |
|
|
129
|
+
| **Hostile UART Framing Abuse (`115,200` baud, 6 scenarios)** | **`8.84 s` serial link blackout** (`44` lost pings on `300 × SOF`) | **`0` lost pings (`3–55 ms` wire-speed recovery, Δheap = 0 B)** | **Zero blackout** (`29 ms` on `300 × SOF`, `3 ms` truncated) |
|
|
130
|
+
| **50-Device Unauthenticated Join / TCLK Miss Flood (`D=300`)** | `33.9 ms`/miss (**`1.70 s` total stall**) | **`4 µs` (`208` cyc; `4.3 ms` UART RTT, `0.22 s` total)** | **7.7× faster end-to-end** |
|
|
131
|
+
| **1,000-Frame 50-Router Echo Amplification Storm (`D=150`)** | `143,865` cyc (`3.00 ms`)/echo (**`3.00 s` total CPU**) | **`7,076` cyc (`147 µs` p50, `151.16 ms` total CPU)** | **19.9× lower total CPU (20.3× faster/echo)** |
|
|
132
|
+
| **64-Frame Post-Outage Unique Broadcast Flood (`D=150`)** | Admits `30 / 64`, `200.25 ms` total, `3.01 ms` shed | **Admits `40 / 64` (`+33%` BTT), `18.87 ms` total, `174 µs` shed** | **10.6× lower CPU time (17.3× faster shed)** |
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## MCP Tools, Resources & Prompts
|
|
137
|
+
|
|
138
|
+
### Tools
|
|
139
|
+
All tools include read-only, idempotent `ToolAnnotations` (`readOnlyHint=True`, `idempotentHint=True`, `destructiveHint=False`, `openWorldHint=False`):
|
|
140
|
+
- **`analyze_zigbee_thread_log(log_text)`**: Matches raw Z2M/ZHA/OpenThread logs against 16+ error signatures (including decimal Z2M MAC codes `225`/`233`/`240`/`241`, `0x10`, `0x11`, `0xC7`, `0xCD`, `0xA7`/`0xAD`, `6000ms` SRSP, and multi-line ZCL MQTT delta-zero telemetry floods).
|
|
141
|
+
- **`decode_silicon_register(chip, register_or_addr, hex_value)`**: Decodes TI SimpleLink F2 (`CMD_IEEE_RX`, `CMD_IEEE_CSMA`, `RFC_DBELL`, `RFC_RAM:SRCMATCH`, `VIMS`, `PRCM`) and Silicon Labs EFR32 (`EUSART0_IF`).
|
|
142
|
+
- **`check_coordinator_capacity(device_count, sleepy_zed_count, chip_family)`**: Evaluates TI SimpleLink F2 32-slot `SRCMATCH` hardware table utilization, indirect queue quota isolation (`50%` pool cap, max `2` frames/child), zero flash-read stalls during sleepy poll windows, and SRAM heap headroom.
|
|
143
|
+
- **`get_zerostack_benchmarks(platform)`**: Returns Part 1 and Part 2 hardware validation benchmarks for `SLZB-06`, `SLZB-06U`, `SLZB-06P7`, `SLZB-06P7U`, `SLZB-06P7V1`, `SLZB-07P7`, `SLZB-06P10`, `SLZB-07P10`, or `"all"`.
|
|
144
|
+
|
|
145
|
+
### Resources & Prompts
|
|
146
|
+
- `zerostack://benchmarks/summary` — Complete Part 1 & Part 2 `DWT->CYCCNT` benchmark dataset.
|
|
147
|
+
- `zerostack://hardware/supported-models` — Supported TI SimpleLink F2 hardware matrix for Release Zero (`0.9.9-beta.1`).
|
|
148
|
+
- `zerostack://diagnostics/catalog` — Full machine-readable ZeroStack diagnostics catalog.
|
|
149
|
+
- Prompt `diagnose_zigbee_log(log_text)` — Structured troubleshooting workflow for Zigbee2MQTT / ZHA logs.
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
Apache License 2.0 (`Apache-2.0`) — Copyright (c) 2026 SMLIGHT / ZeroStack RF Engineering.
|
|
154
|
+
Learn more at [https://smlight.tech/software/zerostack](https://smlight.tech/software/zerostack).
|