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.
Read moreJust as you can use robots.txt to block search engines and various bots from crawling your site, you can do the same with OpenAI's GPTBot.
GPTBot is OpenAI’s web crawler and can be identified by the following user agent and string.
User agent token: GPTBot
Full user-agent string: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.0; +https://openai.com/gptbot)
To block GPTBot from crawling your site entirely, you can add the following to your robots.txt file:
User-agent: GPTBot
Disallow: /
If you want to allow GTPBot to crawl certain areas of your site, but block it from other areas, you can do this:
User-agent: GPTBot
Allow: /directory-1/
Disallow: /directory-2/
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.
Read moreExtending 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.
Read moreTake 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.
Read more