# mcp-tools-py [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/MarcusJellinghaus/mcp-tools-py  
**GitHub Stars:** 21  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-tools-py

## Description
MCP server providing code quality checks (pylint and pytest) with smart LLM-friendly prompts for analysis and fixes. Enables Claude and other AI assistants to analyze your code and suggest improvements.

## Tools
Capabilities this server exposes over MCP:

- **Security** — Only a defined set of tools can be executed — see [Available Tools](#available-tools). All operations are scoped to the specified `project_dir`.
- **Transparency** — The server is open source, and detailed structured logging records every tool call with parameters, timing, and results.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "mcp-tools-py": {
    "command": "uvx",
    "args": ["mcp-tools-py"]
  }
}
```

## Documentation

## What mcp-tools-py does

mcp-tools-py exposes Python project quality checks through the Model Context Protocol. Its tool set includes Pylint analysis, pytest execution, coverage summaries, formatting, and checks using mypy, Ruff, Bandit, Vulture, and Deptry. The server is intended for AI assistants that need to inspect code, run tests, interpret failures, and suggest targeted improvements.

Operations are restricted to a declared set of tools and run inside the supplied `project_dir`. Responses are formatted for assistant context rather than returning unprocessed command output. Results can include issue summaries, test counts, failure details, coverage gaps, and hints for follow-up work.

## How it works

Tools invoke checks against the selected Python project and return structured, size-conscious replies. Detailed structured logging records each call's parameters, duration, and result, providing an audit trail for tool execution.

Several tools accept `target_directories`. When that argument is omitted, the server can inspect `pyproject.toml` to find package and test locations. Package directories come from the setuptools package-discovery configuration, while test directories come from pytest's `testpaths`; `src` and `tests` are used as fallbacks. `run_deptry_check` uses source directories and excludes test paths. Explicit directory lists can replace this detection.

Pylint accepts additional command-line arguments, target directories, and a limit on how many issue types receive detailed treatment. Pytest supports marker selection, extra arguments, subprocess environment variables, timeouts, coverage, and saved coverage data. Coverage output can include overall and per-package figures, missing-code rankings, uncovered modules, and the test selection behind the measurements.

## Setup and configuration

Configure the project in `pyproject.toml` when possible. Pylint reads its message-control settings from `[tool.pylint.messages_control]`. Pytest settings such as registered markers, `testpaths`, and `addopts` influence tool behavior. Coverage exclusions can use the project's coverage configuration or `# pragma: no cover`.

The server also reads user-level settings from `~/.mcp_coder/config.toml`. In particular, the `[mcp_tools_py] pytest_workers` setting controls the worker count when pytest is configured with `-n auto`. Client configuration is available for Claude Desktop and VS Code with GitHub Copilot; other MCP-compatible clients may also be used where they support the server's configuration model.

Coverage-enabled pytest runs require `pytest-cov` in the project's environment. Test subprocesses can receive custom environment variables through the pytest tool, and `PYTEST_ADDOPTS` is applied unless explicitly cleared.

## Tools and capabilities

- Run Pylint with project-aware directory detection, extra arguments, and summarized issue counts.
- Run pytest with marker filtering, verbosity controls, timeouts, environment variables, and selected pytest options.
- Measure coverage, rank gaps by module, combine runs, or inspect the previous coverage result without rerunning tests.
- Run Ruff checks and fixes, mypy, Bandit, Vulture, Deptry, and formatting operations.
- Limit analyzed directories explicitly or let the server derive them from project configuration.
- Return structured results and record tool-call parameters, timing, and outcomes.

## Limitations and notes

The server targets Python projects only. It does not automatically add pytest parallelization; parallel execution depends on the project's `addopts` or an explicit `-n` option. A numeric worker setting can override automatic worker selection, while `-n 0` disables pytest-xdist.

Pytest replies distinguish verified passes, test failures, execution errors, collection-only runs, and runs that produced no test outcomes. Options such as `-x` and `--maxfail` can leave selected tests unrun, which is reflected in the result.

Coverage is supplementary to test status. The project's coverage `fail_under` value is reported but does not determine whether the test operation passes. Saved coverage reuse can narrow the source selection and module detail, but it does not run tests.

_Full upstream README: https://allmcps.com/mcp/mcp-tools-py/readme_

