What Is MCP and Why Do AI Agents Need It?

The Model Context Protocol is the standard way to give AI models tools. What MCP is, how it works, why agents need it instead of custom integrations, how it compares to APIs and CLIs, the risks to manage, and how Cloider MCP and the Cloider CLI let an agent run your cloud.

Marei Morsy··14 min read
What is MCP: an AI client in the middle connects through the Model Context Protocol to tool servers for code, databases, docs and the Cloider cloud
On this page

Key takeaways

  • MCP, the Model Context Protocol, is an open standard for connecting AI applications to tools and data. Anthropic introduced it in 2024, it now sits under the Linux Foundation, and Claude, ChatGPT, Cursor, VS Code and Gemini support it.
  • A model alone can't see your systems or act on them. An agent is a model in a loop with tools, and MCP is the standard way those tools reach it.
  • MCP turns the N×M integration problem into N+M: a service writes one server and every MCP client can use it.
  • A server describes each tool with a name, a description, a JSON Schema and safety hints, and the client calls it over stdio or Streamable HTTP, asking you first when it should.
  • Tools bring risks: prompt injection, too much access and destructive mistakes. Use least privilege, read-only credentials, a separate production account and approvals.
  • cloider mcp, built into the Cloider CLI, gives any MCP client more than 130 tools for apps, Kubernetes, databases, buckets, the registry, domains and billing, with read-only and toolset limits.

Ask an AI assistant how to create a PostgreSQL database and you'll get a good answer: the commands to type, the flags to pass, maybe a warning about connection limits. Then you copy the commands into a terminal, paste the output back into the chat, and ask what to do next. The model knows what to do. It just can't do it.

That gap is what the Model Context Protocol (MCP) closes. MCP is the standard way to give an AI model tools: actions it can take in systems it couldn't otherwise reach, with you deciding what it's allowed to do. It's the reason an assistant in your editor can now read a ticket, query a database, deploy a branch and check the logs, all in one conversation.

This article explains what MCP is, how it works, why agents need it instead of a pile of custom integrations, how it compares to APIs and CLIs, and what to watch out for when you give an agent real access. The last sections show it in practice with the Cloider MCP server and the Cloider CLI.

What is MCP?

The Model Context Protocol is an open standard for connecting AI applications to external tools and data. Anthropic introduced it in November 2024, and in December 2025 donated it to the Agentic AI Foundation, a fund under the Linux Foundation that Anthropic co-founded with OpenAI and Block. Claude, ChatGPT, Cursor, VS Code with GitHub Copilot, Gemini and most other AI tools developers use support it, and thousands of MCP servers have been published.

The protocol has three roles:

  • The host is the AI application you talk to, such as Claude Code, Claude Desktop, Cursor or VS Code.

  • The client is the part of the host that holds the connection to one server. A host can connect to many servers at once.

  • The server is a program that offers capabilities to the host: a GitHub server, a database server, a server for your cloud provider.

A server can offer three kinds of capabilities. Tools are actions the model can call, such as create_issue or create_database. Resources are data the application can load into the model's context, such as files or database schemas. Prompts are reusable templates the user can pick from a menu. Tools are what matter most for agents, and they are what the rest of this article is about.

You'll often hear MCP described as a USB-C port for AI: one plug shape, so any device works with any computer. The comparison holds up. Before USB, every printer, mouse and camera came with its own cable. Before MCP, every AI application had its own way to plug in tools.

Why AI agents need MCP

A language model on its own has three limits that no amount of training removes:

  1. Its knowledge stops at its training data. It doesn't know what's in your repository today, which version of your app is deployed, or what your database looked like five minutes ago.

  2. It can't see your systems. Your logs, metrics, tickets and cloud account sit behind logins and private networks.

  3. It can't act. It produces text. Running a command, creating a resource or sending a message has to be done by something else.

An agent is what you get when you put a model in a loop with tools: it decides on a step, calls a tool, reads the result, and decides on the next step until the task is done. Every major model has supported tool calling (also called function calling) for a while, so the model's side of this was solved early. What was missing was the other side: a standard way for tools to reach the model.

Without a standard, every AI application had to build its own integration with every service. If 10 AI applications want to work with 100 services, that's 1,000 integrations, each with its own auth, its own description of the tools and its own bugs, and most of them never got built. This is the N×M problem, the same one the Language Server Protocol solved for code editors: before it, every editor needed its own plugin for every programming language.

MCP turns N×M into N+M. A service writes one MCP server, and it works in every MCP client. An AI application implements MCP once, and it can use every server. For agents, that changes four things:

  • Agents get fresh context. Instead of guessing from training data, the agent reads the real state: the open pull request, the current schema, the last 100 log lines.

  • Agents can act, not just advise. The model stops writing instructions for you to follow and does the steps itself, reading each result before taking the next one.

  • Tools are discoverable. The client asks the server what it offers, so an agent learns a new service's tools by connecting to it, not by being retrained.

  • You stay in control. The client sits between the model and every tool call, so it can ask for your approval, hide tools or refuse calls, whatever the model decides.

How MCP works

MCP messages are JSON-RPC 2.0: small JSON requests and responses. A typical exchange for a tool goes like this:

  1. The client connects to the server and asks which tools it has (tools/list).

  2. The server answers with each tool's name, a description written for the model, a JSON Schema for its parameters, and hints about what it does.

  3. The host adds the tool list to the model's context. When you ask for something, the model picks a tool and fills in the arguments.

  4. The client sends the call to the server (tools/call), usually after asking you first if the tool changes something.

  5. The server does the work and returns the result, which goes back to the model to decide what to do next.

This is what a tool looks like in a server's tool list. It's the Cloider MCP server's create_database tool, shortened:

JSON
{
  "name": "create_database",
  "description": "Create a database. It takes a few minutes; pass wait, or check get_database. Plans and their prices are in get_pricing.",
  "inputSchema": {
    "type": "object",
    "required": ["name", "engine"],
    "properties": {
      "name": { "type": "string", "description": "Name of the new database" },
      "engine": { "type": "string", "enum": ["postgresql", "mysql", "redis", "mongodb"] },
      "plan": { "type": "string", "description": "Plan: Hobby (the default), Starter, Basic, Standard, Plus or Pro" },
      "wait": { "type": "boolean", "description": "Wait until it is done, up to 15 minutes, instead of returning while it is under way" }
    }
  },
  "annotations": { "readOnlyHint": false, "destructiveHint": false }
}

When you then ask "create a PostgreSQL database called orders-db and wait until it's ready", the client sends:

JSON
{
  "jsonrpc": "2.0",
  "id": 12,
  "method": "tools/call",
  "params": {
    "name": "create_database",
    "arguments": { "name": "orders-db", "engine": "postgresql", "wait": true }
  }
}

The description and the schema do most of the work here. The model never saw this server during training. Everything it knows about the tool, including that a database takes a few minutes to create and that it can wait for it, comes from the text the server sent.

MCP has two standard transports. With stdio, the host starts the server as a local process on your computer and talks to it over standard input and output. It's simple, needs no network, and the server can use what's already set up on your machine, such as a CLI login. With Streamable HTTP, the server runs remotely, the client connects to a URL, and you sign in with OAuth. Local servers are common for developer tools, remote servers suit services you use from a browser or a phone.

The specification keeps evolving: the 2026-07-28 revision, for example, made the core protocol stateless so remote servers are easier to scale. The basic idea has stayed the same since the start: servers describe their tools, and clients call them.

MCP vs. APIs, CLIs and function calling

MCP doesn't replace the things it sits next to. Usually it wraps them:

What it is

Built for

Where it falls short for agents

REST API

HTTP endpoints for a service

Programs

The agent has to find the docs, write the requests, handle auth and parse the responses, for every service

CLI

A command line tool

People, scripts, CI

Needs an agent with a shell, which has to learn the commands from help text

Function calling

How a model asks for a tool to be called

Model providers

Defines the call, not where the tools come from, so every app wired up its own

MCP

A standard for offering tools to any AI application

AI clients and agents

Needs a server per service, and someone still has to decide what the agent may do

Most MCP servers are a thin layer over an existing API or CLI. That's a good thing: the server reuses the service's own auth and permission checks, and the agent gets tools made for it, with descriptions written for a model, parameters checked against a schema, and hints that tell the client which tools are safe to run without asking.

Coding agents that have a terminal, such as Claude Code or Codex, can also run a CLI directly. That works well, and it's one reason a good CLI matters as much as a good MCP server. MCP is what makes the same capabilities available in clients that have no shell, such as Claude Desktop or ChatGPT, and what lets a client ask for approval per action rather than per shell command.

The risks of giving agents tools

Giving an agent tools means lending it some of your access. That comes with risks:

  • Prompt injection. Tool results are text the model reads. A web page, an issue comment or a log line can contain instructions, and a model may follow them. An agent that reads untrusted content and also has write access is the combination to be careful with.

  • Too much access. An agent acting with an admin token can do anything an admin can, including by mistake.

  • Destructive actions. Deleting a database is one tool call. A misunderstanding costs more when the agent acts than when it only advises.

  • Untrusted servers. An MCP server is code running with your credentials. Install servers from sources you trust, as you would any package.

  • Secrets in context. Tools that return passwords or kubeconfigs put them in the conversation.

The defenses are the usual ones, applied to agents: give each agent the least access it needs, use read-only credentials for agents that only look, keep production in a separate account, require approval for anything that changes or deletes, and prefer servers that mark their destructive tools so your client knows when to ask.

Cloider MCP: your cloud as tools

Cloider has an MCP server built into its CLI: cloider mcp. It gives any MCP client more than 130 tools for your whole Cloider account, grouped in eight toolsets: account, clusters, databases, buckets, registry, apps, domains and support. With it, an agent can:

  • Deploy the project folder it's working in as an app, or create an app from a GitHub, GitLab or Bitbucket repository that deploys on every push, then follow the build and read the logs.

  • Create, pause, resume and delete Kubernetes clusters, get the kubeconfig, and run kubectl and helm commands in them.

  • Create PostgreSQL, MySQL, MongoDB and Redis databases, resize them, restore one as it was at any moment of the last 14 days into a new database, change who may connect, and run queries.

  • Create S3-compatible buckets, upload files, serve static websites, and set policies, lifecycle and CORS rules.

  • Manage container registry projects, domains, DNS records and routes, read usage and the month's cost forecast, and open support requests.

The server runs on your computer over stdio and uses the CLI's own login, so there's no separate key to create and nothing to host. Every tool is a real CLI command run with JSON output, so an agent gets exactly what a script gets: the same name resolution, the same waiting until a resource is ready, the same error messages. Everything it does shows up in the dashboard like anything else you do, and the server itself is free: you pay only for the resources you create.

Set up Cloider MCP in two minutes

Install the CLI and log in once:

Bash
curl -fsSL https://cloider.com/install.sh | sh
cloider login

On Windows, run irm https://cloider.com/install.ps1 | iex in PowerShell instead. cloider login opens your browser, where you choose the account and whether the token can change things or only read.

Then add the server to your AI client. In Claude Code it's one command:

Bash
claude mcp add cloider -- cloider mcp

In Codex it's codex mcp add cloider -- cloider mcp. Cursor, Windsurf, Claude Desktop, Gemini CLI and most other clients take the same two values, the command cloider and the argument mcp, in a JSON file:

JSON
{
  "mcpServers": {
    "cloider": {
      "command": "cloider",
      "args": ["mcp"]
    }
  }
}

VS Code uses a servers key instead, and Claude Desktop needs the full path to the binary from which cloider. The MCP setup guide has the exact configuration for each client.

Then ask in plain language:

Text
Which Cloider account are you in, and what is running there?

The agent calls whoami, then list_apps, list_clusters, list_databases and list_buckets, and sums it up. A few more prompts that work well:

You ask

The agent calls

Deploy this project as an app called blog and tell me its URL when it's up

deploy_app

Create a PostgreSQL database called orders-db that only the api app can reach, and set DATABASE_URL on the app as a secret

create_database, get_database, get_database_password, set_app_variables

Why is the api app returning 502s?

get_app, list_app_replicas, get_app_logs, list_app_builds

What will Cloider cost me this month, and what costs the most?

get_usage

Add example.com and serve www.example.com from the blog app

create_domain, verify_domain, create_dns_record, create_domain_target

The example prompts page has more than 30 of them, with the tools each one calls.

Stay in control of what the agent can do

The Cloider MCP server is built with the risks above in mind. Four layers decide what an agent can actually do, from the strongest to the most convenient:

  1. One account, your role. Every tool acts as one API token in one account, and never with more access than the member who created it. Keep production in its own account and give agents a login to development only.

  2. Read-only tokens. A read-only token makes the API refuse every change, whatever the agent, or a prompt injection, asks for. Log in a separate profile for agents with cloider login --profile agent --read-only.

  3. Server flags. cloider mcp --read-only offers only the 57 tools that change nothing, and --toolsets apps,domains offers only the toolsets you list. A tool that isn't offered doesn't exist for the agent.

  4. Client approvals. Every tool carries the standard MCP annotations, so your client knows which tools only read and which ones delete, and can ask you before the risky ones.

For an agent that should look but never touch, combine them:

Bash
cloider login --profile agent --read-only
claude mcp add cloider-readonly -- cloider --profile agent mcp --read-only

Some things are left out on purpose. No API token, read-only or not, can invite members, change roles or create API tokens, so an agent can never give itself or anyone else more access. Funds and cards are added in the dashboard only. A read-only token can still read database passwords and kubeconfigs, so treat a conversation that called those tools as sensitive. The safety and permissions guide lists which tools are destructive and which return secrets.

The Cloider CLI: the same power in your terminal

cloider mcp is one command of the Cloider CLI, and the CLI is worth knowing on its own. It does from a terminal what the dashboard does, as a single binary for macOS, Linux and Windows, with commands shaped cloider <noun> <verb>:

Bash
cloider deploy                                   # deploy this folder as an app
cloider app logs blog -f                         # follow an app's logs
cloider db create orders-db --engine postgresql  # a managed database
cloider cluster create staging                   # a Kubernetes cluster
cloider bucket upload acme-assets ./public -r    # upload a folder to a bucket
cloider usage                                    # this month's cost and forecast

It's built for three kinds of users:

  • People at a terminal get readable tables, a browser login, profiles for several accounts and shell completion, and the CLI keeps itself up to date.

  • Scripts and CI pipelines get -o json or -o yaml output, -q for ids only, and an API token from CLOIDER_TOKEN instead of a browser login.

  • AI coding agents with a shell, such as Claude Code, Codex or Gemini CLI, can run it directly. cloider --help opens with a note that points agents to llms.txt, which tells them how to choose between a bucket website, an app and a Kubernetes cluster, and to deploy from git when the project has a remote.

So should an agent use the CLI or MCP? Either, depending on the client. They share the same login and do the same things. MCP is the better fit in clients without a shell, such as Claude Desktop, when you want an approval per action, and when you want to narrow the agent's tools with --read-only or --toolsets. The CLI is the better fit in scripts, CI and the terminal, and coding agents use it naturally next to the rest of your toolchain. Many developers add the MCP server to their AI client and keep the CLI for everything else. If you want to see the CLI in a full walkthrough, How to Host a Static Website on Cloider S3 deploys a site with it from start to finish.

Getting started

  1. Install the CLI with curl -fsSL https://cloider.com/install.sh | sh and run cloider login.

  2. Add the server to your AI client, for example with claude mcp add cloider -- cloider mcp.

  3. Ask your agent which account it's in and what is running there.

  4. Before you let it change production, give it a read-only profile or an account of its own.

Conclusion

MCP gives AI agents what a model alone can't have: current context from your systems and a way to act on it, through one standard that every major AI application supports. For the services you use, it means one server instead of an integration per AI tool. For you, it means an agent that does the work instead of describing it, while you decide how far it can go.

On Cloider, that agent can deploy your apps, create clusters and databases, fix DNS and tell you what it all costs, through cloider mcp in your AI client or the cloider CLI in your terminal. Install the CLI, add the server, and start with a read-only question.

Frequently asked questions

What does MCP stand for?

MCP stands for Model Context Protocol, an open standard for connecting AI applications such as Claude, ChatGPT, Cursor and VS Code to external tools and data through MCP servers.

Who created MCP?

Anthropic introduced the Model Context Protocol in November 2024. In December 2025 it donated MCP to the Agentic AI Foundation, a fund under the Linux Foundation co-founded by Anthropic, OpenAI and Block, which now hosts the project.

Is MCP the same as function calling?

No. Function calling is how a model asks for a tool to be called. MCP is the standard for where those tools come from: a server describes its tools, any MCP client can connect to it, and the client passes the tools to the model and runs the calls it makes.

What is the difference between an MCP server and an API?

An API is built for programs, which need to know its endpoints, auth and response formats in advance. An MCP server is built for AI agents: it lists its tools with descriptions written for a model and JSON Schemas for the parameters, so any MCP client can discover and call them. Most MCP servers wrap an existing API or CLI.

Is it safe to give an AI agent access through MCP?

It can be, with the same care as any credential. Give the agent the least access it needs, use read-only tokens for agents that only look, keep production in a separate account, have your client ask before tools that change or delete things, and only install MCP servers you trust. Be careful with agents that read untrusted content, which can carry prompt injections.

Does Cloider have an MCP server?

Yes. The cloider CLI includes one, cloider mcp. It runs on your computer over stdio, uses the CLI's login, and gives any MCP client, such as Claude Code, Claude Desktop, Cursor or VS Code, more than 130 tools for apps, Kubernetes clusters, databases, buckets, the container registry, domains, DNS, usage and support. Add it to Claude Code with claude mcp add cloider -- cloider mcp.

Should an AI agent use the Cloider CLI or the MCP server?

Either: they share the same login and do the same things. The MCP server suits clients without a shell, such as Claude Desktop, and lets you approve each action or limit the tools with --read-only and --toolsets. The CLI suits terminals, scripts and CI, and coding agents with a shell, such as Claude Code or Codex, can run it directly.

Written byMarei Morsy

Comments