Quickstart¶
Who this page is for: someone who wants to see mcpolish do something useful in under a minute.
What you will learn¶
- How to install mcpolish.
- How to run your first lint.
- How to read the score.
Background¶
mcpolish is a CLI that reads your MCP server source code and reports problems with your tool definitions. You point it at a file or a folder and it prints diagnostics.
Step by step¶
1. Install¶
2. Lint a known-good example shipped with mcpolish¶
Clone the repo so you have the example files:
git clone https://github.com/vtensor/mcpolish.git
cd mcpolish
mcpolish lint examples/clean_server.py
Expected output:
A score of 100/100 means every rule passed.
3. Lint a deliberately-broken example¶
This file is hand-crafted to fail every rule. The output is long. Look at the end:
The --fail-on never flag tells mcpolish to always exit 0, even when there are errors. Without it, the command would exit with code 1, which is what you want in CI.
4. Lint your own server¶
Replace the path with your file or folder:
mcpolish accepts a single file or a folder. If you give it a folder, it walks every .py file inside and finds tools wherever they live.
5. Get just the score¶
Prints a single number. Useful for shell scripts and badges.
Common variations¶
If you have a TypeScript MCP server, mcpolish does not lint TypeScript yet (this is on the roadmap). It only reads Python.
If your project uses a config file already, mcpolish reads [tool.mcpolish] from pyproject.toml automatically. You do not need any flags.
Troubleshooting¶
mcpolish: command not found. See the installation troubleshooting section.
server: unknown (0 tools in 0 files). mcpolish found no tools in the path you gave it. Check that the file actually uses @mcp.tool(), Tool(...), or server.add_tool(...). mcpolish only finds tools registered via those three patterns.
You see no diagnostics but you know your code has issues. mcpolish only flags things it knows how to recognise. If the issue is in code behaviour rather than the tool description, mcpolish will not see it.
See also¶
- Your first lint: a longer walkthrough on a real example.
- Understanding the output: what every line of the output means.
- Rules index: every rule mcpolish knows about.