deco-cx/astro-docs-view
If you are the rightful owner of astro-docs-view and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Astro MCP Server Template is a comprehensive full-stack solution for building Model Context Protocol (MCP) servers with a modern documentation site.
Astro MCP Server Template
A full-stack template for building Model Context Protocol (MCP) servers with a modern Astro documentation site. This template provides a complete development environment where your MCP server not only exposes tools and workflows to AI agents but also serves a beautiful documentation interface built with Astro and Starlight.
⨠Features
- š¤ MCP Server: Cloudflare Workers-based server with typed tools and workflows
- ā Astro Frontend: Modern Astro app with Starlight documentation theme
- š Documentation Ready: Pre-configured Starlight theme for beautiful docs
- šØ Tailwind CSS: Full Tailwind CSS integration with custom theming
- š§ Type Safety: Full TypeScript support with auto-generated RPC client types
- š Hot Reload: Live development with automatic rebuilding for both frontend and backend
- āļø Ready to Deploy: One-command deployment to Cloudflare Workers
š Quick Start
Prerequisites
- Node.js ā„18.0.0
- Deno ā„2.0.0
- Deco CLI:
deno install -Ar -g -n deco jsr:@deco/cli
Setup
# Install dependencies
npm install
# Configure your app
npm run configure
# Start development server
npm run dev
The server will start on http://localhost:8787
serving both your MCP endpoints
and the Astro documentation site.
š Project Structure
āāā server/ # MCP Server (Cloudflare Workers + Deco runtime)
ā āāā main.ts # Server entry point with tools & workflows
ā āāā deco.gen.ts # Auto-generated integration types
āāā view/ # Astro Documentation Site (Starlight theme)
āāā src/
ā āāā content/docs/ # Documentation content (MDX/Markdown)
ā āāā assets/ # Static assets
ā āāā content.config.ts # Content configuration
āāā astro.config.mjs # Astro configuration with Starlight
š ļø Development Workflow
npm run dev
- Start development with hot reloadnpm run gen
- Generate types for external integrationsnpm run gen:self
- Generate types for your own tools/workflowsnpm run deploy
- Deploy to production
š Documentation Features
The template includes a fully configured Starlight documentation theme with Tailwind CSS:
- š MDX Support: Write documentation in Markdown with React components
- š Full-Text Search: Built-in search functionality
- š± Responsive Design: Mobile-friendly documentation
- šØ Tailwind Theming: Customizable theme with Tailwind CSS variables
- šØ Customizable Theme: Easy to customize colors, fonts, and layout
- š Auto-Generated Sidebar: Automatic navigation from your content structure
š Content Management
Add documentation by creating MDX files in view/src/content/docs/
:
---
title: My Documentation Page
description: A brief description of this page
---
# My Documentation Page
This is a documentation page written in MDX.
## Features
- Supports **Markdown** syntax
- Can include **React components**
- Full **TypeScript** support
šØ Customization
Tailwind CSS Theming
The template includes full Tailwind CSS integration with custom theming. Edit view/src/styles/global.css
to customize your theme:
@theme {
/* Custom fonts */
--font-sans: 'Atkinson Hyperlegible';
--font-mono: 'IBM Plex Mono';
/* Custom accent colors (currently set to green) */
--color-accent-50: var(--color-green-50);
--color-accent-500: var(--color-green-500);
--color-accent-900: var(--color-green-900);
/* Custom gray scale */
--color-gray-50: var(--color-zinc-50);
--color-gray-900: var(--color-zinc-900);
}
You can customize:
- Fonts: Change the sans-serif and monospace fonts
- Accent Colors: Modify the primary accent color scheme
- Gray Scale: Adjust the neutral color palette
- Additional Styles: Add custom Tailwind utilities
Starlight Configuration
Edit view/astro.config.mjs
to customize your documentation site:
starlight({
title: 'My Documentation',
social: [
{ icon: 'github', label: 'GitHub', href: 'https://github.com/your-repo' }
],
sidebar: [
{
label: 'Guides',
items: [
{ label: 'Getting Started', slug: 'guides/getting-started' },
],
},
],
})
Adding Content
- Create new MDX files in
view/src/content/docs/
- Update the sidebar configuration in
astro.config.mjs
- Use Starlight components for enhanced documentation features
- Apply Tailwind CSS classes directly in your MDX content
š Learn More
This template is built for deploying primarily on top of the Deco platform which can be found at the deco-cx/chat repository.
Ready to build your next MCP server with beautiful documentation? Get started now!