
On this page
- What is the difference between MCP, an API and a CLI for an agent?
- What do the published measurements say?
- Why do MCP tool definitions cost so many tokens, and what fixes it?
- Is MCP dead?
- Where do skills fit?
- What changes when the agent runs in the cloud?
- Which should a tool vendor ship?
- What else do people ask about MCP, APIs and CLIs?
- Is MCP an API?
- Is MCP the same as function calling?
- What is Code Mode for MCP?
- Should an agent use MCP or skills?
- What else does Revyl do?
- Beyond MCP, what else does Revyl run?
MCP vs API is a question of who discovers the operations: your code calls the API directly, while an MCP client asks a server which tools it offers. A CLI puts the same operations in the agent’s shell as commands. When one known caller always runs the same operation, call the API from a function the host already implements; when many agents need to find a service’s tools on their own, ship an MCP server or a CLI. The controlled studies we found compared MCP with a CLI, and neither won by default: a client that loads every MCP tool up front spends context on tool definitions, and a CLI needs a shell with the tool installed. Revyl, verification infrastructure for cloud agents, offers a CLI, an MCP server and an SDK, so an agent can start an iOS simulator, Android emulator or web browser in the cloud and check its change on the running application from whichever interface its client supports. We ran the CLI route on December 2, 2026, and the script is below.
What is the difference between MCP, an API and a CLI for an agent?
The API is the interface to the service. MCP and a CLI are two ways for an agent to reach it. The MCP project defines the Model Context Protocol as “an open-source standard for connecting AI applications to external systems” (MCP, Introduction). Cloudflare’s engineers note that almost every MCP server wraps an existing API. What MCP adds, in their words, is that it “provides a uniform way to connect to and learn about an API” (Cloudflare, Code Mode).
Function calling is one way a model asks its host to act. OpenAI describes it as the way its models interface with external systems and reach data outside their training data (OpenAI, Function calling), and it offers remote MCP servers in addition to the tools you define with function calling (OpenAI, MCP and connectors).
To read a GitHub issue, your application can call the REST API’s “Get an issue” endpoint directly (GitHub REST API, Issues). An MCP client can instead discover the issue_read tool on GitHub’s MCP server, which gets issue details, and ask the server to run it for the same issue (GitHub MCP server).
Code an agent writes can call MCP tools too. Cloudflare’s Code Mode post argues that “LLMs are better at writing code to call MCP, than at calling MCP directly” (Cloudflare), and Anthropic’s code execution approach is to “present MCP servers as code APIs rather than direct tool calls” (Anthropic, Code execution with MCP).
What do the published measurements say?
Scalekit and OpenRouter, both on GitHub tasks, found the CLI used far fewer tokens. The studies with other setups are mixed. These studies measured different tasks and costs:
Scalekit reports that every MCP failure in its run was a TCP-level timeout connecting to GitHub’s Copilot MCP server: “Not an MCP protocol error.” Scale Labs wrote: “Interface choice matters much less for the latest frontier models.” Cost per run flipped by model in their tests, with Opus 4.8 cheaper on MCP and GPT-5.5 cheaper on the CLI, and the authors add: “The difference appears to come from harness behavior rather than the interfaces themselves.” They also gave agents both interfaces at once: “Models almost always fell back to MCP and barely touched the CLI.” The arXiv paper separates the two on failed work: 12.9% of the money spent on MCP runs bought no completed work, against 2.2% on CLI runs. None of the five studies measured a direct API call as its own arm, so they don’t rank it against MCP or a CLI.
Zechner read his own tie as a verdict on server design. In his words, many MCP servers are “badly designed wrappers that dump unnecessary JSON everywhere” (Mario Zechner).
Why do MCP tool definitions cost so many tokens, and what fixes it?
OpenRouter puts it this way: “Every tool you give an agent sends its definition to the model on every request, and you pay for it as input tokens.” In its October 2026 runs, the GitHub MCP server’s 46 default tools added 19,436 tokens to every request on Claude Sonnet 5.5 (OpenRouter). In November 2025, Anthropic counted 58 tools from five servers at about 55,000 tokens before the conversation starts (Anthropic, Advanced tool use). Also in November 2025, Zechner measured Playwright MCP at 21 tools and 13,700 tokens, 6.8% of Claude’s context, and Chrome DevTools MCP at 26 tools and 18,000 tokens, 9.0% (Mario Zechner).
Results can cost as much as definitions. In OpenRouter’s runs, one result, GitHub’s release object, came to about 20,400 tokens, more than all 46 definitions together. Zechner highlights the cost of passing results through the model before saving or combining them.
Four ways to keep tool definitions and results out of the prompt:
- Tool search. Tool definitions marked as deferred load on demand, when the model searches for them. In November 2025, Anthropic reported MCP evaluation accuracy rising from 49% to 74% for Opus 4 and from 79.5% to 88.1% for Opus 4.5 with it (Anthropic). OpenRouter’s version cut the up-front cost of the 46 GitHub tools to under 600 tokens, and over the whole task it halved the cost on Sonnet 5.5 and raised it on Claude Haiku 5.5 (OpenRouter).
- Code execution. In Anthropic’s November 2025 worked example, usage fell from 150,000 tokens to 2,000 when the agent called MCP tools from code (Anthropic), and its Programmatic Tool Calling cut average usage from 43,588 to 27,297 tokens on complex research tasks (Anthropic).
- Code Mode on the server. Cloudflare’s February 2026 MCP server covers the entire Cloudflare API with two tools,
search()andexecute(), in about 1,000 tokens, where an equivalent server without Code Mode would use 1.17 million (Cloudflare). FastMCP 3.1 offers its own server-side Code Mode for FastMCP servers (Jeremiah Lowin). - Fewer tools. GitHub’s own README says “Enabling only the toolsets that you need can help the LLM with tool choice and reduce the context size” (GitHub). In November 2025, Speakeasy reported that dynamic toolsets used up to 160 times fewer tokens with 100% success, and runs took about 50% longer on average (Speakeasy).
Revyl’s local MCP server uses the fewer-tools approach. Run with no profile, revyl mcp serve registers the flat tool set; the dev, core and full tool profiles expose fewer, grouped tools (Revyl docs, MCP tools). The dev profile that the MCP setup recommends is the narrowest, and the docs point to the CLI or a broader profile for test, workflow and other management operations.
Is MCP dead?
The “MCP is dead” case is about coding agents that have a shell. Eric Holmes argues that those agents should use CLIs instead of MCP (Eric Holmes), and Simon Willison writes that “Almost everything I might achieve with an MCP can be handled by a CLI tool instead” (Simon Willison).
MCP belongs to the Agentic AI Foundation, a directed fund under the Linux Foundation co-founded by Anthropic, Block and OpenAI (Anthropic). Its first official extension, MCP Apps, lets a tool return interactive UI that renders in the conversation (MCP blog). The 2026-07-28 specification turned MCP from a stateful, two-way protocol into a stateless request and response protocol. Each request describes itself, so any server instance behind a plain round-robin load balancer can take it (MCP blog).
For a client without a shell, remote MCP gives a standard way to discover a service’s tools, and a host can also implement its own functions and return their results to the model (OpenAI, Function calling).
Where do skills fit?
A skill teaches the agent a workflow, and it can guide CLI use or MCP calls. Willison describes skills as “Markdown with a tiny bit of YAML metadata and some optional scripts”, and notes the mechanism “is entirely dependent on the model having access to a filesystem, tools to navigate it and the ability to execute commands in that environment” (Simon Willison).
Anthropic pairs skills with MCP: “MCP handles connectivity” and “Skills handle expertise” (Claude, Skills and MCP). The MCP project’s Skills extension lets an MCP server expose workflow instructions and supporting files to clients (MCP, Skills), and the maintainers listed Skills over MCP as in beta in November 2026 (MCP blog). Agent Skills belongs to the same Agentic AI Foundation as MCP (Anthropic), and our guide to agent skills covers how they load.
Microsoft’s Playwright docs show how one vendor splits the two. They recommend playwright-cli for coding agents “that favor token-efficient, skill-based workflows”, and Playwright MCP for “specialized agentic loops that benefit from persistent state and iterative reasoning over page structure” (Playwright).
Revyl’s recommended CLI skill set puts its model-invocable workflow guides behind one entry, revyl-cli, which routes the agent to the guide for the task at hand. Revyl’s docs say that one entry “keeps Revyl small in the skill listing your agent shares with every other skill you install” (Revyl docs, Agent skills). The revyl-mcp-* skills expect MCP tools, and the revyl-cli-* skills run terminal commands.
What changes when the agent runs in the cloud?
The client decides which routes work. A chat app or a call to a model API can reach tools over remote MCP when the client supports it: Claude’s MCP connector lets the Messages API connect to remote MCP servers “without a separate MCP client” (Claude docs), and OpenAI’s API accepts remote MCP servers next to function calling (OpenAI). Where a cloud agent has a shell with the CLI installed, it can run the CLI there, and skills load where the host supports them.
Identity matters more once the agent acts for other people. Scalekit frames the decision as “who is your agent acting for?” (Scalekit), and Enterprise-Managed Authorization, which the MCP maintainers list as a stable extension, lets people “sign in once and use every MCP server their company has approved” (MCP blog).
The five studies above measured tools that return text: GitHub, a git repository, a terminal tool and enterprise-style business data. Tools that drive a browser or a phone often return screenshots, which these studies didn’t cover. Zechner’s point about results is one example of where that matters: a screenshot returned inline by an MCP tool goes through the agent’s context, while a CLI can save it to a file that the agent opens when it needs to look. Harnesses vary here, and Scale Labs notes that Claude Code “spills large MCP outputs to files” (Scale Labs).
Revyl’s routes follow the client. In chat apps and IDEs that support OAuth, you connect Revyl’s hosted MCP server by signing in and choosing your organization. Its tools start an iOS, Android or web session or a Revyl computer, take a screenshot and stop the session. For headless runs such as claude -p and codex exec, Revyl’s docs use the CLI with REVYL_API_KEY (Revyl docs, MCP setup). The same page has setup for MCP clients including Claude Code, Codex, ChatGPT, Claude, Grok and VS Code, and for cloud agents including the GitHub Copilot coding agent, Codex cloud, Claude Code on the web, Devin, Amp, Factory and OpenCode’s GitHub agent. Device action tools take a plain description of the element, such as “Sign In button”, and resolve the coordinates themselves (Revyl docs, MCP tools).
Which should a tool vendor ship?
Ship more than one route, because different clients favor different routes, and keep each route small. CircleCI’s guidance is “CLIs fit the inner loop” and “MCP servers fit the outer loop”, and it adds “Most teams need both” (CircleCI). Scale Labs advises against leaving the routing decision to the model: “Don’t expose both interfaces and expect the model to choose.” Their alternative is a deliberate split that sends bulk search and listing through the CLI and keeps targeted reads and writes on MCP (Scale Labs).
The authors recommend different interfaces for different customers, and none of their studies tested whether one vendor needs all of them. Put together, their advice points to four interfaces, each for a particular kind of client:
- A documented API, since most MCP servers wrap one (Cloudflare).
- A CLI with machine-readable output, plus skills, for agents with a shell.
- A remote MCP server with OAuth for chat apps and model APIs, with a short default tool list (GitHub).
- An SDK for agents that write and run their own scripts (Anthropic).
Revyl ships the CLI, MCP and SDK routes for the same job, starting a cloud device or browser and checking what an app does:
- A hosted MCP server, covered in the section above, with setup for each client in Revyl’s MCP setup.
- The open-source
revylCLI, which also runs a local MCP server with the tool profiles described earlier. - One plugin for Codex and Claude Code that bundles a checksum-pinned CLI launcher, CLI-backed skills and the hosted MCP server. Its docs say “Everything the plugin’s skills do also works through the CLI alone” (Revyl docs).
- Verify, an open-source SDK in TypeScript, Python and Go for natural-language instructions and validations on a cloud browser, iOS simulator or Android emulator, called from a script, an agent loop or CI.
Here is the CLI route. Install the CLI with uv:
export PATH="$HOME/.local/bin:$PATH"
uv tool install revylThen run the script below with Bash. It needs jq and REVYL_API_KEY in the environment. The session it opens draws on your organization’s device time, so the agent needs permission to start one. The script exits with an error if the start returns no session ID. After the ID check, an exit trap stops that session on every exit. It saves the report only after the stop, run with --json, confirms the session stopped; otherwise it prints the session ID and the stop command to run again. A failed validation, screenshot, stop or report makes the script exit nonzero. The validation’s verdict comes back as JSON, which jq -e reads; the screenshot and the report go to files the agent opens when it needs them. You can start on Revyl for free: the Free plan includes up to 1,200 free device minutes a month on iOS, Android and web, with no card (Revyl pricing).
#!/usr/bin/env bash
set -euo pipefail
SESSION_ID="$(revyl device start --platform android --no-open --timeout 600 --json \
| jq -er '.session_id | select(type == "string" and length > 0)')"
finish() {
local rc=$?
if revyl device stop --session-id "$SESSION_ID" --json | jq -e '.stopped == true' >/dev/null; then
revyl device report --session-id "$SESSION_ID" --json > report.json || { [ "$rc" -ne 0 ] || rc=1; }
else
echo "Session $SESSION_ID has not confirmed it stopped. Retry: revyl device stop --session-id $SESSION_ID --json" >&2
[ "$rc" -ne 0 ] || rc=1
fi
exit "$rc"
}
trap finish EXIT
revyl device validation --session-id "$SESSION_ID" \
"The Android home screen is visible" --json \
| jq -e '.success == true and .step_output.validation_result == true' >/dev/null
revyl device screenshot --session-id "$SESSION_ID" --out screen.pngOn December 2, 2026 we ran the install step and this script, as shown, on a Linux cloud machine (Ubuntu 24.04) with an empty home directory and REVYL_API_KEY set. uv installed Revyl CLI 0.2.116. The script started an Android emulator (a Pixel 7 on Android 14), the validation passed, and the script saved screen.png, stopped the session with the stop confirmed, saved report.json and exited 0, 25 seconds after it began. The run checks the route to a device; it installs no app. What is agent verification? shows a dated check of a changed build with its visible result. To compare MCP servers that drive phones, see Mobile MCP servers compared and Mobile MCP alternatives.
What else do people ask about MCP, APIs and CLIs?
Is MCP an API?
MCP is a protocol, and an MCP server usually exposes operations from an API that already exists. Cloudflare describes MCP as a uniform way to “expose an API for doing something, along with documentation needed for an LLM to understand it, with authorization handled out-of-band” (Cloudflare). The server adds descriptions a model reads when it decides what to call.
Is MCP the same as function calling?
Function calling is how a model asks for a tool to run (OpenAI). MCP is how a client connects to the tools a server offers. OpenAI’s API takes remote MCP servers in addition to the functions you define (OpenAI), and Claude’s Messages API connects to them directly (Claude docs).
What is Code Mode for MCP?
Code Mode turns a server’s MCP tools into an API the model calls from code it writes (Cloudflare). The token section above covers Cloudflare’s and FastMCP’s versions.
Should an agent use MCP or skills?
They do different jobs. Anthropic’s framing is that MCP handles connectivity and skills handle expertise (Claude), and MCP servers can now ship skills through the Skills extension (MCP, Skills).
What else does Revyl do?
Revyl is verification infrastructure for cloud agents. Agents reach Revyl’s web browsers, iOS simulators, Android emulators and macOS computers through whichever route their client supports, as described above. Once Proof of changes is enabled, each pull request with a build gets a proof status by default, with a verdict for each build target. A proof that exercised the change also shows its confidence score, coverage, screenshots and, for web, iOS and Android builds, a recording a reviewer can open without logging in (Revyl docs, Proof of changes). The Free plan includes up to 1,200 free device minutes a month on iOS, Android and web with no card, Pro is pay as you go with no monthly fee, and there are no per-seat charges for developers or agents (Revyl pricing).
Beyond MCP, what else does Revyl run?
The CLI, MCP and SDK routes above reach the same platform, which runs web browsers, iOS simulators, Android emulators and macOS computers, plus Atlas:
- Web browsers. Any plan can run web sessions against a web build or a URL registered with Revyl (Revyl docs, Web).
- iOS simulators and Android emulators. Depending on the client, agents start them from the CLI, the hosted MCP server, a plugin or the Verify SDK. Agents also develop on them:
revyl devruns a local app on a cloud iOS simulator or Android emulator and installs its development build while the code stays in the agent’s workspace. The dev loop hot reloads most Expo and React Native JavaScript and TypeScript edits, and rebuilds and reinstalls when a change needs a new binary (Revyl docs, Dev loop). - macOS computers. The CLI route reaches a Mac too:
revyl computer execruns commands in a Revyl computer, so an agent can build a command-line tool and run it, start a web app’s local stack and open it in Safari, or build and open an Electron app. A Mac proof of a pull request reports back with screenshots and the command transcripts (Revyl docs, Computers; Revyl docs, Proof on macOS). Revyl computers, macOS workspaces where agents build and test apps, come with Pro: add a card to unlock them, and the 1,200 free device minutes a month still cover their sessions. - Atlas. Before it changes a flow in a supported web, iOS or Android app, an agent on the CLI route can ask Atlas with
revyl atlaswhich screens and transitions Revyl sessions have observed there (Revyl docs, Atlas). - Session reports. The
report.jsonthe script above saves lists the session’s steps, including its validation and result. On the hosted MCP server, an agent can report the recording and steps with a link to watch it in Revyl (Revyl docs, MCP setup). - Pull request proof. Once Proof of changes is enabled, a pull request with a build gets a proof status whichever route the agent used to write it, and a proof that exercised the change shows the behaviors it covered next to its screenshots (Revyl docs, Proof of changes).
- Partners. Capy proves pull requests on Revyl devices with Proof via Capy, and a team building agents for its own customers starts with the partner integration.
Our guides to Codex cloud environments and Claude Code cloud environments cover how two hosted agents set up their machines, and what each cloud coding agent can verify compares the hosted agents by what they can run.
You can start on Revyl for free. The Free plan includes up to 1,200 free device minutes a month on iOS, Android and web, with no card, and Revyl pricing lists what each plan covers.