此包由 MCPFlow 打包并发布到npm仓库。
🔍 MCP 服务器,可让您使用内置缓存搜索和访问 Svelte 文档。
直接使用npx运行:
npx @mcpflow.io/mcp-mcp-svelte-docs
或者先安装后使用:
# 安装
npm install @mcpflow.io/mcp-mcp-svelte-docs
# 使用
npx @mcpflow.io/mcp-mcp-svelte-docs
请参考原始仓库的使用说明。
参数:
- 开发者: spences10
- 版本: 1.0.0
- 许可证: MIT License
- 原始仓库: spences10/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.
- 📚 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
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 tofile:local.db
-
LIBSQL_AUTH_TOKEN
(optional): Auth token for remote LibSQL database
The server implements both MCP Resources and Tools:
Access documentation through these URIs:
-
svelte-docs://docs/llms.txt
- Documentation index -
svelte-docs://docs/llms-full.txt
- Complete documentation -
svelte-docs://docs/llms-small.txt
- Compressed documentation -
svelte-docs://docs/{package}/llms.txt
- Package-specific documentation- Supported packages: svelte, kit, cli
Enhanced search functionality with advanced filtering and context awareness.
Parameters:
-
query
(string, required): Search keywords or natural language query -
doc_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:
// 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 URI -
chunk_number
(number, required): Chunk number to retrieve (1-based)
- Clone the repository
- Install dependencies:
pnpm install
- Build the project:
pnpm build
- Run in development mode:
pnpm dev
- Update version in package.json
- Build the project:
pnpm build
- Publish to npm:
pnpm publish
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see the LICENSE file for details.
- Built on the Model Context Protocol
- Powered by Svelte Documentation
- Uses LibSQL for efficient caching