Discovery operations
The facade also exposesinspect(), list_tools(cursor=None), list_resources(cursor=None), list_resource_templates(cursor=None), list_prompts(cursor=None), and get_prompt(name, arguments=None). Inspection and tool-catalogue listing are developer operations, not additional model tools.
Exports
MCPClient
A client connection to a stdio, SSE, or Streamable HTTP MCP server. Obtain this object from the owning Harnest API; its constructor includes runtime bindings. Fields (— means no declared default):
Example
Example
MCPClient.from_openapi
__file__
for specs bundled with an agent. Headers support ${VARIABLE}.
client_options accepts the standard stdio policy options.
Requires the optional harnest[openapi] runtime dependency.
Parameters and example
Parameters and example
MCPClient.stdio
Parameters and example
Parameters and example
MCPClient.streamable_http
Parameters and example
Parameters and example
MCPClient.sse
Parameters and example
Parameters and example
MCPClient.connect
Parameters and example
Parameters and example
MCPClient.required_permissions_for
Parameters and example
Parameters and example
MCPClient.to_adk_toolset
Example
Example
MCPClient.to_langgraph_connection
Example
Example
MCPClientContext
Privacy-safe identity supplied to an MCP client lifecycle.— means no declared default):
Parameters and example
Parameters and example
MCPClientLifecycle
Customize one remote MCP connection’s HTTP client lifecycle.start and close run once for the compiled application. The
synchronous create_http_client hook runs for every MCP session because
ADK and LangGraph own and close those session-scoped HTTP clients.
Example
Example
MCPClientLifecycle.start
Parameters and example
Parameters and example
MCPClientLifecycle.create_http_client
httpx.AsyncClient with safe diagnostics.
Parameters and example
Parameters and example
MCPClientLifecycle.close
start.
Parameters and example
Parameters and example
MCPClientUnavailableError
Raised when an invocation cannot access a named managed MCP client.Example
Example
MCPContext
Resolve managed MCP clients without exposing the client registry.Example
Example
MCPContext.call
Parameters and example
Parameters and example
MCPContext.client
Parameters and example
Parameters and example
MCPContextUnavailableError
Raised when managed MCP access has no active invocation binding.Example
Example
MCPHTTPClientOptions
Adapter-provided inputs for one MCP HTTP client instance.— means no declared default):
Parameters and example
Parameters and example
MCPLifecycleError
An MCP interceptor returned invalid or ambiguous control flow.Example
Example
MCPLifecyclePipeline
Apply explicit portable interceptors around one managed MCP call.Parameters and example
Parameters and example
MCPLifecyclePipeline.run
Parameters and example
Parameters and example
MCPResourceClient
Connection-bound read API; resource data never becomes system instructions.Parameters and example
Parameters and example
MCPResourceClient.inspect
Example
Example
MCPResourceClient.list_tools
Parameters and example
Parameters and example
MCPResourceClient.list_resources
Parameters and example
Parameters and example
MCPResourceClient.list_resource_templates
Parameters and example
Parameters and example
MCPResourceClient.list_prompts
Parameters and example
Parameters and example
MCPResourceClient.read_resource
Parameters and example
Parameters and example
MCPResourceClient.get_prompt
Parameters and example
Parameters and example
MCPResourceError
An MCP capability request failed without exposing connection credentials.Example
Example
MCPResourceEvent
One retained resource value; handlers decide whether to invoke an agent or task.— means no declared default):
Parameters and example
Parameters and example
MCPSubscription
Opt in to a URI, an async application handler, and explicit recovery policy.— means no declared default):
Parameters and example
Parameters and example
MCPToolCallError
A provider-neutral failure from a discovered managed MCP tool.Example
Example
MCPToolCallRequest
Opaque remote arguments that a before hook may explicitly replace.— means no declared default):
Parameters and example
Parameters and example
MCPToolLifecycleContext
Privacy-safe identity for one governed remote-tool execution.— means no declared default):
Parameters and example
Parameters and example
MCPToolLifecycleContext.next
Parameters and example
Parameters and example
MCPToolLifecycleContext.finish
Parameters and example
Parameters and example
MCPToolUnavailableError
Raised when a managed MCP client does not expose a requested tool.Example
Example
ManagedMCPClient
Named MCP facade with no access to credentials or raw transports. Obtain this object from the owning Harnest API; its constructor includes runtime bindings. Fields (— means no declared default):
Example
Example
ManagedMCPClient.inspect
Example
Example
ManagedMCPClient.list_resources
Parameters and example
Parameters and example
ManagedMCPClient.list_tools
Parameters and example
Parameters and example
ManagedMCPClient.list_resource_templates
Parameters and example
Parameters and example
ManagedMCPClient.list_prompts
Parameters and example
Parameters and example
ManagedMCPClient.read_resource
Parameters and example
Parameters and example
ManagedMCPClient.get_prompt
Parameters and example
Parameters and example
ManagedMCPClient.call_tool
Parameters and example
Parameters and example