Skip to content

Add mcpServers support to RealtimeAgent #353

@Daisuke134

Description

@Daisuke134

Problem

RealtimeAgent currently doesn't support the mcpServers property that regular Agent supports.

Current Workaround

We need to manually expand MCP tools:

const tools = await getAllMcpTools([mcpServer]);
new RealtimeAgent({ tools: [...existingTools, ...tools] });

Proposed Solution

Add mcpServers to RealtimeAgentConfiguration:
type RealtimeAgentConfiguration = {
  // ...existing properties
  mcpServers?: MCPServer[];
}

This would allow:
new RealtimeAgent({
  name: 'Agent',
  mcpServers: [mcpServer], // Automatic tool expansion
  voice: 'alloy'
});

Benefits

- Consistency with regular Agent API
- Simpler code
- Better developer experience

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions