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.
This server requires configuration through your MCP client. Here are examples for different environments:
Add this to your Cline MCP settings:
{
"mcpServers": {
"svelte-docs": {
"command": "npx",
"args": ["-y", "mcp-svelte-docs"],
"env": {
"LIBSQL_URL": "file:local.db",
"LIBSQL_AUTH_TOKEN": "your-auth-token-if-using-remote-db"
}
}
}
}
For WSL environments, add this to your Claude Desktop configuration:
{
"mcpServers": {
"svelte-docs": {
"command": "wsl.exe",
"args": [
"bash",
"-c",
"LIBSQL_URL=file:local.db LIBSQL_AUTH_TOKEN=your-token npx -y mcp-svelte-docs"
]
}
}
}
The server supports the following environment variables:
LIBSQL_URL
(optional): URL for the LibSQL database. Defaults to
file:local.db
LIBSQL_AUTH_TOKEN
(optional): Auth token for remote LibSQL
databaseThe server implements both MCP Resources and Tools:
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
documentationEnhanced search functionality with advanced filtering and context awareness.
Parameters:
query
(string, required): Search keywords or natural language
querydoc_type
(string, optional): Filter by documentation typecontext
(number, optional): Number of surrounding paragraphs (0-3)include_hierarchy
(boolean, optional): Include section hierarchyExample Usage:
// API Reference Search
{
"query": "bind:value directive",
"doc_type": "api",
"context": 1
}
// Tutorial Search
{
"query": "routing sveltekit",
"doc_type": "tutorial",
"context": 2,
"include_hierarchy": true
}
Retrieve subsequent chunks of large documents.
Parameters:
uri
(string, required): Document URIchunk_number
(number, required): Chunk number to retrieve
(1-based)pnpm install
pnpm build
pnpm dev
pnpm build
pnpm publish
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see the LICENSE file for details.