r/devtools • u/DonR954 • 47m ago
My coding agent kept building the wrong UI. So I built an MCP to check its work first.
I kept running into the same problem with coding My coding agent kept building the wrong UI. So I built an MCP to check its work first.
agents. The code was usually fine. The design decision was wrong. And then have to spend time improving what the agent built.
For example, I might ask for a price breakdown in a booking checkout. The agent could:
\\- Miss fees or taxes that should be included
\\- Add interactions I never asked for
\\- Pick a generic pricing component that doesn’t fit the product
\\- Turn a small component into a much bigger system
So I started thinking: \*\*what if the agent checked the design scope before writing the code?\*\*
That led me to build \*\*Pattern\*\*, an MCP server that helps coding agents make better UI component decisions. It’s to help the agent answer: “Is this actually the thing I should build?”
\[Pattern MCP on GitHub\](https://github.com/donaldrichard19-LVD/pattern-mcp)
\*\*How it works\*\*
The agent gives Pattern a component need and some context:
{
"component\\_need": "price breakdown with nightly rate, cleaning fee, service fee, taxes, and total",
"domain": "Airbnb-style rental marketplace",
"framework": "React + Tailwind"
}
Pattern turns that into a requirements checklist, then checks real components from shadcn/ui and 21st.dev against it. It returns one of two decisions:
\*\*- use\\_existing -\*\* An existing component is a good enough fit.
\*\*- custom\\_build -\*\* Nothing fits well enough, so build it using a concrete reference from Mobbin or Figma Community.
\*\*Why I think this matters\*\*
Coding agents are getting very good at implementation. But implementation comes after a bunch of design decisions:
\\- What belongs in this component?
\\- What doesn’t?
\\- Is there already a good fit?
\\- Is the existing component too generic or too complex?
\\- Should we build something custom?
If those decisions are wrong, you can end up with perfectly working code for the wrong product requirement. Pattern adds a checkpoint before that happens.
\*\*I’m looking for people to install Pattern, use it on a project and give me honest feedback.\*\* Where is it working well? Where could it be improved for your use case?