Why does the CodeHealth™ MCP Server need to run locally?
The CodeHealth™ MCP Server runs its analysis inside the MCP server itself. It does so by asking the LLM to provide it with a path to a file, which the CodeHealth MCP Server will then read and analyze, resulting in the code review being given back to the LLM for interpretation.
The only AI token cost here then is for the path of the file and for the code review itself, both rather small.
If we wanted to run the CodeHealth MCP Server remotely such that it would not be on the developer's machine, this wouldn’t work, because the server would not have access to the file the developer is working on to be able to read it, and we’d need to transfer the entire file content as a text string over JSON-RPC to the server instead.
This has the negative consequence of being extremely expensive, because instead of paying for the tokens of the file path, you now pay for the tokens of the entire file. In addition, if the file content exceeds the LLM context space, the review will fail because the file content simply does not fit inside the LLM context space, which it needs to fit in, in order to be sent to the server over JSON-RPC.
While the basic Code Health review itself would technically function remotely, even if very expensive and failing for very large files, we also have delta analysis tools like analyze_change_set and pre_commit_code_health_safeguard which require access to the git repository for historical file data and data in other branches, and those tools would not work at all in a remote MCP server with no access to the developer's file system and git repository.
These reasons are why we’ve decided to have the file reading done by the CodeHealth MCP Server itself, not the LLM, and why the CodeHealth MCP Server needs to run where the files themselves are.
Was this helpful?
Still need help? Ask the team