文档搜索服务

一个提供AWS Karpenter文档搜索和检索功能的MCP服务器,支持AI助手直接搜索和阅读文档。

  • by martoc
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 martoc/mcp-karpenter-documentation

使用说明

MCP Karpenter文档服务器

MCP(模型上下文协议)服务器,为以下对象提供搜索和检索工具 AWS卡彭特 文档。该服务器使Claude等人工智能助手能够直接搜索和阅读Karpenter文档。

特性

  • 全文搜索 使用SQLite FTS5进行BM25排名和波特词干分析
  • 分段过滤 按文档类别缩小搜索结果范围
  • 稀疏结账 仅从aws/karpenter提供商aws高效克隆网站目录
  • Docker支持 用于跨项目的可移植部署
  • STDIO传输 用于无缝MCP客户端集成

快速开始

使用Docker(推荐)

# Pull from Docker Hub (easiest)
docker pull martoc/mcp-karpenter-documentation:latest

# Or build locally (includes pre-indexed documentation)
make docker-build

# Test the server
make docker-run

利用紫外线(地方发展)

# Initialise the environment
make init

# Build the documentation index
make index

# Run the server
make run

配置

克劳德代码/克劳德桌面

添加到您的 .mcp.json 或全局设置:

{
  "mcpServers": {
    "karpenter-documentation": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "martoc/mcp-karpenter-documentation:latest"]
    }
  }
}

对于本地构建的Docker镜像:

{
  "mcpServers": {
    "karpenter-documentation": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "martoc/mcp-karpenter-documentation"]
    }
  }
}

对于没有Docker的本地开发:

{
  "mcpServers": {
    "karpenter-documentation": {
      "command": "uv",
      "args": ["run", "mcp-karpenter-documentation"],
      "cwd": "/Users/martoc/Developer/github.com/martoc/mcp-karpenter-documentation"
    }
  }
}

MCP工具

工具 说明
search_documentation 通过关键字查询搜索Karpenter文档,可选部分过滤
read_documentation 检索特定文档页面的完整内容

搜索文档

使用带有词干支持的全文搜索来搜索AWS Karpenter文档。

参数 类型 必填 默认 说明
query string 是 - 搜索词(支持词干)
section string 否 无 按章节筛选(例如,文档、指南、概念)
limit integer 否 10 最大结果(1-50)

常见部分: docs, guides, concepts, reference, troubleshooting, faq

read_文档

检索文档页面的完整内容。

参数 类型 必填 说明
path string 是 文档的相对路径(来自搜索结果)

CLI命令

# Build/rebuild the documentation index
uv run karpenter-docs-index index
uv run karpenter-docs-index index --rebuild
uv run karpenter-docs-index index --branch main

# Show index statistics
uv run karpenter-docs-index stats

发展

make init         # Initialise development environment
make build        # Run full build (lint, typecheck, test)
make test         # Run tests with coverage
make format       # Format code
make lint         # Run linter
make typecheck    # Run type checker
make docker-build # Build Docker image
make docker-tag   # Tag for Docker Hub
make docker-push  # Push to Docker Hub

Docker Hub

官方Docker镜像可在以下网址获得:

  • martoc/mcp-karpenter-documentation:latest -最新稳定版本
  • martoc/mcp-karpenter-documentation:v0.1.0 -具体版本

该图像包括预先索引的Karpenter文档(约181个文档),可以立即使用。

文档

许可证

该项目根据麻省理工学院许可证获得许可-请参阅 许可证 文件以获取详细信息。