vulndify-mcp-server
一个最小可运行的 MCP Server 示例项目,基于官方 Python SDK mcp 构建,并暴露一个演示用 tool:
- tool 名称:
hello - 调用结果: 直接返回字符串
hello
这个项目已经包含:
- Python 包结构
- MCP Server 入口
- 可发布到 PyPI 的
pyproject.toml - 基础测试
- 本地开发和打包说明
目录结构
.
├── pyproject.toml
├── README.md
├── LICENSE
├── src
│ └── vulndify_mcp_server
│ ├── __init__.py
│ ├── __main__.py
│ └── server.py
└── tests
└── test_server.py
本地安装
建议先创建虚拟环境,然后安装本项目:
python -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
启动服务
安装后可以直接通过命令行启动:
vulndify-mcp-server
也可以用模块方式启动:
python -m vulndify_mcp_server
服务默认通过 stdio 方式运行,适合被 MCP Client 拉起。
核心代码示例
hello tool 定义在 src/vulndify_mcp_server/server.py 中,调用时直接返回固定字符串:
@mcp.tool(name="hello")
def hello_tool() -> str:
return "hello"
开发测试
运行测试:
pytest
构建发布包:
python -m build
检查发布产物:
twine check dist/*
发布到 PyPI
正式发布前,建议先修改 pyproject.toml 中的以下字段:
nameversiondescriptionlicenseauthorsurls
然后执行:
python -m build
python -m twine upload dist/*
如果要先发布到 TestPyPI:
python -m twine upload --repository testpypi dist/*
后续可扩展方向
- 增加更多 tools
- 添加 resources / prompts
- 增加 CI 工作流
- 添加 lint 和类型检查
- 接入真实业务逻辑
Metadata
Release files for vulndify-mcp-server 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vulndify_mcp_server-0.3.0.tar.gz | 73.1 kB | Without provenance | Details for vulndify_mcp_server-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vulndify_mcp_server-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for vulndify_mcp_server-0.3.0-py3-none-any.whl |
Total release size: 79.0 kB
Release files / vulndify_mcp_server-0.3.0.tar.gz
| Download URL | vulndify_mcp_server-0.3.0.tar.gz |
|---|---|
| Size | 73.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f40eba0b3b99d23344ca136e14012210a4d919101ccee0cd99db07a783969c50
|
|
BLAKE2b-256 checksum How to use checksums |
28d1d38dad6ea89d5c7cc43d4c6c14598909003f697c3fc28b6c1aae5b3f37c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / vulndify_mcp_server-0.3.0-py3-none-any.whl
| Download URL | vulndify_mcp_server-0.3.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28a3e941b1ca69b766ba7d3dbff4b8b4e47d81501b0de0ac1b0278c0deff7f8e
|
|
BLAKE2b-256 checksum How to use checksums |
047f757cad3ca62bbbedea312be98214e96ddb617acbe44dce7eefcbf20f8628
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for vulndify-mcp-server 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.