mcp-tools-py MCP工具 是 AI Skill Hub 本期精选MCP工具之一。综合评分 7.8 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
基于MCP协议的代码质量检查工具,集成pylint和pytest功能,提供智能LLM友好的代码分析能力。适合需要自动化代码审查、集成开发环境的Python开发者和AI应用构建者使用。
mcp-tools-py MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
基于MCP协议的代码质量检查工具,集成pylint和pytest功能,提供智能LLM友好的代码分析能力。适合需要自动化代码审查、集成开发环境的Python开发者和AI应用构建者使用。
mcp-tools-py MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/MarcusJellinghaus/mcp-tools-py
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"mcp-tools-py-mcp--": {
"command": "npx",
"args": ["-y", "mcp-tools-py"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 mcp-tools-py MCP工具 执行以下任务... Claude: [自动调用 mcp-tools-py MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"mcp-tools-py_mcp__": {
"command": "npx",
"args": ["-y", "mcp-tools-py"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
A Model Context Protocol (MCP) server providing code quality checking operations with easy client configuration. This server offers an API for performing code quality checks within a specified project directory, following the MCP protocol design.
This MCP server enables AI assistants like Claude (via Claude Desktop), VSCode with GitHub Copilot, or other MCP-compatible clients to run code quality checks on Python projects. The tools provided are:
Scope: This server covers Python projects only. Further Python-specific extensions are planned, including architecture and layering checks (vulture, tach, import-linter) and refactoring tools. Support for other languages can be provided through separate, dedicated MCP servers with similar functionality.
Why a dedicated MCP server instead of bash access?
A general-purpose bash MCP tool allows more flexibility, but at the expense of less control. This server takes a more focused approach:
project_dir.run_pylint_check: Run pylint on the project code and generate smart prompts for LLMsrun_pytest_check: Run pytest on the project code and generate smart prompts for LLMsrun_mypy_check: Run mypy type checking on the project code| Parameter | Type | Description |
|---|---|---|
--project-dir | string | **Required**. Base directory for code checking operations |
Add this line to your requirements.txt:
mcp-tools-py @ git+https://github.com/MarcusJellinghaus/mcp-tools-py.git
[project.optional-dependencies] dev = [ "mcp-tools-py @ git+https://github.com/MarcusJellinghaus/mcp-tools-py.git", ] ```
pip install -r requirements.txt
pip install ".[dev]" ```
pip install -e .
pip install -e ".[dev]" ```
See INSTALL.md for detailed installation instructions.
Quick install:
```bash
pip install git+https://github.com/MarcusJellinghaus/mcp-tools-py.git
mcp-tools-py --help
**Development install:**
bash
git clone https://github.com/MarcusJellinghaus/mcp-tools-py.git cd mcp-tools-py python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -e ".[dev]" mcp-tools-py --help ```
After adding to requirements.txt or pyproject.toml:
```bash
pip install .
1. First install the server:
pip install git+https://github.com/MarcusJellinghaus/mcp-tools-py.git
2. Configure with mcp-config:
mcp-config
Then select "Add New" and search for this server, or run directly: mcp-config mcp-tools-py
This will prompt you for your project directory and automatically configure your MCP client.
If you prefer manual configuration, edit your MCP configuration file:
Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"mcp-tools-py": {
"command": "mcp-tools-py",
"args": ["--project-dir", "/path/to/your/project"]
}
}
}
For development mode:
{
"mcpServers": {
"mcp-tools-py": {
"command": "python",
"args": [
"-m",
"src.main",
"--project-dir",
"/path/to/your/project"
],
"env": {
"PYTHONPATH": "/path/to/mcp-tools-py"
}
}
}
}
VSCode (.vscode/mcp.json):
{
"servers": {
"mcp-tools-py": {
"command": "mcp-tools-py",
"args": ["--project-dir", "."]
}
}
}
VSCode development mode:
{
"servers": {
"mcp-tools-py": {
"command": "python",
"args": ["-m", "src.main", "--project-dir", "."],
"env": {
"PYTHONPATH": "/path/to/mcp-tools-py"
}
}
}
}
mcp-tools-py --project-dir /path/to/project [options]
Pylint reads your project's pyproject.toml automatically. Control which issues are reported by configuring [tool.pylint.messages_control] in your pyproject.toml. See docs/pyproject-configuration.md for examples and migration guidance.
#### Python Configuration <div class="rdm-tbl-wrap"><table class="rdm-tbl"><thead><tr><th>Parameter</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>--python-executable</td><td>string</td><td>sys.executable</td><td>Path to Python interpreter for running pytest, pylint, and mypy. Should point to the environment where these tools are installed (the tool's own venv), not the project's runtime venv</td></tr><tr><td>--venv-path</td><td>string</td><td>None</td><td>Path to the virtual environment where pytest, pylint, and mypy are installed. When specified, this venv's Python will be used instead of --python-executable. This should be the tool's own venv, not the project's runtime venv</td></tr></tbody></table></div>
#### Test Configuration <div class="rdm-tbl-wrap"><table class="rdm-tbl"><thead><tr><th>Parameter</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>--test-folder</td><td>string</td><td>"tests"</td><td>Path to the test folder (relative to project-dir)</td></tr><tr><td>--keep-temp-files</td><td>flag</td><td>False</td><td>Keep temporary files after test execution. Useful for debugging when tests fail</td></tr></tbody></table></div>
#### Logging Configuration <div class="rdm-tbl-wrap"><table class="rdm-tbl"><thead><tr><th>Parameter</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>--log-level</td><td>string</td><td>"INFO"</td><td>Set logging level. Choices: DEBUG, INFO, WARNING, ERROR, CRITICAL</td></tr><tr><td>--log-file</td><td>string</td><td>None</td><td>Path for structured JSON logs. If not specified, logs only to console</td></tr><tr><td>--console-only</td><td>flag</td><td>False</td><td>Log only to console, ignore --log-file parameter</td></tr></tbody></table></div>
The --python-executable and --venv-path options must point to the environment where pytest, pylint, and mypy are installed — this is typically the tool's own virtual environment, not your project's runtime venv.
Point to the venv where mcp-tools-py and its tools are installed:
{
"mcpServers": {
"mcp-tools-py": {
"command": "mcp-tools-py",
"args": [
"--project-dir", "/path/to/your/project",
"--venv-path", "${VIRTUAL_ENV}"
]
}
}
}
Do not point to your project's runtime venv if it doesn't have pytest/pylint/mypy installed:
{
"mcpServers": {
"mcp-tools-py": {
"command": "mcp-tools-py",
"args": [
"--project-dir", "/path/to/your/project",
"--venv-path", "/path/to/your/project/.venv"
]
}
}
}
This will fail if your project's .venv doesn't have the required tools installed.
This server can be easily configured using the mcp-config Python tool. The mcp-config tool provides:
Prerequisites: Install Python and the mcp-config tool.
Note: While other MCP clients like Windsurf and Cursor support MCP servers, they may require manual configuration.
```bash
python -m venv .venv
After installation, you can run the server using the mcp-tools-py command:
mcp-tools-py --project-dir /path/to/project [options]
target_directories = ["mypackage", "tests"]
target_directories = ["module1", "module2", "shared", "tests"] ```
set PYTHONPATH=. && mcp dev src/server.py ```
You can also run the server as a Python module:
```bash python -m mcp_tools_py --project-dir /path/to/project [options]
--python-executable or --venv-path points to an environment that doesn't have the required tools installed. Update the configuration to point to the correct environment.mcp-tools-py 是一个基于 Model Context Protocol (MCP) 标准构建的服务器,旨在为 AI 助手提供专业的 Python 代码质量检查能力。通过遵循 MCP 协议设计,该服务器可以为 Claude Desktop、VSCode (GitHub Copilot) 等兼容客户端提供 API 接口,使其能够直接在指定的 Python 项目目录中执行静态分析和测试任务,从而实现自动化的代码审查与纠错。
本项目集成了多种 Python 开发必���的质量检查工具,并针对 LLM(大语言模型)进行了优化。核心功能包括:使用 `run_pylint_check` 执行 pylint 检查并为 LLM 生成智能提示词;使用 `run_pytest_check` 运行 pytest 测试并生成易于理解的错误报告;以及使用 `run_mypy_check` 进行 mypy 类型检查。所有工具均旨在通过结构化的输出,帮助 AI 更精准地理解代码问题。
在使用本工具时,必须通过 `--project-dir` 参数指定需要进行代码检查的目标项目根目录。请注意,该参数是运行命令时必不可少的,用于确定检查操作的上下文范围。
您可以根据使用场景选择不同的安装方式。推荐使用 pip 直接从 GitHub 安装:`pip install git+https://github.com/MarcusJellinghaus/mcp-tools-py.git`。如果您希望将其作为项目依赖,请在 `requirements.txt` 中添加对应的 Git 链接。安装完成后,可以通过运行 `mcp-tools-py --help` 来验证安装是否成功。
在命令行中使用时,请通过 `mcp-tools-py --project-dir /path/to/project [options]` 的格式启动。请务必确保 `--project-dir` 指向正确的项目路径,并根据需要通过可选参数调整执行环境。
工具会自动读取项目中的 `pyproject.toml` 文件���配置 Pylint 的行为,您可以通过 `[tool.pylint.messages_control]` 节点自定义报告的错误类型。特别注意:`--python-executable` 参数应指向安装了 pytest、pylint 和 mypy 的 Python 解释器路径(通常是工具自身的虚拟环境),而非目标项目的运行环境,以确保检查工具能被正确调用。
本项目主要通过命令行界面 (CLI) 提供服务。安装完成后,开发者可以直接调用 `mcp-tools-py` 命令启动 MCP 服务器,通过标准的 MCP 协议与各类 AI 客户端进行交互,这是目前最推荐的使用方式。
对于不同结构的 Python 项目,您可以通过配置 `target_directories` 来指定检查范围(如 `["mypackage", "tests"]`)。对于复杂的多模块项目,请列出所有需要扫描的模块目录。在开发模式下,可以通过设置 `PYTHONPATH=.` 并使用 `mcp dev src/server.py` 命令来启动服务器模块进行调试。
针对常见问题:若遇到 "No module named pytest" 等模块缺失错误,通常是因为 `--python-executable` 或 `--venv-path` 指向的环境未安装相关工具。请检查配置并确保指向了包含这些工具的正确环境。在安装缺失工具后,请务必重启 MCP server 以使配置生效。
创意性强的MCP服务实现,结合代码质量检查和LLM交互,填补该领域空白。但项目还需更多社区验证和生态完善。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,mcp-tools-py MCP工具 在MCP工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | mcp-tools-py |
| 原始描述 | 开源MCP工具:MCP server providing code quality checks (pylint and pytest) with smart LLM-frie。⭐16 · Python |
| Topics | 代码质量pylintpytestMCP服务器Python开发 |
| GitHub | https://github.com/MarcusJellinghaus/mcp-tools-py |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-16 · 更新时间:2026-05-22 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端