You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MCP specification defines resources as read-only data exposed by MCP servers (files, database records, application state, real-time signals, etc.). Currently, MCPClient only supports tools — there is no way to list or read resources from an MCP server.
Motivation
Resources are a core MCP primitive alongside tools and prompts. Common use cases for voice/multimodal agents:
Device state — current song playing, application open, sensor readings
User context — profile data, preferences, session history
Knowledge bases — documents, FAQs, product catalogs injected into the system prompt
Real-time signals — IoT data, monitoring dashboards, live metrics
Without resource support, users who need this functionality have to bypass MCPClient entirely and use the raw mcp SDK to manage their own sessions — losing the benefits of Pipecat's persistent session management.
Proposed API
Add three methods to MCPClient, following the same patterns as the existing tool methods:
asyncwithMCPClient(server_params=...) asmcp:
# List available resources (metadata only)resource_list=awaitmcp.list_resources()
# resource_list.resources -> List[MCPResource]# resource_list.supports_subscribe -> bool# resource_list.supports_list_changed -> bool# Read a specific resourceresource=awaitmcp.read_resource("file:///config.json")
# resource.text or resource.blob# Convenience: list + read allall_resources=awaitmcp.read_all_resources()
Summary
The MCP specification defines resources as read-only data exposed by MCP servers (files, database records, application state, real-time signals, etc.). Currently,
MCPClientonly supports tools — there is no way to list or read resources from an MCP server.Motivation
Resources are a core MCP primitive alongside tools and prompts. Common use cases for voice/multimodal agents:
Without resource support, users who need this functionality have to bypass
MCPCliententirely and use the rawmcpSDK to manage their own sessions — losing the benefits of Pipecat's persistent session management.Proposed API
Add three methods to
MCPClient, following the same patterns as the existing tool methods:New dataclasses:
MCPResource— uri, name, description, mime_type, text, blobMCPResourceList— resources list + server capability flagsDesign Notes
start()/close()(PR fixed MCPClient to reuse session across tool calls #4034)subscribe,listChanged) are exposed so users can build polling or subscription logic on topread_all_resources()are logged and skipped gracefullyReferences