CVE-info-MCP 0.1.0__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.
- cve_info_mcp-0.1.0/.github/workflows/check.yml +22 -0
- cve_info_mcp-0.1.0/.github/workflows/data.yml +45 -0
- cve_info_mcp-0.1.0/.github/workflows/publish.yml +64 -0
- cve_info_mcp-0.1.0/.gitignore +222 -0
- cve_info_mcp-0.1.0/LICENSE +21 -0
- cve_info_mcp-0.1.0/PKG-INFO +111 -0
- cve_info_mcp-0.1.0/README.md +95 -0
- cve_info_mcp-0.1.0/alias/README.md +16 -0
- cve_info_mcp-0.1.0/alias/pyproject.toml +23 -0
- cve_info_mcp-0.1.0/alias/src/cve_info_alias/__init__.py +2 -0
- cve_info_mcp-0.1.0/pyproject.toml +35 -0
- cve_info_mcp-0.1.0/scripts/check_release.py +45 -0
- cve_info_mcp-0.1.0/scripts/export_data.py +30 -0
- cve_info_mcp-0.1.0/src/cve_info_mcp/__init__.py +3 -0
- cve_info_mcp-0.1.0/src/cve_info_mcp/__main__.py +4 -0
- cve_info_mcp-0.1.0/src/cve_info_mcp/cli.py +63 -0
- cve_info_mcp-0.1.0/src/cve_info_mcp/content.py +71 -0
- cve_info_mcp-0.1.0/src/cve_info_mcp/dataset.py +86 -0
- cve_info_mcp-0.1.0/src/cve_info_mcp/install.py +70 -0
- cve_info_mcp-0.1.0/src/cve_info_mcp/network.py +46 -0
- cve_info_mcp-0.1.0/src/cve_info_mcp/server.py +46 -0
- cve_info_mcp-0.1.0/src/cve_info_mcp/store.py +186 -0
- cve_info_mcp-0.1.0/tests/test_mcp.py +176 -0
- cve_info_mcp-0.1.0/uv.lock +1354 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Check packages
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
jobs:
|
|
6
|
+
test:
|
|
7
|
+
strategy:
|
|
8
|
+
matrix:
|
|
9
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
10
|
+
python: ['3.11', '3.13']
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: astral-sh/setup-uv@v6
|
|
15
|
+
with:
|
|
16
|
+
python-version: ${{ matrix.python }}
|
|
17
|
+
- run: uv sync --locked
|
|
18
|
+
- run: uv run pytest
|
|
19
|
+
- run: uv build --out-dir dist/primary
|
|
20
|
+
- run: uv build alias --out-dir dist/alias
|
|
21
|
+
- run: uv run python scripts/check_release.py
|
|
22
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Publish MCP data
|
|
2
|
+
on:
|
|
3
|
+
schedule:
|
|
4
|
+
- cron: '37 * * * *'
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
paths:
|
|
9
|
+
- 'src/**'
|
|
10
|
+
- 'scripts/export_data.py'
|
|
11
|
+
- 'pyproject.toml'
|
|
12
|
+
- 'uv.lock'
|
|
13
|
+
- '.github/workflows/data.yml'
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
pages: write
|
|
17
|
+
id-token: write
|
|
18
|
+
concurrency:
|
|
19
|
+
group: github-pages
|
|
20
|
+
cancel-in-progress: false
|
|
21
|
+
jobs:
|
|
22
|
+
build:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
timeout-minutes: 15
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
- uses: astral-sh/setup-uv@v6
|
|
28
|
+
with:
|
|
29
|
+
python-version: '3.12'
|
|
30
|
+
- run: uv sync --locked
|
|
31
|
+
- run: uv run pytest
|
|
32
|
+
- run: uv run python scripts/export_data.py
|
|
33
|
+
- uses: actions/configure-pages@v5
|
|
34
|
+
- uses: actions/upload-pages-artifact@v4
|
|
35
|
+
with:
|
|
36
|
+
path: _site
|
|
37
|
+
deploy:
|
|
38
|
+
needs: build
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
environment:
|
|
41
|
+
name: github-pages
|
|
42
|
+
url: ${{ steps.deploy.outputs.page_url }}
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/deploy-pages@v4
|
|
45
|
+
id: deploy
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [published]
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
concurrency:
|
|
9
|
+
group: pypi-publish
|
|
10
|
+
cancel-in-progress: false
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
- uses: astral-sh/setup-uv@v6
|
|
19
|
+
with:
|
|
20
|
+
python-version: '3.11'
|
|
21
|
+
- run: uv sync --locked
|
|
22
|
+
- run: uv run pytest
|
|
23
|
+
- run: uv build --out-dir dist/primary
|
|
24
|
+
- run: uv build alias --out-dir dist/alias
|
|
25
|
+
- run: uv run python scripts/check_release.py --release
|
|
26
|
+
- run: uv run twine check dist/primary/* dist/alias/*
|
|
27
|
+
- uses: actions/upload-artifact@v4
|
|
28
|
+
with:
|
|
29
|
+
name: distributions
|
|
30
|
+
path: dist/
|
|
31
|
+
if-no-files-found: error
|
|
32
|
+
publish:
|
|
33
|
+
needs: build
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
environment: pypi
|
|
36
|
+
permissions:
|
|
37
|
+
id-token: write
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/download-artifact@v4
|
|
40
|
+
with:
|
|
41
|
+
name: distributions
|
|
42
|
+
path: dist/
|
|
43
|
+
- name: Publish implementation first
|
|
44
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
45
|
+
with:
|
|
46
|
+
packages-dir: dist/primary/
|
|
47
|
+
skip-existing: true
|
|
48
|
+
publish-alias:
|
|
49
|
+
needs: [build, publish]
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
environment: pypi2
|
|
52
|
+
permissions:
|
|
53
|
+
id-token: write
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/download-artifact@v4
|
|
56
|
+
with:
|
|
57
|
+
name: distributions
|
|
58
|
+
path: dist/
|
|
59
|
+
- name: Publish alias
|
|
60
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
61
|
+
with:
|
|
62
|
+
packages-dir: dist/alias/
|
|
63
|
+
skip-existing: true
|
|
64
|
+
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# uv
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs/Zensical documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
201
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
203
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
221
|
+
_site/
|
|
222
|
+
.local/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Masanori HIRANO
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: CVE-info-MCP
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Read-only MCP access to CVE-info Japanese vulnerability intelligence
|
|
5
|
+
Project-URL: Repository, https://github.com/masanorihirano/CVE-info-mcp
|
|
6
|
+
Project-URL: Documentation, https://github.com/masanorihirano/CVE-info-mcp#readme
|
|
7
|
+
Project-URL: Data, https://dev.mhirano.jp/CVE-info/
|
|
8
|
+
Author: Masanori Hirano
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Python: >=3.11
|
|
12
|
+
Requires-Dist: filelock>=3.16
|
|
13
|
+
Requires-Dist: mcp<3,>=2.3
|
|
14
|
+
Requires-Dist: platformdirs>=4
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# CVE-info-mcp
|
|
18
|
+
|
|
19
|
+
[CVE-info](https://dev.mhirano.jp/CVE-info/) の公開脆弱性情報を、ローカルで動く読み取り専用 MCP から検索・取得します。検索結果・詳細本文には `dev.mhirano.jp` の個別ページ URL を含め、公式情報、AI解説、Web調査メモと出典を分けて返します。LLM API キーは不要で、このパッケージ自体は生成・追加調査を行いません。
|
|
20
|
+
|
|
21
|
+
## 1 行でクライアントへ登録
|
|
22
|
+
|
|
23
|
+
[uv](https://docs.astral.sh/uv/getting-started/installation/) と利用するクライアントを先にインストールしてください。Python 3.11 以上が必要です。uv は必要な Python を取得できます。
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
uvx cve-info-mcp install --client claude-desktop
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Claude Desktop を再起動すると `cve-info` が利用できます。Windows/macOS の設定ファイルを更新し、既存設定を保存してバックアップを作ります。同名の異なる設定があるときは上書きせずエラーにします。確認だけなら `--dry-run`、設定ファイルを明示する場合は `--config PATH` を付けてください。
|
|
30
|
+
|
|
31
|
+
CLI クライアント用の登録コマンドもあります。
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
uvx cve-info-mcp install --client claude-code
|
|
35
|
+
uvx cve-info-mcp install --client codex
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
配布名 `CVE-info` は同一バージョンの `CVE-info-MCP` を導入するエイリアスです。`uvx cve-info install --client claude-desktop` でも同じ実装が動きます。PyPI の名前は大文字小文字を区別しないため、`CVE-info-MCP` と `cve-info-mcp` は同一パッケージです。
|
|
39
|
+
|
|
40
|
+
## 配信する内容と URL
|
|
41
|
+
|
|
42
|
+
| ツール | 内容 |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| `search(query)` | CVE番号・製品・日本語・CWEの検索。結果ごとに `id`, `title`, `url`, `summary` |
|
|
45
|
+
| `fetch(id)` | 公式情報、AI解説、Web調査メモ。本文冒頭と `url` に個別ページ URL |
|
|
46
|
+
| `search_cves(...)` | KEV・AI解説・調査メモの有無で絞り込み、最大50件とページ送り |
|
|
47
|
+
| `get_cve(id, section, max_characters)` | `all`, `official`, `ai`, `research` の選択、最大50,000文字の枠で取得 |
|
|
48
|
+
| `get_status()` | ローカル索引のバージョン・更新状態・収録件数・公式サイト URL |
|
|
49
|
+
|
|
50
|
+
例: `CVE-2026-99083` の引用先は `https://dev.mhirano.jp/CVE-info/cve.html?id=CVE-2026-99083` です。外部のベンダー告知・調査記事 URL も出典として返します。クライアントにはこれらを引用して回答するよう指示しますが、最終的な引用表示はクライアント側の動作に依存します。
|
|
51
|
+
|
|
52
|
+
検索は Unicode 正規化後の部分一致・空白区切り AND 検索です。意味検索ではありません。公開日の新しい順で返します。調査メモがない場合は「未作成」、長い内容は省略したセクションをメタデータに記載します。KEV未掲載や検索結果なしを安全という意味には解釈しません。収録範囲と各情報源の状態は [元サイトの収集状況](https://dev.mhirano.jp/CVE-info/reports/collection-status.html)を確認してください。
|
|
53
|
+
|
|
54
|
+
## GitHub Pages だけでの配信
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
CVE-info の公開 search-index.json
|
|
58
|
+
→ 毎時37分の GitHub Actions(LLM 呼び出しなし)
|
|
59
|
+
→ CVE-info-mcp の Pages: data/manifest.json + 圧縮した検索データ
|
|
60
|
+
→ 利用者の Python MCP: ローカル SQLite 検索
|
|
61
|
+
→ 詳細は元サイト assets/cves/...json から必要時に取得
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
データ配信先は `https://dev.mhirano.jp/CVE-info-mcp/data/` です。動的サーバーやクラウドDBは不要です。Actions のスケジュールは実行が遅れる場合があります。索引は初回検索時にダウンロードして構築し、その後は1時間ごとに確認、変更のあった圧縮ファイルだけ再取得します。詳細データは必要な番号帯だけ取得し1時間キャッシュします。索引と詳細は別時点の情報になり得るため、双方の鮮度を表示します。
|
|
65
|
+
|
|
66
|
+
初回検索には待ち時間があるため、クライアント接続前に `uvx cve-info-mcp update` で準備できます。更新失敗時は古いキャッシュを `stale` とエラー情報付きで返し、初回取得失敗・明示した `update` の失敗はエラーになります。配信 Actions が取得に失敗した場合も CI は失敗します。
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
uvx cve-info-mcp update
|
|
70
|
+
uvx cve-info-mcp search "Linux 認証"
|
|
71
|
+
uvx cve-info-mcp fetch CVE-2026-99083
|
|
72
|
+
uvx cve-info-mcp status
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
保存先は OS 標準のユーザーキャッシュです。`CVE_INFO_CACHE_DIR` または `--cache-dir PATH` で変更できます。配信元変更は `CVE_INFO_DATA_URL` または `--data-url HTTPS_URL`、これらの CLI オプションはサブコマンドの前に置きます。元記事へのリンクは返しますが、外部記事へのアクセスや任意URL取得ツールは提供しません。
|
|
76
|
+
|
|
77
|
+
## Web 版クライアントからの接続
|
|
78
|
+
|
|
79
|
+
上の1行はローカル MCP に対応するクライアント用です。GitHub Pages の URL を ChatGPT・Claude Web のリモート MCP URL に登録しても接続できません。Web 版から使う場合は、対応するトンネル等で利用者の端末へ到達させる構成が別途必要です。HTTP モードはローカルループバックだけに待ち受けます。
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
uvx cve-info-mcp serve --transport streamable-http --port 8766
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
エンドポイントは `http://127.0.0.1:8766/mcp` です。公開認証・HTTPS・トンネル設定はこのパッケージの対象外で、端末と MCP プロセスの稼働が必要です。
|
|
86
|
+
|
|
87
|
+
## 開発・公開
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
uv sync --locked
|
|
91
|
+
uv run pytest
|
|
92
|
+
uv build --out-dir dist/primary
|
|
93
|
+
uv build alias --out-dir dist/alias
|
|
94
|
+
uv run python scripts/check_release.py
|
|
95
|
+
uv run twine check dist/primary/* dist/alias/*
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`check.yml` は Windows・macOS・Linux と Python 3.11/3.13 で検証します。`data.yml` は毎時のデータ公開、`publish.yml` は GitHub Release 作成時のパッケージ公開です。バージョンを本体・aliasの両 `pyproject.toml`、aliasの依存指定、`src/cve_info_mcp/__init__.py` で揃え、`uv lock` を実行してからタグ `vX.Y.Z` を main 上に作成し、GitHub Release を公開します。再実行では対象タグを指定してください。本体の公開成功後にエイリアスを公開します。
|
|
99
|
+
|
|
100
|
+
PyPI Trusted Publisher は次の2件を登録します。APIトークンや Actions Secret は不要です。
|
|
101
|
+
|
|
102
|
+
| PyPI Project name | Owner | Repository name | Workflow name | Environment name |
|
|
103
|
+
| --- | --- | --- | --- | --- |
|
|
104
|
+
| `CVE-info-MCP` | `masanorihirano` | `CVE-info-mcp` | `publish.yml` | `pypi` |
|
|
105
|
+
| `CVE-info` | `masanorihirano` | `CVE-info-mcp` | `publish.yml` | `pypi2` |
|
|
106
|
+
|
|
107
|
+
Pending Publisher の登録だけでは名前は予約されません。初回アップロード成功後にプロジェクトが作成されます。GitHub Pages の Source は GitHub Actions を指定します。
|
|
108
|
+
|
|
109
|
+
## 利用条件
|
|
110
|
+
|
|
111
|
+
このリポジトリの Python コードは [MIT License](LICENSE) です。取得する脆弱性情報・外部文書・AI解説に一括して MIT を付与するものではありません。各情報源の権利と利用条件を引き継ぎます。[元サイトの情報源・利用条件](https://github.com/masanorihirano/CVE-info/blob/main/docs/source-rights.md)と、返却する出典 URL を確認してください。
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# CVE-info-mcp
|
|
2
|
+
|
|
3
|
+
[CVE-info](https://dev.mhirano.jp/CVE-info/) の公開脆弱性情報を、ローカルで動く読み取り専用 MCP から検索・取得します。検索結果・詳細本文には `dev.mhirano.jp` の個別ページ URL を含め、公式情報、AI解説、Web調査メモと出典を分けて返します。LLM API キーは不要で、このパッケージ自体は生成・追加調査を行いません。
|
|
4
|
+
|
|
5
|
+
## 1 行でクライアントへ登録
|
|
6
|
+
|
|
7
|
+
[uv](https://docs.astral.sh/uv/getting-started/installation/) と利用するクライアントを先にインストールしてください。Python 3.11 以上が必要です。uv は必要な Python を取得できます。
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
uvx cve-info-mcp install --client claude-desktop
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Claude Desktop を再起動すると `cve-info` が利用できます。Windows/macOS の設定ファイルを更新し、既存設定を保存してバックアップを作ります。同名の異なる設定があるときは上書きせずエラーにします。確認だけなら `--dry-run`、設定ファイルを明示する場合は `--config PATH` を付けてください。
|
|
14
|
+
|
|
15
|
+
CLI クライアント用の登録コマンドもあります。
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
uvx cve-info-mcp install --client claude-code
|
|
19
|
+
uvx cve-info-mcp install --client codex
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
配布名 `CVE-info` は同一バージョンの `CVE-info-MCP` を導入するエイリアスです。`uvx cve-info install --client claude-desktop` でも同じ実装が動きます。PyPI の名前は大文字小文字を区別しないため、`CVE-info-MCP` と `cve-info-mcp` は同一パッケージです。
|
|
23
|
+
|
|
24
|
+
## 配信する内容と URL
|
|
25
|
+
|
|
26
|
+
| ツール | 内容 |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| `search(query)` | CVE番号・製品・日本語・CWEの検索。結果ごとに `id`, `title`, `url`, `summary` |
|
|
29
|
+
| `fetch(id)` | 公式情報、AI解説、Web調査メモ。本文冒頭と `url` に個別ページ URL |
|
|
30
|
+
| `search_cves(...)` | KEV・AI解説・調査メモの有無で絞り込み、最大50件とページ送り |
|
|
31
|
+
| `get_cve(id, section, max_characters)` | `all`, `official`, `ai`, `research` の選択、最大50,000文字の枠で取得 |
|
|
32
|
+
| `get_status()` | ローカル索引のバージョン・更新状態・収録件数・公式サイト URL |
|
|
33
|
+
|
|
34
|
+
例: `CVE-2026-99083` の引用先は `https://dev.mhirano.jp/CVE-info/cve.html?id=CVE-2026-99083` です。外部のベンダー告知・調査記事 URL も出典として返します。クライアントにはこれらを引用して回答するよう指示しますが、最終的な引用表示はクライアント側の動作に依存します。
|
|
35
|
+
|
|
36
|
+
検索は Unicode 正規化後の部分一致・空白区切り AND 検索です。意味検索ではありません。公開日の新しい順で返します。調査メモがない場合は「未作成」、長い内容は省略したセクションをメタデータに記載します。KEV未掲載や検索結果なしを安全という意味には解釈しません。収録範囲と各情報源の状態は [元サイトの収集状況](https://dev.mhirano.jp/CVE-info/reports/collection-status.html)を確認してください。
|
|
37
|
+
|
|
38
|
+
## GitHub Pages だけでの配信
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
CVE-info の公開 search-index.json
|
|
42
|
+
→ 毎時37分の GitHub Actions(LLM 呼び出しなし)
|
|
43
|
+
→ CVE-info-mcp の Pages: data/manifest.json + 圧縮した検索データ
|
|
44
|
+
→ 利用者の Python MCP: ローカル SQLite 検索
|
|
45
|
+
→ 詳細は元サイト assets/cves/...json から必要時に取得
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
データ配信先は `https://dev.mhirano.jp/CVE-info-mcp/data/` です。動的サーバーやクラウドDBは不要です。Actions のスケジュールは実行が遅れる場合があります。索引は初回検索時にダウンロードして構築し、その後は1時間ごとに確認、変更のあった圧縮ファイルだけ再取得します。詳細データは必要な番号帯だけ取得し1時間キャッシュします。索引と詳細は別時点の情報になり得るため、双方の鮮度を表示します。
|
|
49
|
+
|
|
50
|
+
初回検索には待ち時間があるため、クライアント接続前に `uvx cve-info-mcp update` で準備できます。更新失敗時は古いキャッシュを `stale` とエラー情報付きで返し、初回取得失敗・明示した `update` の失敗はエラーになります。配信 Actions が取得に失敗した場合も CI は失敗します。
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
uvx cve-info-mcp update
|
|
54
|
+
uvx cve-info-mcp search "Linux 認証"
|
|
55
|
+
uvx cve-info-mcp fetch CVE-2026-99083
|
|
56
|
+
uvx cve-info-mcp status
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
保存先は OS 標準のユーザーキャッシュです。`CVE_INFO_CACHE_DIR` または `--cache-dir PATH` で変更できます。配信元変更は `CVE_INFO_DATA_URL` または `--data-url HTTPS_URL`、これらの CLI オプションはサブコマンドの前に置きます。元記事へのリンクは返しますが、外部記事へのアクセスや任意URL取得ツールは提供しません。
|
|
60
|
+
|
|
61
|
+
## Web 版クライアントからの接続
|
|
62
|
+
|
|
63
|
+
上の1行はローカル MCP に対応するクライアント用です。GitHub Pages の URL を ChatGPT・Claude Web のリモート MCP URL に登録しても接続できません。Web 版から使う場合は、対応するトンネル等で利用者の端末へ到達させる構成が別途必要です。HTTP モードはローカルループバックだけに待ち受けます。
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
uvx cve-info-mcp serve --transport streamable-http --port 8766
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
エンドポイントは `http://127.0.0.1:8766/mcp` です。公開認証・HTTPS・トンネル設定はこのパッケージの対象外で、端末と MCP プロセスの稼働が必要です。
|
|
70
|
+
|
|
71
|
+
## 開発・公開
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
uv sync --locked
|
|
75
|
+
uv run pytest
|
|
76
|
+
uv build --out-dir dist/primary
|
|
77
|
+
uv build alias --out-dir dist/alias
|
|
78
|
+
uv run python scripts/check_release.py
|
|
79
|
+
uv run twine check dist/primary/* dist/alias/*
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`check.yml` は Windows・macOS・Linux と Python 3.11/3.13 で検証します。`data.yml` は毎時のデータ公開、`publish.yml` は GitHub Release 作成時のパッケージ公開です。バージョンを本体・aliasの両 `pyproject.toml`、aliasの依存指定、`src/cve_info_mcp/__init__.py` で揃え、`uv lock` を実行してからタグ `vX.Y.Z` を main 上に作成し、GitHub Release を公開します。再実行では対象タグを指定してください。本体の公開成功後にエイリアスを公開します。
|
|
83
|
+
|
|
84
|
+
PyPI Trusted Publisher は次の2件を登録します。APIトークンや Actions Secret は不要です。
|
|
85
|
+
|
|
86
|
+
| PyPI Project name | Owner | Repository name | Workflow name | Environment name |
|
|
87
|
+
| --- | --- | --- | --- | --- |
|
|
88
|
+
| `CVE-info-MCP` | `masanorihirano` | `CVE-info-mcp` | `publish.yml` | `pypi` |
|
|
89
|
+
| `CVE-info` | `masanorihirano` | `CVE-info-mcp` | `publish.yml` | `pypi2` |
|
|
90
|
+
|
|
91
|
+
Pending Publisher の登録だけでは名前は予約されません。初回アップロード成功後にプロジェクトが作成されます。GitHub Pages の Source は GitHub Actions を指定します。
|
|
92
|
+
|
|
93
|
+
## 利用条件
|
|
94
|
+
|
|
95
|
+
このリポジトリの Python コードは [MIT License](LICENSE) です。取得する脆弱性情報・外部文書・AI解説に一括して MIT を付与するものではありません。各情報源の権利と利用条件を引き継ぎます。[元サイトの情報源・利用条件](https://github.com/masanorihirano/CVE-info/blob/main/docs/source-rights.md)と、返却する出典 URL を確認してください。
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# CVE-info
|
|
2
|
+
|
|
3
|
+
`CVE-info` is an alias distribution for
|
|
4
|
+
[CVE-info-MCP](https://pypi.org/project/CVE-info-MCP/).
|
|
5
|
+
It installs the same implementation and exposes the `cve-info` command.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
uvx cve-info install --client claude-desktop
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Python 3.11+ and uv are required for this command. See the
|
|
12
|
+
[main documentation](https://github.com/masanorihirano/CVE-info-mcp) for data
|
|
13
|
+
updates, local MCP clients, and Web-client connection limitations.
|
|
14
|
+
PyPI package names are case-insensitive; both distributions resolve equally
|
|
15
|
+
with uppercase or lowercase spelling.
|
|
16
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.27"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "CVE-info"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Alias package for CVE-info-MCP"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{name = "Masanori Hirano"}]
|
|
13
|
+
dependencies = ["CVE-info-MCP==0.1.0"]
|
|
14
|
+
|
|
15
|
+
[project.urls]
|
|
16
|
+
Repository = "https://github.com/masanorihirano/CVE-info-mcp"
|
|
17
|
+
|
|
18
|
+
[project.scripts]
|
|
19
|
+
cve-info = "cve_info_mcp.cli:main"
|
|
20
|
+
|
|
21
|
+
[tool.hatch.build.targets.wheel]
|
|
22
|
+
packages = ["src/cve_info_alias"]
|
|
23
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.27"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "CVE-info-MCP"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Read-only MCP access to CVE-info Japanese vulnerability intelligence"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{name = "Masanori Hirano"}]
|
|
13
|
+
dependencies = ["mcp>=2.3,<3", "filelock>=3.16", "platformdirs>=4"]
|
|
14
|
+
|
|
15
|
+
[project.urls]
|
|
16
|
+
Repository = "https://github.com/masanorihirano/CVE-info-mcp"
|
|
17
|
+
Documentation = "https://github.com/masanorihirano/CVE-info-mcp#readme"
|
|
18
|
+
Data = "https://dev.mhirano.jp/CVE-info/"
|
|
19
|
+
|
|
20
|
+
[project.scripts]
|
|
21
|
+
cve-info-mcp = "cve_info_mcp.cli:main"
|
|
22
|
+
|
|
23
|
+
[dependency-groups]
|
|
24
|
+
dev = ["pytest>=8", "build>=1.2", "twine>=6"]
|
|
25
|
+
|
|
26
|
+
[tool.hatch.build.targets.wheel]
|
|
27
|
+
packages = ["src/cve_info_mcp"]
|
|
28
|
+
|
|
29
|
+
[tool.pytest.ini_options]
|
|
30
|
+
testpaths = ["tests"]
|
|
31
|
+
|
|
32
|
+
[tool.uv]
|
|
33
|
+
# Keep the same dependency age policy on developer machines and CI.
|
|
34
|
+
exclude-newer = "1 week"
|
|
35
|
+
|