← Back to R&D
Architecture

Borrowing the User's Own Model Instead of Hosting One

Hacroo Technologies · 4 min read

Our MCP (Model Context Protocol) server lets Claude Desktop and Claude Code use Gydmation AI as a set of tools — search nodes, generate, validate, deploy, self-heal — directly from a natural-language conversation. The interesting design decision was where the actual language model comes from for the "generate" and "fix" steps.

Sampling instead of a hosted model

Rather than requiring our own hosted model or a separate API key, we use MCP's sampling capability: the tool asks the connected client to run the completion using the model the user is already signed into, then falls back to a configured API key only if the client doesn't support that.

1
Tool call arrives
Via Claude Desktop or Claude Code
2
Request sampling
Ask the connected client's own model
3
Fallback if unsupported
Configured API key, only if needed
4
Result returns
Nothing routed through our servers

The same principle, applied one layer deeper

The practical effect: generation can run on infrastructure the user already has, with nothing extra to configure and nothing routed through us — the same local-first principle behind self-hosting the product itself, applied to the model layer too.

More R&D

Want to see this working, not just described?