Let an agent run an interview
Wire an autonomous agent to create, launch, and read Debriefer interviews via MCP.
Your autonomous agent just detected a churn signal in account data. It needs qualitative input — why did this customer stop expanding? — and it needs it without a human in the loop.
This is the pattern MCP was built for: the agent is the creator, the human is the respondent, Debriefer is the interface.
The pattern
sequenceDiagram
participant Agent as Your Agent
participant MCP as Debriefer MCP (hosted)
participant Human as Respondent
Agent->>MCP: connect (OAuth token)
MCP-->>Agent: session established
Agent->>MCP: scaffold_interview
MCP-->>Agent: blueprint_id, hosted_url
Agent->>MCP: launch_interview(respondent)
MCP-->>Human: hosted conversation link
Human-->>MCP: completes interview
MCP-->>Agent: webhook / get_interview_summary
Agent->>Agent: acts on structured dataStep 1. Connect to the hosted MCP endpoint
Use the official MCP SDK against Debriefer's hosted server. Authentication is OAuth - the SDK's authProvider registers the client, runs the sign-in, and refreshes tokens for you (see Connecting).
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
const transport = new StreamableHTTPClientTransport(
new URL('https://mcp.debriefer.ai/mcp'),
{ authProvider: myOAuthProvider },
);
const client = new Client({ name: 'my-agent', version: '1.0.0' }, { capabilities: {} });
await client.connect(transport);For a headless agent, use an authProvider that completes the flow once and persists the refresh token, so later runs reconnect without a browser. See the MCP SDK docs for the pattern.
Step 2. Scaffold the interview
const { content } = await client.callTool({
name: 'scaffold_interview',
arguments: {
topic: 'expansion churn on account ' + accountId,
question_count: 4,
modality: 'voice',
},
});
const { blueprint_id, hosted_url } = JSON.parse(content[0].text);One call creates the agent, draft blueprint, graph, and publishes it.
Step 3. Launch one interview per respondent
for (const stakeholder of accountStakeholders) {
await client.callTool({
name: 'launch_interview',
arguments: {
blueprint_id,
participant: { email: stakeholder.email, name: stakeholder.name },
channel: { kind: 'voice' },
},
});
}Each call creates a channel and a run. Debriefer emails the hosted link to each respondent.
Step 4. Wait for completion
Two options. Poll:
const run = await client.callTool({
name: 'get_interview_run',
arguments: { id: runId, expand: ['responses', 'analysis'] },
});Or subscribe — register a webhook on the Debriefer API so your agent is woken up when runs complete. See the Debriefer API's webhooks documentation for the full event list.
Step 5. Read the results and act
const { content } = await client.callTool({
name: 'get_interview_summary',
arguments: { blueprint_id },
});
const { themes, sentiment, verbatims } = JSON.parse(content[0].text);
if (sentiment.negative_ratio > 0.5) {
await triggerRetentionPlaybook(accountId, themes);
}Structured data in, structured decision out. The agent never needed to read a transcript.
Why this matters
AI agents manage increasingly complex workflows — product roadmaps, customer success pipelines, hiring funnels, compliance monitoring. They hit decision points where they need human judgment.
An agent can't call a meeting. It can't run a focus group. But it can call the Debriefer MCP server, get structured input from real humans in minutes, and keep going.
That's the thing Debriefer does that nothing else does.