Dev.to AI 🤖 Ai 👁 0 📖 2 min read

Your backend can be an MCP server — and it doesn't need a second process

AI tools want to call your backend. That's the whole idea behind the Model Context Protocol: an AI client talks to an MCP server, and the server exposes tools — look up an order, create a record, run a job, check a statu

AI tools want to call your backend. That's the whole idea behind the Model Context Protocol: an AI client talks to an MCP server, and the server exposes tools — look up an order, create a record, run a job, check a status.

The usual way to get there is to stand up a second service. Your API stays where it is, and next to it you build an MCP server that reaches into the same database, re-implements the same auth checks, and duplicates the same business logic in a thinner wrapper. Two things to deploy. Two things to keep in sync. Two log streams to read at 2am when something disagrees with itself.

Yatta JS 1.0.5 takes the other route. It ships an embedded MCP server — yatta/mcp — inside the same Bun process that already runs your database, auth, mail, storage, realtime, and jobs.

That matters because the backend and the MCP server stop being two systems that have to agree. They're one process:

  • The tools an AI client calls read from the same built-in database your API reads from. There is no second copy of the data to drift.
  • The auth that already guards your API guards the tools too. Nothing gets a back door because the MCP layer forgot a check the API remembered.
  • A job an AI client triggers is the same durable job queue your app already uses — not a fire-and-forget side channel.

None of this is a chatbot, and Yatta JS isn't trying to be one. It's a backend-as-a-server: one process that runs the whole backend. The MCP module just means that one process can now speak the protocol AI tools already speak, instead of you building a translator service next to it.

The install is still the same:

npm i yatta.js

Docs: https://yatta.js.org — Code: https://github.com/psrockstar098/yatta.js

If your backend is already one process, letting AI tools talk to it shouldn't take a second one. What would you let an AI client do against your backend first — read, or act?

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.