The MCP Lifecycle

At the application level, an MCP integration usually goes through a predictable sequence even though the 2026 protocol core is now stateless.

1. Establish reachability

For stdio, the client starts or connects to a local process. For HTTP, it needs a reachable server URL and any required authentication headers.

2. Discover what is available

The client can discover server capabilities and list tools, prompts, or resources. List results in the 2026 specification can carry cache guidance, allowing clients to avoid repeated catalog fetches.

3. Expose selected capabilities to the model

The host should not blindly expose everything. Filter to the tools relevant to the agent's task, especially when multiple servers publish overlapping or sensitive capabilities.

4. Execute calls

The model requests a tool through the agent runtime. The MCP client routes the call to the server, the server performs business logic, and the result is returned to the host.

5. Handle approval and policy

Sensitive actions may pause for human approval. OpenAI's Agents SDK supports approval policies for local and hosted MCP tools, which is a useful pattern even if you use a different runtime.

6. Retry, cache, and observe

Networked MCP calls need ordinary distributed-systems discipline: timeouts, idempotency where appropriate, retry boundaries, tracing, metrics, and careful caching.

7. Shutdown

Local process transports need clean process termination. HTTP deployments typically rely on normal connection lifecycle and server infrastructure rather than protocol sessions.

Do not confuse agent conversation state with MCP protocol state. Your application can still maintain rich user sessions and memory even when individual MCP protocol requests are stateless.

References