Labsco
MCP SERVER

MCP Pyrefly

by kimasplund

Have Python checked as it is written — the types, and whether the name being used is the one that was defined earlier.

Automated Testing & QA
Summary
Errors caught while the code is being written, including the ones a type checker alone would miss.

The type checking is Pyrefly's; what this adds is a session memory of the identifiers already used, so the drift that normally surfaces at import time is caught where it is introduced. Its replies are wrapped in a deliberate reward-and-streak layer aimed at keeping an agent fixing errors until none are left.

What it is

A type-checking server built on Pyrefly. Code is passed in and comes back with errors and suggested fixes, and it keeps a record of the identifiers seen so far in the session, so drift between getUserData and get_user_data is caught rather than shipped.

What you get
  • Type errors from Pyrefly, a static type checker for Python
  • Naming inconsistencies flagged across edits — an identifier that changed shape between one file and the next
  • Suggested fixes attached to common errors, not only the location of the failure
  • Related files taken into account, so the check runs against context rather than an isolated snippet
  • A session memory of the identifiers already used, which is what makes the consistency check possible
Requirements

Pyrefly does the analysis locally. Code is passed to the server rather than read out of a repository, so any related files you want considered have to be handed over with it.