🎤Micdrop

Start a Voice AI App with npm create micdrop

One command writes a project that runs as it is: the client, the Node server that runs the AI, a .env to fill with your keys, and a README.

Terminal window
npm create micdrop@latest

It asks where to write the project, which template to start from and which AI runs the call, then offers to install the dependencies. With pnpm, Yarn or Bun:

Terminal window
pnpm create micdrop
yarn create micdrop
bun create micdrop

Fill the .env it wrote, then start the project with npm run dev.

Templates

TemplateWhat you getFlag
Next.jsA Next.js page that holds the call, and a WebSocket server next to Next.jsnextjs
Vite + ReactA React page built with Vite, a Fastify server, and Silero voice detection shipped with the appvite-react
ExpoAn iOS and Android app with React Native, and the server it talks toexpo
Phone agentA phone number answered by the agent, through Twilio, Telnyx, Vonage or Plivophone
Node serverA WebSocket server alone, for any Micdrop clientnode

Every template gives the assistant a first message and the end call tool, and keeps the AI providers in one file, ai.ts, so swapping one touches nothing else.

Next.js

A call keeps a WebSocket open for its whole length, which the route handlers of Next.js do not hold, so the voice server runs as a Node process next to Next.js. npm run dev starts both. The page loads the call in the browser only, since it needs the microphone, and reads its state with the React hooks.

Vite + React

Vite hands /call to the Fastify server, so the page and the call share one address in development. The Micdrop Vite plugin ships the Silero model with the app, and the call combines the volume and Silero voice detection.

Expo

The app runs from a development build, as any app that records audio natively. It finds the server on the machine Expo served it from, so a simulator and a phone on the same Wi-Fi work without configuration. The keys stay in server/.env, out of the app. See React Native for what the client does.

Phone agent

The template answers a phone number on your own server. You pick the telephony provider when creating the project, and the generated src/telephony.ts answers its webhook and opens its media stream. The agent:

  • Greets the caller as soon as the call connects
  • Hangs up once the caller says goodbye
  • Transfers the caller to a person when TRANSFER_NUMBER is set, at once or after briefing them, through transferCallTool()
  • Reads the keys pressed on the keypad, and checks in when the caller stays silent
  • Places calls with POST /call when OUTBOUND_API_KEY is set, and leaves a message when a voicemail picks up, as outbound calls explain
  • Refuses the webhooks your provider did not sign, unless VERIFY_SIGNATURES=false, as securing the webhooks explains
  • Saves the audio and the transcript of each call when RECORDINGS_DIR is set, through the recorder
  • Logs the conversation once the call is over, ready to send to your CRM

The server finds the turns of the caller itself with Silero, since a phone line has no client to do it. See Telephony for each provider, and Migrate from Vapi to move an assistant from a hosted platform to this template.

Node server

The smallest project: a WebSocket server that runs each connection as a call. Connect any client to it, in a browser or on a phone.

AI providers

A preset sets the three parts of a call at once:

PresetWhat runs the callKeys
openaiOpenAI speech to text, GPT and OpenAI voicesOne
openai-realtimeThe OpenAI Realtime API, one speech to speech modelOne
gemini-liveGemini Live, one speech to speech modelOne
grok-voiceGrok Voice by xAI, one speech to speech modelOne
mistralVoxtral to transcribe and speak, Mistral Medium to answerOne
europeSpeechmatics, Mistral Medium and Gradium, on their EU endpointsThree
localWhisper, an Ollama model and Kokoro, on your machineNone

Or pick each part:

PartFlagChoices
Speech to text--sttopenai, gladia, mistral, gemini, deepgram, deepgram-flux, assemblyai, speechmatics, grok, whisper
Agent--agentopenai, mistral, gemini, mastra, openai-agents, ollama
Text to speech--ttsopenai, elevenlabs, cartesia, mistral, gemini, deepgram, inworld, gradium, grok, kokoro
Speech to speech--realtimeopenai, gemini, grok

The local models run on your machine with no key: pull the Ollama model before the first call. The mastra and openai-agents agents build a Mastra or OpenAI Agents SDK agent at the top of ai.ts, running an OpenAI model, ready to receive the tools, workflows or handoffs of your framework. Every other provider listed in AI providers plugs into ai.ts the same way.

Without questions

Every answer has a flag, so a script or a CI job creates a project without a prompt. Anything left out takes its default with --yes, or is asked.

Terminal window
npm create micdrop@latest my-agent -- --template phone --telephony twilio --ai openai --install
Terminal window
pnpm create micdrop my-app --template nextjs --stt gladia --agent mistral --tts elevenlabs
FlagValues
--template, -tnextjs, vite-react, expo, phone, node
--aiopenai, openai-realtime, gemini-live, grok-voice, mistral, europe, local
--stt, --agent, --ttsOne part of the call, on top of a preset
--realtimeA speech to speech model, in place of the three parts
--telephonytwilio, telnyx, vonage, plivo, for the phone template
--pmnpm, pnpm, yarn, bun, the one running the command by default
--install, --no-installInstalls the dependencies, or leaves it to you
--yes, -yTakes the defaults instead of asking

npm passes flags to the command after --, as in the first example. pnpm, Yarn and Bun need no separator.

Build it with a coding agent

To vibe code your Micdrop implementation faster with Cursor, Claude Code or any other agent, install Context7 MCP.

Once the MCP is installed, you can prompt like this:

create a turbo monorepo in current folder with a client and a server in a new /apps folder:
- server: a simple fastify server with Typescript that implements a micdrop server (use context7)
- client: a simple React webapp with micdrop client. show play/stop/pause buttons and conversation, no other UI. make it beautiful and futuristic.