Everyone in the software industry "knows" that code quality matters. But knowing in quotes isn't the same as knowing with data.
Before we built the CodeHealth MCP Server, we spent years building and validating the metric it runs on. That research is peer-reviewed, published at the International Conference on Technical Debt, and based on 39 proprietary production codebases across industries as varied as retail, finance, construction, and infrastructure, covering 40,000 source code modules in 14 programming languages.
CodeHealth MCP Server by CodeScene
Another interesting use case with the CodeHealth MCP that we can dig deeper into is the ROI-calculation.
This ROI calculation is built-in to the MCP via the tool code_health_refactoring_business_case
It uses our validated statistical model and industry benchmarks to translate how improving code health translates into faster development speed and fewer defects. This makes it easier to justify the refactoring investments to stakeholders!
What are your thoughts?
@adam_tornhill_cs anything that I forget to mention?
CodeHealth MCP Server by CodeScene
@romanela_p The built-in ROI calculation is powerful. Refactoring might be a hard sell to a PO/PM who's busy with new features. The ROI calculation puts a business value on refactoring.
And yes, it's based on CodeScene's peer-reviewed research where we developed a statistical model for translating Code Health deltas into business impact: faster and/or better.
CodeHealth MCP Server by CodeScene
@romanela_p One of the shortcomings of many engineers is that they struggle with quantifying important engineering aspects into business impact and thus often fail to convince their managers to green light some important refactoring work. The CodeHealth MCP's code_health_refactoring_business_case tool solves that problem entirely.
CodeHealth MCP Server by CodeScene
A lot of developers have a negative view of AI assisted or generated code, because they tried it out at one point and it created what would be best described as low quality slop, making the job of the developer one of a glorified AI slop cleanup specialist. Nobody likes doing that, so they stopped using AI or formed a very negative view of it. I've been there myself, too.
With the CodeHealth MCP though, you can have a deterministic feedback loop for AI which makes AI self-correct the slop it creates, allowing you to think holistically about your task at hand without having to deal with cleaning up bad AI generated code.
I consider myself a fairly decent software engineer, but not only can the CodeHealth MCP remove the slop cleaning part of my agentic workflow, it also allows me to create better code than I did before, and I think my code pre-AI was already fairly decent, so that's saying something. I truly cannot envision doing agentic programming without CodeHealth MCP anymore. It's either that or I'd much rather write code without AI again.
Do you have similar experiences?
CodeHealth MCP Server by CodeScene
@askonmm Totally agree, it's underrated. The "asking an LLM if LLM code is good" loop has some obvious blind spots.
deterministic feedback as the loop is the part that catches my eye â most coding agents just churn until tests pass. does CodeHealth surface the signal as a tool call result, or does it slot in as a pre-commit gate?
CodeHealth MCP Server by CodeScene
@tijogaucher You can use it as both, really. In agentic programming you can instruct the agent to run a pre commit code health safeguard tool before committing, and you can instruct it to run the analyze change set tool before pushing, while using the code health review tool during iterations. This ensures code health is always checked throughout the entire flow.
Code health metrics are crucial for maintainability. I'm curious how this integrates with existing CI/CD pipelines. Does it require specific build tools or can it work with any project structure?
CodeHealth MCP Server by CodeScene
@chen_amber It uses static analysis for its work so the build tools of your project do not matter at all and it can work with any project structure.
We have many non-engineers on our team, and they have started using AI agents to develop various tools. Whilst this is wonderful, we often find ourselves wondering whether it is appropriate to release these tools to the public. When we look at the actual products they have developed, they work perfectly well, but the database structure is a messâit looks as though it has been cobbled together bit by bit.
Even if we ask engineers to review them, they are often too busy to find the time. In such situations, I believe CodeHealth MCP is a tool that can step in to perform reviews on behalf of engineers and help resolve these issues.
CodeHealth MCP Server by CodeScene
@yoshinaga I have a non-technical friend who has managed to create entire SaaS mini-apps for his business using the CodeHealth MCP in combination with a few other tricks such as instructing the AI to create tests and ensure high test coverage in the `AGENTS.md` file. Cool thing about that is that they don't have to understand what any of this means - just set it up once and they can prompt away towards their goals, and have vastly reduced chance of defects. Of course, using a frontier model like Opus 4.6+ also helps, but the CodeHealth MCP keeps the code health in check and doesn't let it snowball into chaos.
@askonmm I believe this MCP is well-suited to the coming era, where even non-engineers will be able to bring their ideas to fruition on their own, provided they have the right concept.
I do have one question, though. At our company, even our engineers include âeverything-claude-codeâ and âskills/mattpocockâ in Claude Codeâwhat is the main difference between these skills and the ones mentioned here?
CodeHealth MCP Server by CodeScene
@yoshinaga Main difference is in breath of the instructions used. Developers will add lots of middleman tooling to make sure AI works the way they want, but it might not make sense to do so for a non technical person who lacks the tooling know-how, so it's best to keep it simple. Make sure the code health is good, make the the logic is covered with tests. That alone goes a long way. After all, the things that non technical people make rarely are supposed to go to production anyway, because at that point you should need the judgement of a professional engineer, but for mini-apps for internal consumption or for themselves, it works well enough.
@askonmm Itâs certainly wonderful that it manages to achieve so much whilst remaining so simple. Iâm looking forward to seeing how it develops!
Hi PH! I'm Adna, Developer Advocate at CodeScene.
I tested Claude, Copilot, and Cursor on the same legacy file and ended up with the same result: all three passed tests and all three made the code worse - and it happened silently, with no signal telling them they had.
The problem isn't the model. It's that agents have no idea which parts of a codebase are already load-bearing and fragile. They write confidently into broken areas because nothing stops them.
With the MCP Server in the loop: same file, same task, 4.82 â 9.1. Iteratively. The agent verified the delta after each step before moving on. That behavioral shift, knowing where not to be reckless, is what actually changed. Server runs locally, is model-agnostic, and finally, no code leaves your machine.
Happy to answer anything - especially if you've hit this problem yourself: how are you currently catching structural degradation in agent-assisted workflows?
DiffSense
Cool! is it like SonarQube but as an MCP?
CodeHealth MCP Server by CodeScene
@conduit_design It's CodeScene analysis tools as an MCP, which works in the same space as SonarQube. It can help you do code health reviews, uplifting of unhealthy code and safeguarding AI generated code. Is there a specific use case you're interested in?
CodeHealth MCP Server by CodeScene
@conduit_design Thanks and lot, André!
CodeScene's MCP is based on the Code Health metric. It's the only validated code-level metric with a proven impact in terms of faster (shorter lead times) and better (fewer defects).
Compared to linting aggregators like SonarQube, Code Health works at a higher level. Think of linters like the line-by-line commenting whereas Code Health checks the design and structure of the code to guide agents.
Does that help explaining the difference?
DiffSense
@adam_tornhill_cs SonarQube is not a linter. its a: static code analysis platform that scans source code across 35+ languages to detect bugs, vulnerabilities, code smells, duplication, coverage gaps, and technical debt. My question is. How is code health metric different? Im very into this right now, so im genuinly interested in finding out. Thanks.
CodeHealth MCP Server by CodeScene
@adam_tornhill_cs @conduit_design We have a very in-depth explanation of our CodeHealth metric available here: https://codescene.io/docs/guides/technical/code-health.html#code-health-identifies-factors-known-to-impact-maintenance-costs-and-delivery-risks. There's a lot of overlap between what CodeScene does and what SonarQube does, but our analysis is validated by academic research, viewable here: https://codescene.com/hubfs/web_docs/Business-impact-of-code-quality.pdf. We've also written more about how we fair against SonarQube here: https://codescene.com/blog/6x-improvement-over-sonarqube.
Does this clear up the similarities and differences between the two?
DiffSense
@adam_tornhill_cs @askonmm That article doesnt read well. It bashes sonarqube. the industry standard without proof. It does not go into details on how codeScene is better. what particular thing makes it better? Like show benchmarks. Show examples. For instance do a case study on a popular code repo, and do head to head compare with SonarQube. Im all for trying something better than SonarQube, but prove it. Dont just say it. you know what I mean? Proof is in the pudding as they say. Also some more details into how CodeScene does things. Is it all AI? or is there heuristics, or is there some exotic engines that run this. If its AI, then its only as good as the guardrails it uses. Some insight into these things would be great and bring a lot of credability and lower friction to adoption. Full disclosure. I run SonarCube on local runners with lots of customizations added on top, and its fantastic. Also big fan of Codebeat.io but they kinda dropped of a while ago. Anyways. great space! this is the new battlefield. when AI writes all our code, the output is only as good as whatever keeps it in line. # my 2 cents