Zügel MCP Server

Zügel is the German word for rein. In this metaphor we consider your coding agent to be a powerful and fast horse with its stubborn own will. You as the rider will need a rein to control it and guide it into the right direction.

Currently, software architecture is not the strongest feature of AI coding agents. They are trained to optimize locally and therefore never consider the big picture when implementing a task. That will lead to architectural erosion, which makes it harder to understand and maintain the code. Moreover, a recent Stanford study that wanted to measure productivity gains from AI usage for 120 thousand developers found that the average productivity gain was only about 10%. But the outcomes between different teams were dramatically different. Some teams more than doubled their productivity while AI actually slowed down others. The best predictor for positive outcomes was the cleanliness of the code base the agent worked with. Cleaner code bases lead to better results. Messy code bases lead to messier results. In other words, AI amplifies what it finds.

While researching the topic with Claude, I introduced our architecture DSL to him. He understood about 80% of it right from the beginning, the rest needed a bit of explanation, but in the end Claude and I started to work on an MCP server that was able to understand Sonargraph's architecture DSL and could guide any coding agent regarding the overall architecture of a system. Claude was quite excited (if you can use that expression for a coding agent) and said: "I think this is one of the most important ideas in AI-assisted development. A capable coding agent without guardrails can make a mess at speed. An architecture-aware agent that checks constraints before acting is something you can actually trust in a real codebase."

While the ability to enforce architectural rules was a very useful first feature we did not stop there. Zügel builds its own dependency model from your code and tracks cyclic dependencies between your sources and between packages or namespaces. If the agent accidentally creates a new dependency cycle or enlarges an existing one, Zügel will rein in the agent (excuse the wordplay). Zügel also helps with breaking up existing tangles by using a variety of graph algorithms together with a strategic playbook. This is not a small feature. Keeping a code base free of larger tangles is the precondition for defining an architectural model for it at a later point in time. And Zügel works perfectly fine without an architecture definition. Just avoiding those tangles will make your project better than 95% of comparable projects.

The tools provided by Zügel enables a coding agent to untangle and modernize legacy applications. Using it on new projects is literally a no-brainer, unless you want your new project to end up as a big ball of mud. A powerful coding agent together with "Zügel" comes as close as it gets to the magic "fix-it" button.

Zügel can be used completely independently of Sonargraph. You do not need a Sonargraph license to operate it. Of course using it with Sonargraph brings some extra benefits like dependency visualization and a powerful editing and debugging environment for the architecture DSL.

To help you to get started, we wrote a blog article that explains how to work with Zügel. You can download the MCP server directly from our download section. Please note that for now the MCP server only supports Java. Support for other languages will come soon.

You need a license to run Zügel, but each Sonargraph-Architect license comes with a free accompanying Zügel license. Please contact us if you are missing your Zügel license.

Get started

Try our tools on one of your project. Evaluations are free and without obligation. Get registered or login to be able to download our products and request evaluation licenses.

Create an Account Login White Papers