// Run it by with the Claude Agent SDK. // npm install @anthropic-ai/claude-agent-sdk // Env: RUNITBY_API_KEY (https://runitby.app/app/keys), ANTHROPIC_API_KEY import { query } from '@anthropic-ai/claude-agent-sdk' for await (const message of query({ prompt: 'Ask Jordan (jordan@example.com) for her shipping address: name, street, city, postal code ' + 'and country. Email her the link, then wait for her answer and print it.', options: { model: 'claude-sonnet-5-5', mcpServers: { runitby: { type: 'http', url: 'https://runitby.app/mcp', headers: { Authorization: `Bearer ${process.env.RUNITBY_API_KEY}` }, }, }, allowedTools: ['mcp__runitby__*'], }, })) { if (message.type === 'result' && message.subtype === 'success') console.log(message.result) }