Skip to main content

How to Use MCP Tools

🔧 Tools

MCP (Model Context Protocol) lets your agent connect to external tool servers. You can add MCP servers that provide domain-specific APIs, file system access, database tools, or any other functionality exposed via the MCP specification.

Add an MCP Server​

za agents capabilities mcp-servers add filesystem \
--transport stdio \
--command "npx -y @modelcontextprotocol/server-filesystem /Users/me/Desktop /Users/me/Downloads"

The CLI stores the server name, transport, and command or URL in agent_setups.json. Omit filesystem or --command to be prompted for those values interactively.

Example: Filesystem Server​

za agents capabilities mcp-servers add filesystem \
--transport stdio \
--command "npx -y @modelcontextprotocol/server-filesystem /Users/me/Desktop /Users/me/Downloads"

This launches the official filesystem MCP server, giving the agent file read/write/search tools scoped to the specified directories.

List and Manage Servers​

za agents capabilities mcp-servers list
za agents capabilities mcp-servers show filesystem
za agents capabilities mcp-servers remove filesystem
za agents capabilities mcp-servers settings

Configure Provider Settings​

za agents capabilities mcp-servers settings
SettingTypeDefaultDescription
client_session_timeout_secondsint5Timeout for MCP client initialization
convert_schemas_to_strictboolfalseEnforce strict JSON schema on tool inputs

Transport Options​

TransportUse case
stdioLaunch a local process (npx, python, etc.)
http-sseConnect to a remote MCP server via HTTP/SSE
streamable-httpConnect via the newer Streamable HTTP transport

For HTTP transports, you can add custom headers for authentication and configure timeouts.

OAuth Client Registration​

Hosted MCP servers require an OAuth handshake before the agent can call any tool. Register an OAuth app once on the provider side, then declare its credentials under the transport's oauth_client block:

{
"oauth_client": {
"server_url": "https://mcp.example.com/",
"client_id": "<Provider client ID>",
"client_secret": "<Provider client secret>",
"client_metadata": {
"client_name": "Zeta Alpha Agent",
"scope": "read write",
"grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"],
"token_endpoint_auth_method": "client_secret_post",
"redirect_uris": [
"https://<your-platform-api-host>/v0/service/mcp/oauth/callback"
]
}
}
}

redirect_uris must match the URI registered on the provider byte-for-byte (including any trailing slash). Tokens are stored per user — each end user goes through the consent the first time they trigger a tool.

For provider-specific walkthroughs see Connecting MCP Servers: HubSpot, GitHub, Google Workspace, Slack.

info

For more details on MCP, visit the Model Context Protocol website.