
Your REST API is already an MCP server. You just haven't shipped it yet
Table of Contents
Why I bothered
KIT.domains is a domain, SSL and DNS monitoring SaaS for MSPs, built on Symfony. It already had a public REST API with an OpenAPI 3.0 spec. Turning that into an MCP server was mostly a translation job, and the result is that customers can now ask Claude or Cursor "which of my domains have SSL expiring this month?" instead of opening a dashboard.
For a solo founder the math is simple. The API is the hard part and it was done. The MCP layer is thin, it reuses the existing auth and permissions, and it gives the product a feature I haven't seen in other domain monitoring tools yet. I wrote it with Claude Code, which felt appropriate.
Architecture: a thin layer, no new auth
The MCP server is a small Node.js service hosted at mcp.kit.domains, speaking MCP over HTTP. It does not touch the database. Every tool call becomes a request to the existing Symfony API at api.kit.domains, with the user's own kitd_ token passed straight through.
AI client (Claude, Cursor)
| MCP over HTTP, Bearer kitd_ token
v
mcp.kit.domains (Node.js, no database access)
| same token, passed through unchanged
v
api.kit.domains (Symfony REST API)
That one decision removed most of the work. There is no second auth system, no OAuth dance, no new permission model. The API already knows the token's plan, which domains a team member is allowed to see, and how often a domain can be refreshed. The MCP server inherits all of it for free, and a bug in the MCP layer cannot leak more than the API would.
Connecting is a single line for the user:
claude mcp add --transport http kit-domains \
https://mcp.kit.domains \
--header "Authorization: Bearer kitd_your_token_here"
Tools: one per endpoint, verbs in the name
The API has 20 endpoints across five groups, and the MCP server exposes exactly 20 tools. I kept the mapping 1:1 on purpose. It keeps the server boring, it makes the API reference the documentation for every tool, and nothing in the MCP layer can drift from what the API actually does.
| Group | Tools |
|---|---|
| Account | get_account |
| Domains | list_domains, get_domain, add_domain, add_domains, update_domain, refresh_domain, get_domain_ssl, delete_domain |
| Clients | list_clients, get_client, create_client, update_client, delete_client |
| Incidents | list_incidents, get_incident, acknowledge_incident, list_domain_incidents |
| DNS | list_dns_changes, acknowledge_dns_change |
Two small things mattered more than I expected:
- Names are verb_noun. Models pick tools by name first.
list_incidentsvslist_domain_incidentsis unambiguous; a genericincidentstool with a mode flag would not be. - Hints on every tool. Read-only tools are marked as read-only, and
delete_domainanddelete_clientare marked destructive. Clients like Claude use those hints to ask the user before running a destructive call, so I didn't have to build any confirmation flow myself.
The real work: descriptions written for the model
The code was the easy part. The part that decided whether answers were correct was the tool descriptions. An API reference is written for a developer who reads the whole page. A model reads one paragraph, calls the tool, and then explains the result to a human. If the paragraph leaves out a trap, the model walks into it and reports the wrong thing with full confidence.
KIT.domains has three such traps, and each one now lives in a tool description.
Partial visibility. An invited team member only sees the domains they are responsible for. So a member's token can return a small slice of a much larger account. The list_domains description says so, and tells the model to mention it whenever it reports a count. Without that line, "you have N domains" is a confident lie.
Quota vs count. For the same reason, domains_count from get_account only covers domains visible to the token. The description tells the model to use domains_remaining for any "how many more can I add" question.
History windows. Resolved incidents older than the plan's history window are hidden: 30 days on Starter, 90 on Pro, 360 on Business. The list_incidents description spells this out, and says that an empty result does not prove nothing happened in that period.
The pattern is the same in all three: describe what the data does not show, and tell the model what to say about it.
NOTE
A rule of thumb I'd use for any MCP server: every time you would add a footnote to the docs, it belongs in the tool description instead.
What it looks like in use
I pointed Claude at my own account, 150 monitored domains, and asked: "Which domains or SSL certificates expire in the next 30 days?"
Claude called list_domains twice (the API pages at 100), filtered on days_left for both the registration and the certificate, and returned eight items: three certificates expiring in 12 to 22 days, three registrations expiring in 15 to 23 days, and two domains already expired. Then it noticed something I hadn't asked about: one domain expiring in 19 days already fails its SSL handshake, so it is likely broken before the renewal is even due.
No new endpoint was needed for any of that. The "expiring soon" view is something the model builds on the fly from data the API already returns. I wrote up the full results on the KIT.domains blog.
If you have a REST API, do this
- Put the MCP server in front of the API, not next to the database. Pass the user's token through and let the API enforce everything it already enforces.
- Map tools 1:1 to endpoints and name them verb_noun. Resist the urge to invent "smart" composite tools; the model composes better than you think.
- Mark read-only and destructive tools. You get confirmation prompts for free.
- Spend your time on descriptions. Every caveat a developer would find in a footnote has to be in the description, along with what the model should say about it.
- Host it, so connecting is one URL and a header, not a package to install.
Conclusion
If your product already has a REST API, most of an MCP server is done. Put a thin layer in front of the API, reuse its auth, keep tools 1:1 with endpoints, and spend the real effort on descriptions that tell the model what the data does not show.
The KIT.domains MCP guide has the full tool list and client configs, and the API reference shows the endpoints underneath. API and MCP access are part of the Pro and Business plans.