Connections through MCP

Lesson 28 of 35 · Working with AI coding agents

Suppose an agent needs to look up an issue in a tracker. The model cannot inspect the tracker just by knowing that it exists. It needs a connection that can receive a request, reach the tracker, and return a result. One way to supply that connection is the Model Context Protocol (MCP), a standard for exchanging context and capabilities between an application and separate servers.

Follow one request

You: “Summarize issue 42”
        ↓
Agent application (MCP host)
  └─ MCP client ── request ──→ MCP server ──→ issue tracker
                   ← result ──            ←── issue data
        ↓
Agent interprets result and reports what it found

The host is the application coordinating the work. A client is the component inside that application managing a connection to a particular server. The server is a program that exposes capabilities and information; it may in turn contact a separate service. The server is not necessarily the tracker itself. The host can maintain separate client connections to different servers.

In this example the agent selects an available issue-reading tool and supplies an issue identifier. The server returns data; the host makes it available to the agent. A useful answer should identify the issue and distinguish its contents from the agent’s interpretation. An absent result, access error, or stale record is not proof that the issue does not exist.

MCP can also expose resources, such as readable context, and prompts, which are reusable templates; a server need not offer all three kinds of capability. What the host presents and how it uses them depends on the application. MCP describes the exchange, not a guarantee that the server is trustworthy or that its answer is correct. See the MCP architecture overview.

Where does the server run?

A local server can be a process on the same machine, communicating through standard input and output. A remote server can communicate over HTTP. Local does not mean harmless: a local process may inherit file, network, or credential access. Remote does not mean publicly accessible: the service may require authorization. Setup, transport support, and configuration vary; consult the current documentation for both the chosen host and server.

A fictional connection, from intent to verification

Suppose a team wants an agent to read a test issue tracker. In a fictional host, a person chooses a remote tracker server and enters its endpoint in project-scoped settings so the connection is intended for that project. Alternatively, personal scope could affect other projects; the host decides how scopes are discovered and merged. The endpoint is an address for the server, not proof of its identity or safety.

The configuration refers to a credential held in the host’s supported secret storage rather than containing its value. The service grant is limited to the test tracker where supported. After any host-required reload or sign-in, the person checks the active connection and exposed tools, then makes a harmless read of a known test issue. A successful connection alone does not prove the correct account, scope, or permissions. Check the host and server documentation for actual fields, authentication, verification and reload behavior; this is a conceptual trace, not a product configuration.

Disconnecting or disabling the server in a host can remove that connection’s capabilities from the session, depending on the host. Denying one tool can instead leave other tools on that server available, if the host offers that control. Check the effective tool list and permission behavior; either choice may leave other access routes intact. Disconnecting does not necessarily revoke the service credential: revoke it separately when access is no longer needed.

A long catalog of connected tools can also make a session harder to navigate or consume context, depending on the host. Some applications discover tools on demand. Connect what the task needs and inspect the tools and permissions actually exposed rather than assuming every connection behaves alike.