Model Context Protocol
MCP client
An MCP client is the component inside an AI application that holds one connection to one MCP server, fetches that server's tool list and passes the model's tool calls to it.
What it is
The MCP architecture has three participants. The host is the AI application a person uses, such as Claude Code or an IDE. For every MCP server it connects to, the host creates one client, which keeps a dedicated connection to that server. In everyday speech "MCP client" often means the whole application; strictly, it is the per-server connection inside it.
Why it matters
The client sits between the model and the outside world. It decides which tools the model sees, shows the person what is about to happen, and carries the results back. The MCP specification asks clients to prompt for confirmation on sensitive operations, show tool inputs before calling the server, validate results before passing them to the model, apply timeouts and log tool usage for audit.
How it works
- The person adds a server, by a local command or a remote URL.
- The host creates a client, which connects, learns the server's version and capabilities, and, for a protected remote server, runs the OAuth sign-in.
- The client calls
tools/listand hands the definitions to the model. - When the model emits a tool call, the client sends
tools/calland returns the result to the model.
Example
Adding a remote server to Claude Code is one command:
claude mcp add --transport http actionlake https://connect.actionlake.com/mcp
Claude Code creates a client for that URL, signs the person in through the browser, and the server's tools appear in the session.
Common pitfalls
- Auto-approving every call. The OWASP MCP cheat sheet warns against auto-approval, especially when several servers are connected, and asks for full parameters to be shown, not just a tool name.
- Trusting tool annotations. Hints such as "read-only" come from the server; the specification says clients must treat them as untrusted unless the server is trusted.
- Connecting everything. Each server's tools take context space and compete for the model's attention. See tool overload.
- Assuming the client enforces policy. A client can ask; it cannot stop a server holding a broad credential from doing what that credential allows.
How actionlake handles it
We have tested Claude Code and the Claude app with actionlake. Other MCP clients that support remote servers over Streamable HTTP and OAuth dynamic client registration, or a bearer header, should connect the same way; we have not tested them. The connect page has the exact setup for each, marked with what it rests on. The command above is the documented path for Claude Code, and the quickstart walks through it. The client signs in once with OAuth, or presents an actionlake API key as a bearer token; both resolve to the same key on our side. That key's permissions, caps and approval rules are enforced by the server on every call, so the policy holds whichever client the agent uses. The client sees eight tools however many systems are connected.
Questions
Is Claude Code an MCP client?
Claude Code is an MCP host: the application that creates one MCP client per server you add. In everyday use people call the whole application the client.
Can one MCP client connect to several servers?
A host can connect to many servers, but it creates a separate client for each one. Every connection brings its own tools into the model's context.
Does the MCP client store my credentials?
For a remote server it usually stores an OAuth access token issued for that server. Vendor credentials should stay with the server or gateway, never in the client's configuration or the model's prompt.
Related terms
- MCPThe Model Context Protocol (MCP) is an open standard that lets an AI application connect to external systems and discover and call their tools, read their resources and use their prompts through one JSON-RPC message format.
- MCP serverAn MCP server is a program that offers tools, resources and prompts to AI applications over the Model Context Protocol, usually by wrapping one system's API, such as a ticket desk or an accounting ledger.
- Remote MCP serverA remote MCP server runs on the internet rather than on your computer, and AI clients reach it over HTTPS using the Streamable HTTP transport, usually after an OAuth sign-in.
- OAuth for MCPOAuth for MCP is the authorisation flow the MCP specification defines for remote servers, in which an MCP client discovers the server's authorisation server, registers itself, sends the person to sign in and consent, and then calls the server with a short-lived, audience-bound access token.
- Tool callingTool calling, also called function calling, is a language model's ability to answer with a structured request to run a named function with arguments, which the application executes before handing the result back to the model.
- Tool overloadTool overload is the loss of accuracy and context space that happens when an AI model is given more tool definitions than it can reliably choose between; Anthropic's documentation says Claude's tool selection degrades once more than 30 to 50 tools are available.
Sources
Connect an agent. Start free.
100,000 calls free every month. No card. Hard caps on every key.