MCP Svelte Docs Server
mcp-svelte-docs
A Model Context Protocol (MCP) server that provides efficient access to Svelte documentation with advanced caching, search capabilities, and optimised content delivery. This server integrates directly with Svelte's official documentation, offering both full and compressed variants suitable for different LLM context window sizes.
<a href="https://glama.ai/mcp/servers/wu4hy1xtjb"> <img width="380" height="200" src="https://glama.ai/mcp/servers/wu4hy1xtjb/badge" /> </a>Features
- 📚 Complete Svelte documentation access through MCP Resources
- 🔍 Advanced search capabilities:
- Document type filtering (API, Tutorial, Example, Error)
- Section hierarchy awareness
- Intelligent relevance scoring based on:
- Term frequency
- Section importance
- Document type relevance
- Exact phrase matching
- Context-aware result excerpts
- Related search suggestions
- 💾 Efficient caching with LibSQL
- 🔄 Automatic content freshness checks
- 📦 Support for package-specific documentation (Svelte, Kit, CLI)
- 📏 Smart content chunking for large documents
- 🗜️ Compressed variants for smaller context windows
- 🏗️ Built on the Model Context Protocol
Configuration
This server requires configuration through your MCP client. Here are examples for different environments:
Cline Configuration
Add this to your Cline MCP settings:
Claude Desktop with WSL Configuration
For WSL environments, add this to your Claude Desktop configuration:
Environment Variables
The server supports the following environment variables:
LIBSQL_URL
(optional): URL for the LibSQL database. Defaults tofile:local.db
LIBSQL_AUTH_TOKEN
(optional): Auth token for remote LibSQL database
API
The server implements both MCP Resources and Tools:
Resources
Access documentation through these URIs:
svelte-docs://docs/llms.txt
- Documentation indexsvelte-docs://docs/llms-full.txt
- Complete documentationsvelte-docs://docs/llms-small.txt
- Compressed documentationsvelte-docs://docs/{package}/llms.txt
- Package-specific documentation- Supported packages: svelte, kit, cli
Tools
search_docs
Enhanced search functionality with advanced filtering and context awareness.
Parameters:
query
(string, required): Search keywords or natural language querydoc_type
(string, optional): Filter by documentation type- Values: 'api', 'tutorial', 'example', 'error', 'all'
- Default: 'all'
context
(number, optional): Number of surrounding paragraphs (0-3)- Default: 1
include_hierarchy
(boolean, optional): Include section hierarchy- Default: true
Example Usage:
get_next_chunk
Retrieve subsequent chunks of large documents.
Parameters:
uri
(string, required): Document URIchunk_number
(number, required): Chunk number to retrieve (1-based)
Development
Setup
- Clone the repository
- Install dependencies:
- Build the project:
- Run in development mode:
Publishing
- Update version in package.json
- Build the project:
- Publish to npm:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see the LICENSE file for details.
Acknowledgments
- Built on the Model Context Protocol
- Powered by Svelte Documentation
- Uses LibSQL for efficient caching
You must be authenticated.
Enables vector similarity search and serving of Svelte documentation via the MCP protocol, with support for local caching and multiple llms.txt documentation formats.