Your Astro API Route Can Be an MCP Server
Most MCP tutorials assume a standalone process. Here's how to expose one as just another Astro API route using Streamable HTTP — same auth, same deploy pipeline, no second app to maintain.
12 posts
Most MCP tutorials assume a standalone process. Here's how to expose one as just another Astro API route using Streamable HTTP — same auth, same deploy pipeline, no second app to maintain.
Extending the Datastar chat widget with the browser's native SpeechRecognition API — no new backend, no transcription service, just one more way to fill the same signal.
Take the Astro + Datastar + Vercel AI SDK stack from this series and run it entirely on your own machine with Ollama — no API key, no per-token cost, no data leaving your laptop. It's a one-import change.
Stream typed, structured data from the Vercel AI SDK and watch a card build itself field by field in a Datastar UI — using streamText with output, the v6 replacement for streamObject. No React.
My dialer QAs itself: Claude Code logs in, dials a list of Twilio test numbers — a voicemail, an IVR, a simulated gatekeeper — records what happened vs. what should have, and files GitHub issues for another agent to fix.
Turn the streaming chat widget into an agent that calls tools — and stream the tool-call status live into the conversation. Astro, Datastar, and the AI SDK v6 ToolLoopAgent, no React.
A full multi-turn chat widget with live token streaming — where the server owns the conversation and the DOM is just the view. No React, no useChat, no client framework.
A small, genuinely useful build: a button that streams an AI summary of the current page into a panel, using Astro, Datastar, and the Vercel AI SDK — no React, no client framework.
The Vercel AI SDK's useChat only ships React, Vue, and Svelte bindings. Here's the small, reusable pattern for streaming AI tokens into a plain Datastar UI instead — no framework required
You don't need OneSignal or Firebase to send push notifications. Web push with VAPID keys is built into every modern browser — here's the full setup in Astro: service worker, subscribe flow, SSR endpoints, and sending from the server.
How I wired up a tiny TLDR tool that takes a URL, extracts the article, and streams a Markdown summary back to the browser in real time — using Astro SSR, Datastar for reactivity, and the Vercel AI SDK for the model call.
I've been a big fan of HTMX + Alpine for a long time, the combination just lets you create powerful reactive web apps, but recently I've made the decision to move from HTMX + Alpine to Datastar for various reasons and the result means a better experience for users.