# REST API vs MCP tools: why we made them peers

> REST API vs MCP tools: REST is for scripts you write, MCP for a model that picks its own calls. We counted 175 routes against 122 tools and closed the gap.

Source: https://mosaicbrowser.com/blog/rest-and-mcp-peers

## 175 routes and 122 tools: making REST and MCP peers

REST API vs MCP tools: REST is for scripts you write, MCP for a model that picks its own calls. We counted 175 routes against 122 tools and closed the gap.

![REST versus MCP, each name in its own tile: Anything one can do, the other must](https://mosaicbrowser.com/covers/rest-and-mcp-peers.webp)

REST API vs MCP tools comes down to who is calling. A REST API is for a program you wrote, calling addresses in the order you chose. MCP tools are for a model that reads a list of named actions and decides which to call. What each can do is not part of the difference. So in Mosaic we hold them to one rule: anything one can do, the other must. The first time we measured that rule, it was false by 53 routes.

## The measurement

The rule had been in the first paragraph of our project notes for months: the interface, the REST API and MCP are three doors to one store, and they are peers. Nobody had counted. When we wrote a script that did, it printed **175 REST routes against 122 MCP tools**.

The gaps were not obscure corners:

- A profile's cookie jar had no tool at all. An assistant could create a profile and never see or import its cookies.
- A saved proxy could be added over MCP and never edited or deleted.
- Of twenty settings, exactly one was reachable.
- A saved credential could be added and never changed or removed.

None of this was a design decision. The REST API had grown a route at a time as the window needed one, and MCP had grown a tool at a time when someone thought of it. The REST side grew faster, and the difference was only visible to a caller who tried the missing thing.

## REST API vs MCP tools, as we build them

The two doors differ in what the caller needs from each response. A script knows what it asked for, so a REST route can answer tersely and return `404` for a missing id. A model has only the tool's description and its input schema, and nobody to ask what was meant, so every MCP refusal names the field and lists the right ones. We wrote up what that took in [a tool schema that advertised a field its validator refused](https://mosaicbrowser.com/blog/mcp-schema-lies).

What they must not differ in is what they can do, or the rules they enforce. A rule checked at one door is enforced at none, because a caller simply uses the other door. So the rules live in the store method both doors call, and the doors only translate.

Mosaic is a desktop app

Email yourself the link and open it on your computer.

[How it works: REST API](https://mosaicbrowser.com/features/rest-api)

## The check: every route mapped by hand

`check:surface-parity` reads every route registered in `server.ts` and every tool in `mcp.ts`. Each route must be either **mapped** to the tool that does the same job, or **exempt** with a written reason. Anything else fails the build, which turns "add the tool too" from a habit into a requirement.

The mapping is a table, written by hand on purpose. `POST /profiles/:id/stop` and `stop_profile` share no substring worth matching on, and a check that guessed could be satisfied by renaming things. Several routes may share a tool where they are one capability spelt two ways in HTTP: `POST /downloads/clear` and `DELETE /downloads/:profileId` both map to `clear_downloads`.

An exemption may say only that the capability cannot exist on a tool surface. Three routes had one when we last counted:

- `GET /health`, because a tool call that returned it would already have proved it.
- `GET /events`, a Server-Sent Events stream held open for the life of the connection. MCP is request and response; the buffered history of that stream is the `api_activity` tool, which exists.
- `POST /mcp/restart`, because a tool on that server cannot survive its own call.

"Nobody has asked for it" is not on the list. That reason is the gap the check exists to find.

![Mosaic's API keys screen: one key per script or tool, each revocable on its own](https://mosaicbrowser.com/shots/api-keys.png)
*One key per caller, the same key on both doors*

## Closing it

Twenty-eight tools arrived together to close the gap. A tool whose handler throws on its first real call looks exactly like a working one until something calls it, and on a surface an assistant drives unattended, the first to find out is whoever it fails in front of. So `check:mcp-reach` calls each of them against a temporary library and asserts the effect, not only the absence of an exception. On its first run it found `update_proxy` advertising a field its own validator refused.

The gap ran the other way too. Eleven tab tools, `list_tabs`, `read_page`, `click_element`, `watch_network` and seven more, existed only over MCP, so a capability an assistant could reach was one no script could. They now go through one implementation, `engine/page-api.ts`, which `server.ts` and `mcp.ts` both call, and each has a documented route.

On 3 November 2026 the check printed 194 REST routes, every one reaching a tool among 168, with those three exempt.

## What a name cannot prove

The check holds that a tool with the right name is there. It cannot hold what the tool does. Our table mapped `POST /profiles/bulk/move` to `bulk_update_profiles`, and the check passed, because that tool exists. It also refuses a `projectId` by name, so for as long as projects had existed, MCP could not move a profile between them, behind a green check. A separate check that calls the handler found it, and that story has its own post.

If you are choosing between the two for your own work: REST from a script or a scheduler, where you decide the steps, and MCP when an assistant decides them. The routes are listed on [the REST API page](https://mosaicbrowser.com/features/rest-api), and [running Mosaic from a local API](https://mosaicbrowser.com/guides/anti-detect-browser-local-api) has the first calls to make. Both doors need an API key and are part of Pro; the tools an assistant gets are on [the MCP server page](https://mosaicbrowser.com/features/mcp-server).

## Questions

### What is the difference between a REST API and MCP tools?

A REST API is a set of addresses a program you wrote calls in an order you chose. MCP tools are named actions with a published input schema that an AI model reads and decides to call itself. In Mosaic both sit over the same store and the same rules.

### Does Mosaic's MCP server do everything the REST API does?

It is held to that by a build check. Every REST route is mapped by hand to the MCP tool that does the same job, or carries a reason the capability cannot exist on a tool surface. Three routes have one: the health check, the event stream and restarting the MCP server itself.

### Which should I use, the REST API or MCP?

Use REST from a script or a scheduler, where you decide the steps. Use MCP when an AI assistant decides the steps. Both need an API key, and both are part of Pro.

### Why not generate the MCP tools from the REST routes?

A route and its tool often share no name worth matching, such as POST /profiles/:id/stop and stop_profile, and a tool needs a description written for a model. The mapping is kept by hand and checked by a script.

## Related

[Anti-detect browser REST API: profiles from your scripts](https://mosaicbrowser.com/features/rest-api): Mosaic's anti-detect browser REST API runs on 127.0.0.1 with API keys. Create and start profiles, then attach Puppeteer or Playwright over CDP.

[An anti-detect browser MCP server for your AI assistant](https://mosaicbrowser.com/features/mcp-server): Mosaic's anti-detect browser MCP server lets Claude or any MCP client create, launch and drive your profiles. 150+ tools, off by default, key-gated.

[A tool schema that advertised a field its validator refused](https://mosaicbrowser.com/blog/mcp-schema-lies): MCP tool input schema validation, from our own bug: a proxy tool offered a label field, then refused it with a 400. The check that caught it reads the schema.

[Anti-detect browser local API: what it is and what to check](https://mosaicbrowser.com/guides/anti-detect-browser-local-api): An anti-detect browser local API is an HTTP server on 127.0.0.1 that creates, starts and stops profiles and hands your script a DevTools endpoint.

[Letting an AI assistant run browser profiles over MCP](https://mosaicbrowser.com/blog/ai-assistant-runs-profiles): Mosaic's MCP server lets Claude or any MCP client create, start and drive browser profiles. Three faults we found when a model was the caller.







[A 200 that did nothing is the worst answer an API can give](https://mosaicbrowser.com/blog/a-200-that-did-nothing): Our first API answered 200 to a misspelt field, a port of 70000 and a delete of nothing. Eight requests we measured, and the three rules that fixed them.

## Mosaic, on your own computer

The browser this blog is about: its own Chromium, fingerprints from real machines and a proxy IP per profile. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

Mosaic is a desktop app

Email yourself the link and open it on your computer.
