You ask your AI agent a simple question: "What is the weather in London right now?" Its model was trained months ago, so it cannot know. It needs a way to reach the live web.
There are three popular ways to give it that reach: an MCP server, a command-line tool (CLI), or a skill. Developers argue about them loudly, and most of the articles you will find pick a side. We read 18 sources, including Anthropic's and the MCP project's own pages, plus benchmarks from several vendors. This guide tells you what they agree on, where they disagree, and how to choose.
Why live web data is hard for an agent#
A language model only knows what it saw in training. Anything newer, such as prices, news, weather, a changed API or a new law, has to be fetched at the moment you ask. Three problems get in the way.
- The web is messy. A page is full of menus, adverts and scripts. Pasting raw HTML into a model wastes space and money.
- The model has a short memory. Everything it reads sits in its context window, the working memory of one conversation. It is measured in tokens, small chunks of text that you also pay for. Whatever you load for the agent takes space from the actual question.
- Fetched text can contain traps. A web page can include sentences written to trick an agent. We come back to this in the security section.
So the real question is not "which technology is best". It is "how do I get clean, current data to the agent for the lowest cost and risk?"
The three options in plain words#
MCP (Model Context Protocol) is an open standard for connecting AI applications to outside systems. The project's own documentation compares it to a USB-C port: one standard plug that works with many devices. Your agent talks to an MCP server, which exposes a list of tools such as "search the web" or "fetch this page". It can run on your computer or be hosted by a company.
A CLI (command-line interface) is a program you run in a terminal, like curl, git or gh. An agent that can use a shell can run these just as a developer does, and chain them together. There is nothing to install on the agent side beyond the tool itself.
A skill is a folder with a SKILL.md file. The file has a name, a short description and written instructions. Agents load skills in three steps: first only the name and description, then the full instructions when a task matches, then any extra files or scripts if needed. Skills began at Anthropic and are now an open format, according to the agentskills.io site, which lists dozens of tools that support it. Anthropic sums it up this way: MCP connects Claude to data, and skills teach Claude what to do with that data.
Side-by-side comparison#
| MCP server | CLI tool | Skill | |
|---|---|---|---|
| What it is | A standard connection to a service | A program the agent runs | Written instructions |
| Gives the agent new access? | Yes | Yes | No |
| Cost in the agent's memory | Tool definitions, unless the agent loads them only on demand | Almost nothing until used | A short description until needed |
| Login and permissions | Built for sign-in, scoped tokens and approval prompts | Uses whatever your terminal can already do | Uses whatever the commands it calls can do |
| Best at | Hosted services, shared access, long sessions | Quick, repeatable fetches and chaining steps | Repeating a procedure the same way every time |
| Main weakness | Setup, extra overhead, trust in the server | No built-in permission limits, forgets state between calls | Cannot act or protect anything by itself |
This table follows the points that the Parallel, DEV Community, jannikreinhard.com and Tyk articles agree on. Where they differ, the next sections explain why.
The token cost debate: what the numbers really say#
This is the loudest argument, so it deserves a careful look.
The case against MCP. An MCP server describes every tool it offers up front, and in simple setups the agent reads all of those descriptions on every turn. Scalekit ran 75 benchmark runs comparing the gh CLI with GitHub's official MCP server (43 tools), using the same model (Claude Sonnet 4) and the same tasks. Firecrawl reports the results:
| Task | CLI tokens | MCP tokens | Gap |
|---|---|---|---|
| Repo language and license | 1,365 | 44,026 | about 32x |
| Repo details and install | 9,386 | 82,835 | about 9x |
| Latest release and dependencies | 8,750 | 37,402 | about 4x |
The CLI also completed 100% of its runs. MCP completed 72%, and the seven failures were mostly connection timeouts to the remote server, which is an infrastructure problem and not a flaw in the protocol. In the same test, an 800-token skill file of gh tips beat roughly 28,000 tokens of MCP tool descriptions.
The case for caution. That benchmark covers one service and one model, with five read-only tasks. Checkly ran a different test: the Playwright MCP server against the Playwright CLI, on the same shopping task, three runs each. The MCP sessions used 48,000 to 50,000 tokens and the CLI sessions 45,000 to 48,000, almost the same. Their explanation is that modern agents no longer load every tool definition at the start. Anthropic's Claude Code documentation says its tool search feature is on by default, and Checkly explains that this loads a tool's full definition only when the agent needs it.
What to take away:
- The old rule "MCP wastes tokens" is partly out of date, but not gone. It depends on whether your agent loads tools on demand.
- Another cost hides in the answers, not the definitions. Claude Code warns when a single MCP result passes 10,000 tokens and cuts results off at 25,000 by default. A tool that returns a whole web page can cost more than its definition ever did.
- Many of the numbers online are author estimates, not measurements. Some articles in our research mixed estimates with measurements, and some are written by vendors who sell one of the options. We label which is which in this guide.
Where MCP is clearly the better choice#
The articles that favor CLIs still agree on these cases.
- The service has no CLI. Many software-as-a-service products offer an MCP server and nothing else.
- Many people share one setup. A hosted MCP server can handle sign-in and issue each person a limited, revocable token. A CLI uses the permissions of whoever is logged in on that machine. Tyk, which sells API gateways, points out that with a raw CLI "the LLM has the same permissions as the user", so the agent can reach your SSH keys and cloud credentials unless you add a sandbox.
- The job needs a live session. A browser that stays logged in, or a database connection that stays open, is awkward to rebuild on every command.
- You need an audit trail. MCP calls pass through a defined interface that is easy to log. With a CLI you must wrap each command yourself.
Keep one caution in mind. A connected MCP server is not proof that access is safe or limited. The jannikreinhard.com article puts it plainly: it does not prove tenant isolation or correct write permissions. Check what the server can actually do.
Where a CLI or plain API call wins#
- A mature tool already exists and prints clean, structured output, such as
gh,git,awsorcurl. - You work alone or in CI with your own credentials, so shared permissions are not an issue.
- You want to chain steps. A CLI can pipe one command into the next. One article estimates that summing 150 orders through a pipeline takes one short command, where an MCP approach makes 150 separate model calls. That is the author's estimate, but the direction is easy to see.
- You want easy debugging. You can run the same command in your own terminal and see what the agent saw.
The weakness is that a CLI has no memory between calls and no built-in permission limits. For high-volume, one-shot fetches that is usually fine.
Where skills fit, and where they do not#
A skill is the cheapest layer, because only a short description sits in the agent's memory until the task matches. Anthropic describes about 100 tokens of description per skill and under about 5,000 tokens for the full instructions when loaded. Skills are good for:
- recording a procedure so the agent does it the same way every time, for example "check the official source first, then a news source, then cite both";
- telling the agent which tool to use for which job and how to read its output;
- sharing know-how across a team through a file you keep in version control.
Skills also have limits that the articles repeat:
- They add no access. A skill cannot fetch a page. It can only tell the agent how to use something that can.
- They are not a security boundary. Put limits in the system: a read-only role, a scoped token, a sandbox.
- They are not automatically helpful. Atlan reports that LlamaIndex found skills were rarely invoked in a workload where an MCP server handled the job. One research survey summarized on slavadubrov.com counted skill-related failures, including slowdowns, in cases where a loaded skill made things worse. Test an agent with and without each skill.
The same task three ways: "What is the weather in London right now?"#
We tested the command-line version for this guide. The weather service Open-Meteo needs no account for this request:
curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5072&longitude=-0.1276¤t=temperature_2m,wind_speed_10m&timezone=UTC"When we ran it, it returned a short JSON reply, which includes this part:
"current_units":{"time":"iso8601","temperature_2m":"°C","wind_speed_10m":"km/h"},
"current":{"time":"2026-10-19T05:30","interval":900,"temperature_2m":10.1,"wind_speed_10m":7.2}That is the whole job for a CLI: one command, a small answer, cheap to read. If you have the jq tool installed you can trim it further, but we did not need it here.
The skill version tells the agent when and how to use that command. Here is a minimal SKILL.md. The name and description fields are the required ones in the open format.
---
name: live-weather
description: Get current weather for a place. Use when the user asks for the weather right now or today's temperature.
---
1. Find the latitude and longitude of the place.
2. Call the Open-Meteo forecast endpoint with `current=temperature_2m,wind_speed_10m`.
3. Report the temperature and wind speed with their units and the time of the reading.
4. If the request fails, say so. Never guess a number.The MCP version would replace the command with a tool that a weather service offers over MCP. The setup differs by client, so check your client's documentation. Many use a configuration shaped like this. The server name is a placeholder and not a real package, and we did not run this one:
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "your-weather-mcp-server"]
}
}
}For a single lookup like this, the CLI plus skill is the lighter choice. MCP would earn its place if the weather data needed a login, or if a whole team had to use it with individual permissions.
Getting web data: search, fetch or browse?#
"Live web data" actually means three different jobs, and each has its own tools.
- Search: find the right pages for a question.
- Fetch or scrape: pull one page and turn it into clean text.
- Browse: operate a real browser for sites that need clicks, logins or scripts.
Web search APIs fall into two kinds. Raw result services such as Serper or Brave's basic search return titles, links and snippets, so you fetch, clean and trim the pages yourself. They are cheap per query. Content-returning services such as Firecrawl and Tavily include the page text, which saves you work and costs more per call. A third kind, such as Perplexity's API, returns a finished written answer with citations.
How do they compare? AIMultiple tested 8 search APIs on 100 AI-related queries, with an AI judge scoring each result for relevance and quality and humans checking about 10% of the scores.
| Rank | API | Agent score | Average speed |
|---|---|---|---|
| 1 | Brave Search | 14.89 | 669 ms |
| 2 | Firecrawl | 14.58 | 1,335 ms |
| 3 | Exa | 14.39 | about 1.2 s |
| 4 | Parallel Search (Pro) | 14.21 | 13.6 s |
| 5 | Tavily | 13.67 | 998 ms |
| 6 | Parallel Search (Base) | 13.50 | about 2.9 s |
| 7 | Perplexity | 12.96 | over 11 s |
| 8 | SerpAPI | 12.28 | 2.4 s |
Read it carefully. The authors say the top four are statistically indistinguishable, and the one gap they call meaningful is Brave's lead over Tavily, about one point. All the queries were about AI topics, it is a snapshot in time, and an AI judge rated the results. The article also discloses that SerpApi, which ranked last, is among its benchmarking subscribers. So the useful lesson is the one the vendors keep repeating: build a test set of your own questions and measure, because speed varied about 20 times between services while quality was close.
The same service often comes in several forms. Parallel, for example, offers its search as a hosted MCP server and as a CLI that can be installed as a skill, on the same underlying API. Both Parallel and ScraperAPI are sellers who make this argument, so treat their recommendations as one view among many. The practical lesson still holds: prefer a provider that lets you try more than one form.
A simple way to choose#
Ask these five questions in order, adapted from the "60-second test" in a DEV Community article by the author cucoleadan.
- Is there a mature CLI that prints clean, structured output? If yes, start there, with a skill that explains it.
- Does the agent act only as you, on your own machine? If yes, a CLI is fine. If it acts for many people, lean to MCP.
- Does the work need sign-in, consent or an audit log? If yes, lean to MCP, behind a gateway or proxy if you can.
- Does it need a live, stateful session, such as a logged-in browser? If yes, use MCP.
- Do you keep repeating the same rules in your prompts? If yes, write a skill.
Then test. Run the same ten real tasks through each option and compare the cost, the speed and how often the answer was correct. Both slavadubrov.com and jannikreinhard.com say the same: begin with the simplest option that works and measure before adding more.
Safety checklist for agents that read the web#
Live web data is also an attack surface, so this part matters more than the cost debate.
- Treat fetched pages as data, not instructions. A page can contain text written to redirect your agent. An agent should summarize what a page says, not obey it.
- Treat tool descriptions as untrusted too. One study, MCPTox, reported attack success of up to 72.8% for one model when tool descriptions were poisoned, according to the survey on slavadubrov.com. Use servers you trust and pin their versions.
- Start read-only. Give the agent the smallest useful set of read operations first, and keep investigating separate from changing things.
- Put limits in the system, not in the prompt. Use read-only database roles, scoped and expiring tokens, and sandboxes. A skill's instructions are not enforcement.
- Require approval for risky steps, such as sending data out, deleting, paying or posting.
- Verify results. Re-read the state after an action instead of assuming it worked.
- Keep secrets out of reach. Hosted MCP sign-in keeps keys on the server. With a CLI, check what keys the agent's shell can read.
Common mistakes#
- Connecting every tool you can find. More tools mean more descriptions to read and more chances to pick the wrong one.
- Judging by one benchmark. The headline numbers come from specific services, models and tasks. Yours will differ.
- Using a skill as a lock. It is a guide, not a guard.
- Returning whole web pages. Ask for the cleaned text or the few fields you need.
- Skipping error handling. If a fetch fails, the agent should say so and not make up a number.
- Trusting old tutorials. Features such as tool search change what is true. Our guide on spotting outdated API tutorials shows how to check.
What we would do#
If you are starting from zero and want live web data in an agent, this order works for most people:
- Begin with a plain API call or a CLI for the one job you need, such as a search API or a page fetch.
- Write a short skill that says when to use it, what a good answer looks like and how to cite the source.
- Add an MCP server only when you hit a real need: a service with no other way in, sign-in for many users, a live session or central logging.
- Measure cost, speed and correctness on your own tasks, and repeat every few months, because this space moves fast.
If you build or call APIs for your agents, our guides on what a REST API is, API design principles and standard data formats will help you give agents clean, predictable data. If your agent runs on Claude, our Claude API guide covers keys, pricing, rate limits and caching. And if your agent needs live weather, our guide to free weather APIs with no key shows which ones answered in our tests.
Key takeaways#
- MCP, CLI and skills solve different problems: access with sign-in, cheap execution, and written know-how.
- For simple, one-off web fetches, a CLI or plain API call plus a skill is usually the lightest choice.
- Choose MCP for services without a CLI, shared or governed access, and long sessions.
- The token-cost gap is real in some setups and small in others. Measure your own.
- Skills add no access and no security. Limits belong in the system around the agent.
- Treat everything the agent reads from the web as untrusted input.
Sources we read#
We read these 18 sources on 19 October 2026. Several are written by companies that sell one of the options, and we say so where it matters.
Primary and standards pages: Model Context Protocol introduction, Agent Skills overview, Anthropic: Skills explained, Claude Code MCP documentation.
Benchmarks and comparisons: Firecrawl: MCP vs CLI (reporting the Scalekit benchmark), Checkly: CLIs are more token-efficient than MCP, or are they?, AIMultiple: agentic search benchmark, Firecrawl: best search tools for agents.
Opinion and guides: ScraperAPI: live web data for AI agents, Parallel: MCP vs skills vs CLIs, DEV Community: MCP vs CLI vs skills, DEV Community: when to use MCPs, CLIs or your own tool, slavadubrov.com: AI agent tool use, manveerc on Substack: MCP vs CLI for AI agents, MindStudio: MCP vs CLI token costs, jannikreinhard.com: mapping the AI tooling surface, Atlan: Agent Skills vs MCP, ddewhurst.com: skills, CLI and MCP, Tyk: MCP vs CLI enterprise comparison.