Provides documentation and code snippets for SvelteKit and Tailwind CSS.
A secure, high-performance Model Context Protocol (MCP) server that provides SvelteKit and Tailwind CSS documentation and code snippets with enhanced security, proper TypeScript implementation, and comprehensive error handling.
any
typessrc/
โโโ index.ts # Main server with security hardening
โโโ types.ts # TypeScript type definitions
โโโ services/
โ โโโ fileService.ts # Secure file operations with caching
โโโ utils/
โโโ security.ts # Input validation and path sanitization
โโโ errorHandler.ts # Comprehensive error handling
npm install
npm run build
npm run watch
The server uses secure defaults but can be configured via the ServerConfig
interface:
const CONFIG: ServerConfig = {
maxFileSize: 1024 * 1024, // 1MB max file size
cacheTimeout: 5 * 60 * 1000, // 5 minutes cache timeout
contentBasePath: './content',
// ... other paths
};
// Automatic content caching with configurable timeout
const fileService = new SecureFileService(
1024 * 1024, // Max file size
5 * 60 * 1000 // Cache timeout (5 minutes)
);
get_sveltekit_doc
- Retrieve SvelteKit documentationget_tailwind_info
- Get Tailwind CSS informationlist_sveltekit_topics
- List available SvelteKit docslist_tailwind_info_topics
- List Tailwind documentationget_component_snippet
- Fetch Svelte component codelist_snippet_categories
- List component categorieslist_snippets_in_category
- List snippets in categoryAll tools now include:
{
"mcpServers": {
"tailwind-svelte-assistant": {
"command": "node",
"args": ["./dist/index.js"],
"env": {}
}
}
}
// Get SvelteKit routing documentation
await client.callTool("get_sveltekit_doc", { topic: "routing" });
// List available Tailwind topics
await client.callTool("list_tailwind_info_topics", {});
// Get a component snippet
await client.callTool("get_component_snippet", {
component_category: "headers",
snippet_name: "navbar-default"
});
npm run security-audit
npm run outdated-check
npm run inspector
The included Dockerfile
provides a secure, multi-stage build:
# Multi-stage build with security hardening
FROM node:18-alpine AS builder
# ... build process
FROM node:18-alpine AS release
# ... production setup with non-root user
All operations are logged with structured JSON for easy parsing:
{
"timestamp": "2024-01-15T10:30:00.000Z",
"level": "info",
"operation": "tool_request",
"tool": "get_sveltekit_doc",
"topic": "routing"
}
import
/export
instead of require
any
Build Errors
# Clear dist and rebuild
rm -rf dist && npm run build
Permission Errors
# Ensure executable permissions
chmod +x dist/index.js
Import Errors
"type": "module"
in package.jsonIf you discover a security vulnerability, please report it via GitHub issues with the security
label.
This project maintains the same license as the original Tailwind-Svelte-Assistant project.
This upgraded MCP server transforms the original prototype into a production-ready service with enterprise-grade security, performance, and maintainability.
An authentication-free, remote MCP server deployable on Cloudflare Workers or locally via npm.
Create, validate, and render diagrams from D2 (Declarative Diagramming) code into SVG and PNG formats.
Migrate JavaScript files to TypeScript with customizable conversion rules.
An MCP server with built-in GitHub OAuth support, designed for deployment on Cloudflare Workers.
Integrate and automate Specifai projects with any MCP-compatible AI tool.
Search for and run Yeoman generator templates programmatically.
Provides runtime debugging access to Node.js applications for code editors like Cursor or Claude Code.
An MCP server for interacting with the Clay API, which requires a Clay API key.
Assists AI developers with requirement clarification, module design, and technical architecture.
A comprehensive MCP server for managing OPNsense firewalls, offering over 300 tools for configuration and monitoring.