MCP Tools Py logo

MCP Tools Py

Run scoped Python quality checks, tests, coverage, linting, and formatting through MCP with structured results.

Install MCP Tools Py

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mcp-tools-py": {
      "command": "uvx",
      "args": [
        "mcp-tools-py"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio mcp-tools-py -- uvx mcp-tools-py

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

uvx mcp-tools-py

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

mcp-tools-py provides MCP tools for running Python code-quality checks and tests within a specified project directory. It covers Pylint, pytest, coverage reporting, formatting, and several additional analysis tools, returning structured results designed for AI-assisted diagnosis and fixes. Project settings are read from pyproject.toml where supported, with automatic source and test directory detection. Reach for it when an MCP client needs controlled repository analysis instead of unrestricted shell access.

Use cases

  • Run Pylint against selected Python source and test directories
  • Execute pytest with markers, timeouts, or custom environment variables
  • Inspect coverage gaps after an MCP-triggered test run
  • Apply Ruff fixes and run supporting static-analysis checks
  • Review structured quality results within an AI coding workflow

Key features

  • Scoped operations within a specified project directory
  • Pylint and pytest execution with configurable arguments
  • Coverage summaries and saved-run analysis
  • Automatic directory detection from pyproject.toml
  • Ruff, mypy, Bandit, Vulture, and Deptry checks
  • Structured logging for tool calls and results

Tools2

What MCP Tools Py lets your agent do. Expand a tool for its parameters.

Self-reported~71 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

9/9 checks healthy over the last 37d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · mcp-tools-py (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars21Stargazers on the source repository.
Last commit5d agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Tools exposed2Callable tools this server registers over MCP.

How MCP Tools Py works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Tools Py

mcp-tools-py is an MCP server that connects AI assistants to Python project directories for controlled code-quality work. Its main tools run Pylint and pytest, with support for coverage, formatting, Ruff, mypy, Bandit, Vulture, and Deptry checks, returning structured results for analysis and follow-up fixes.

Use the project's client configuration for an MCP-compatible client such as Claude Desktop or VS Code with GitHub Copilot. Project behavior is configured through pyproject.toml where supported, while pytest worker settings can be placed in ~/.mcp_coder/config.toml.

Cursor is not identified as a supported client in the available project description. The documented client examples are Claude Desktop and VS Code with GitHub Copilot, along with other MCP-compatible clients.

Yes, pytest runs can enable coverage and return a digest containing totals, package results, missing-code rankings, uncovered modules, and the test selection used. The project's environment must have pytest-cov installed.

It can derive source and test directories from pyproject.toml when target directories are omitted. Package discovery settings provide source locations, pytest testpaths provide test locations, and src and tests are fallback directories; explicit lists override detection.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Tools Py AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-tools-py?style=directory)](https://allmcps.com/mcp/mcp-tools-py)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-tools-py"><img src="https://allmcps.com/api/badge/mcp-tools-py?style=directory" alt="MCP Tools Py on AllMCPs" /></a>