---
source: https://iinventedlight.com/library/notes/ao-mcp-transports-and-trust.md
title: "MCP servers in agent CLIs: transports, tool filters, trust"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 or MIT (repo docs; LICENSE file verified in each GitHub repo); prose restates cited source lines in own words"
license_family: agentops-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Google Gemini CLI docs (GitHub), MCP servers with Gemini CLI, Apache-2.0 (google-gemini/gemini-cli LICENSE); OpenAI Agents SDK (Python) docs (GitHub), Model context protocol (MCP), MIT (openai/openai-agents-python LICENSE)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-09
status: published
checked_on: 2026-11-09
as_of: 2026-11-09
confidence: medium
untested: "No tool or code was run for this note; only the fetched repository documentation was read."
category: agent-operations
topic_area: "agent operations: tool / MCP stacks"
tags: [mcp, gemini-cli, openai-agents-sdk, security]
client: Librarian
sources:
  - id: S1
    title: "MCP servers with Gemini CLI"
    publisher: Google Gemini CLI docs (GitHub)
    url: https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md
    accessed: 2026-11-09
    license: "Apache-2.0 (google-gemini/gemini-cli LICENSE)"
  - id: S2
    title: "Model context protocol (MCP)"
    publisher: OpenAI Agents SDK (Python) docs (GitHub)
    url: https://github.com/openai/openai-agents-python/blob/main/docs/mcp.md
    accessed: 2026-11-09
    license: "MIT (openai/openai-agents-python LICENSE)"
---
# MCP servers in agent CLIs: transports, tool filters, trust

**Answer:** An MCP server exposes tools and resources to an agent over a transport (stdio, SSE, or Streamable HTTP). Filter tools per server, and bypass tool call confirmations only for servers you trust.

## Transports

- Stdio: spawns a subprocess and communicates via stdin/stdout.
- SSE: connects to Server-Sent Events endpoints.
- Streamable HTTP: uses HTTP streaming.

The OpenAI Agents SDK maps these to `MCPServerStdio`, `MCPServerSse`, and `MCPServerStreamableHttp`, plus hosted MCP server tools.

## Gemini CLI per-server settings (`mcpServers` in settings.json)

- `includeTools` is an allowlist; `excludeTools` takes precedence over `includeTools`.
- `trust: true` bypasses all tool call confirmations for that server (default `false`).
- `timeout` defaults to 600,000ms (10 minutes).

## Trust before connecting

MCP tools may expose model-context data and act using your credentials. The SDK docs advise connecting only to trusted servers, giving least-privilege credentials, and requiring approval for sensitive operations.

## Artifacts

- [MCP transports and trust surfaces (table)](https://iinventedlight.com/library/artifacts/ao-mcp-transports.table.json)
- [MCP transports and trust surfaces (markdown table)](https://iinventedlight.com/library/artifacts/ao-mcp-transports.table.md)
- [Topic packet: ao-mcp](https://iinventedlight.com/library/packets/ao-mcp.json)

## See also

- [ao-mcp](https://iinventedlight.com/library/notes/ao-mcp/)
- [ao-security-gemini-cli-sandbox](https://iinventedlight.com/library/notes/ao-security-gemini-cli-sandbox/)

## Claims

- id: C1
  claim: MCP servers expose tools and resources.
  source: S1
  evidence: "exposes tools and resources to the Gemini CLI through the Model Context Protocol"

- id: C2
  claim: excludeTools beats includeTools.
  source: S1
  evidence: "`excludeTools` always takes precedence over `includeTools`"

- id: C3
  claim: trust true bypasses confirmations.
  source: S1
  evidence: "When `true`, bypasses all tool call confirmations for this server"

- id: C4
  claim: Connect only to trusted servers.
  source: S2
  evidence: "Connect only to servers you trust, use least-privilege credentials"

## Sources

- [S1] MCP servers with Gemini CLI. Google Gemini CLI docs (GitHub). https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md . License: Apache-2.0 (google-gemini/gemini-cli LICENSE). Accessed 2026-11-09.

- [S2] Model context protocol (MCP). OpenAI Agents SDK (Python) docs (GitHub). https://github.com/openai/openai-agents-python/blob/main/docs/mcp.md . License: MIT (openai/openai-agents-python LICENSE). Accessed 2026-11-09.


License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: GitHub repository docs under Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0) or MIT License (https://opensource.org/licenses/MIT), as listed per source; copyright notices remain with the original authors. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
