About ruff-lint-x402
ruff-lint-x402 is an MCP server that lets AI agents lint Python code with ruff. It analyzes code without executing it and charges $0.005 USDC per call through x402 on Base.
Key features
- 01Lint Python with ruff
- 02Return diagnostics and fix hints
- 03Static analysis without code execution
- 04Pay per call using x402
Use cases
- 01Check generated Python before sharing it
- 02Identify lint issues during agent coding
- 03Review code without running it
MCP support
It exposes the `lint_python` tool to MCP clients. Calls are paid through x402 on Base; an MCP client configuration uses a wallet private key.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y @divine-software-creations/ruff-lint-x402-mcpEVM_PRIVATE_KEYSecretPrivate key of a Base wallet with USDC used to pay per callLocal servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMERuff Python Lint API — pay-per-call for AI agents (MCP + x402)
Give any AI agent instant Python linting with ruff. No signup, no API key, no subscription: $0.005 USDC per call, paid automatically over x402 on Base.
- ⚡ Fast: ruff-powered, results in milliseconds
- 🔒 Safe: code is statically analyzed, never executed
- 🤖 Agent-native: MCP tool
lint_pythonfor Claude, Cursor, Windsurf, Gemini/Antigravity and any MCP client - 💸 Pay only for what you use; the facilitator covers gas, so your wallet only needs USDC
Landing page: https://stevensaavedra.com/lint · API: POST https://api.stevensaavedra.com/lint · Verified on PayAPI Market
MCP install
{
"mcpServers": {
"ruff-lint": {
"command": "npx",
"args": ["-y", "@divine-software-creations/ruff-lint-x402-mcp"],
"env": { "EVM_PRIVATE_KEY": "0x<key of a Base wallet holding a little USDC>" }
}
}
}
Use a dedicated low-balance wallet. $1 of USDC covers 200 lint calls.
Direct HTTP (x402)
curl -i -X POST https://api.stevensaavedra.com/lint \
-H 'content-type: application/json' \
-d '{"code":"import os\nx = 1","language":"python"}'
# -> 402 Payment Required with x402 payment requirements.
# Any x402 client (e.g. @x402/fetch) pays and retries automatically.
Tool
lint_python({ code: string (≤200KB), filename?: string }) → ruff diagnostics (rule code, message, line/column, fix hints).
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.